github.com/goplus/gossa@v0.3.25/pkg/text/template/parse/go117_export.go (about)

     1  // export by github.com/goplus/gossa/cmd/qexp
     2  
     3  //go:build go1.17 && !go1.18
     4  // +build go1.17,!go1.18
     5  
     6  package parse
     7  
     8  import (
     9  	q "text/template/parse"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/gossa"
    15  )
    16  
    17  func init() {
    18  	gossa.RegisterPackage(&gossa.Package{
    19  		Name: "parse",
    20  		Path: "text/template/parse",
    21  		Deps: map[string]string{
    22  			"bytes":        "bytes",
    23  			"fmt":          "fmt",
    24  			"runtime":      "runtime",
    25  			"strconv":      "strconv",
    26  			"strings":      "strings",
    27  			"unicode":      "unicode",
    28  			"unicode/utf8": "utf8",
    29  		},
    30  		Interfaces: map[string]reflect.Type{
    31  			"Node": reflect.TypeOf((*q.Node)(nil)).Elem(),
    32  		},
    33  		NamedTypes: map[string]gossa.NamedType{
    34  			"ActionNode":     {reflect.TypeOf((*q.ActionNode)(nil)).Elem(), "", "Copy,String,tree,writeTo"},
    35  			"BoolNode":       {reflect.TypeOf((*q.BoolNode)(nil)).Elem(), "", "Copy,String,tree,writeTo"},
    36  			"BranchNode":     {reflect.TypeOf((*q.BranchNode)(nil)).Elem(), "", "Copy,String,tree,writeTo"},
    37  			"ChainNode":      {reflect.TypeOf((*q.ChainNode)(nil)).Elem(), "", "Add,Copy,String,tree,writeTo"},
    38  			"CommandNode":    {reflect.TypeOf((*q.CommandNode)(nil)).Elem(), "", "Copy,String,append,tree,writeTo"},
    39  			"CommentNode":    {reflect.TypeOf((*q.CommentNode)(nil)).Elem(), "", "Copy,String,tree,writeTo"},
    40  			"DotNode":        {reflect.TypeOf((*q.DotNode)(nil)).Elem(), "", "Copy,String,Type,tree,writeTo"},
    41  			"FieldNode":      {reflect.TypeOf((*q.FieldNode)(nil)).Elem(), "", "Copy,String,tree,writeTo"},
    42  			"IdentifierNode": {reflect.TypeOf((*q.IdentifierNode)(nil)).Elem(), "", "Copy,SetPos,SetTree,String,tree,writeTo"},
    43  			"IfNode":         {reflect.TypeOf((*q.IfNode)(nil)).Elem(), "", "Copy"},
    44  			"ListNode":       {reflect.TypeOf((*q.ListNode)(nil)).Elem(), "", "Copy,CopyList,String,append,tree,writeTo"},
    45  			"Mode":           {reflect.TypeOf((*q.Mode)(nil)).Elem(), "", ""},
    46  			"NilNode":        {reflect.TypeOf((*q.NilNode)(nil)).Elem(), "", "Copy,String,Type,tree,writeTo"},
    47  			"NodeType":       {reflect.TypeOf((*q.NodeType)(nil)).Elem(), "Type", ""},
    48  			"NumberNode":     {reflect.TypeOf((*q.NumberNode)(nil)).Elem(), "", "Copy,String,simplifyComplex,tree,writeTo"},
    49  			"PipeNode":       {reflect.TypeOf((*q.PipeNode)(nil)).Elem(), "", "Copy,CopyPipe,String,append,tree,writeTo"},
    50  			"Pos":            {reflect.TypeOf((*q.Pos)(nil)).Elem(), "Position", ""},
    51  			"RangeNode":      {reflect.TypeOf((*q.RangeNode)(nil)).Elem(), "", "Copy"},
    52  			"StringNode":     {reflect.TypeOf((*q.StringNode)(nil)).Elem(), "", "Copy,String,tree,writeTo"},
    53  			"TemplateNode":   {reflect.TypeOf((*q.TemplateNode)(nil)).Elem(), "", "Copy,String,tree,writeTo"},
    54  			"TextNode":       {reflect.TypeOf((*q.TextNode)(nil)).Elem(), "", "Copy,String,tree,writeTo"},
    55  			"Tree":           {reflect.TypeOf((*q.Tree)(nil)).Elem(), "", "Copy,ErrorContext,Parse,action,add,backup,backup2,backup3,blockControl,checkPipeline,clearActionLine,command,elseControl,endControl,error,errorf,expect,expectOneOf,hasFunction,ifControl,itemList,newAction,newBool,newChain,newCommand,newComment,newDot,newElse,newEnd,newField,newIf,newList,newNil,newNumber,newPipeline,newRange,newString,newTemplate,newText,newVariable,newWith,next,nextNonSpace,operand,parse,parseControl,parseDefinition,parseTemplateName,peek,peekNonSpace,pipeline,popVars,rangeControl,recover,startParse,stopParse,templateControl,term,textOrAction,unexpected,useVar,withControl"},
    56  			"VariableNode":   {reflect.TypeOf((*q.VariableNode)(nil)).Elem(), "", "Copy,String,tree,writeTo"},
    57  			"WithNode":       {reflect.TypeOf((*q.WithNode)(nil)).Elem(), "", "Copy"},
    58  		},
    59  		AliasTypes: map[string]reflect.Type{},
    60  		Vars:       map[string]reflect.Value{},
    61  		Funcs: map[string]reflect.Value{
    62  			"IsEmptyTree":   reflect.ValueOf(q.IsEmptyTree),
    63  			"New":           reflect.ValueOf(q.New),
    64  			"NewIdentifier": reflect.ValueOf(q.NewIdentifier),
    65  			"Parse":         reflect.ValueOf(q.Parse),
    66  		},
    67  		TypedConsts: map[string]gossa.TypedConst{
    68  			"NodeAction":     {reflect.TypeOf(q.NodeAction), constant.MakeInt64(int64(q.NodeAction))},
    69  			"NodeBool":       {reflect.TypeOf(q.NodeBool), constant.MakeInt64(int64(q.NodeBool))},
    70  			"NodeChain":      {reflect.TypeOf(q.NodeChain), constant.MakeInt64(int64(q.NodeChain))},
    71  			"NodeCommand":    {reflect.TypeOf(q.NodeCommand), constant.MakeInt64(int64(q.NodeCommand))},
    72  			"NodeComment":    {reflect.TypeOf(q.NodeComment), constant.MakeInt64(int64(q.NodeComment))},
    73  			"NodeDot":        {reflect.TypeOf(q.NodeDot), constant.MakeInt64(int64(q.NodeDot))},
    74  			"NodeField":      {reflect.TypeOf(q.NodeField), constant.MakeInt64(int64(q.NodeField))},
    75  			"NodeIdentifier": {reflect.TypeOf(q.NodeIdentifier), constant.MakeInt64(int64(q.NodeIdentifier))},
    76  			"NodeIf":         {reflect.TypeOf(q.NodeIf), constant.MakeInt64(int64(q.NodeIf))},
    77  			"NodeList":       {reflect.TypeOf(q.NodeList), constant.MakeInt64(int64(q.NodeList))},
    78  			"NodeNil":        {reflect.TypeOf(q.NodeNil), constant.MakeInt64(int64(q.NodeNil))},
    79  			"NodeNumber":     {reflect.TypeOf(q.NodeNumber), constant.MakeInt64(int64(q.NodeNumber))},
    80  			"NodePipe":       {reflect.TypeOf(q.NodePipe), constant.MakeInt64(int64(q.NodePipe))},
    81  			"NodeRange":      {reflect.TypeOf(q.NodeRange), constant.MakeInt64(int64(q.NodeRange))},
    82  			"NodeString":     {reflect.TypeOf(q.NodeString), constant.MakeInt64(int64(q.NodeString))},
    83  			"NodeTemplate":   {reflect.TypeOf(q.NodeTemplate), constant.MakeInt64(int64(q.NodeTemplate))},
    84  			"NodeText":       {reflect.TypeOf(q.NodeText), constant.MakeInt64(int64(q.NodeText))},
    85  			"NodeVariable":   {reflect.TypeOf(q.NodeVariable), constant.MakeInt64(int64(q.NodeVariable))},
    86  			"NodeWith":       {reflect.TypeOf(q.NodeWith), constant.MakeInt64(int64(q.NodeWith))},
    87  			"ParseComments":  {reflect.TypeOf(q.ParseComments), constant.MakeInt64(int64(q.ParseComments))},
    88  			"SkipFuncCheck":  {reflect.TypeOf(q.SkipFuncCheck), constant.MakeInt64(int64(q.SkipFuncCheck))},
    89  		},
    90  		UntypedConsts: map[string]gossa.UntypedConst{},
    91  	})
    92  }