github.com/goplus/gossa@v0.3.25/pkg/text/scanner/go114_export.go (about)

     1  // export by github.com/goplus/gossa/cmd/qexp
     2  
     3  //+build go1.14,!go1.15
     4  
     5  package scanner
     6  
     7  import (
     8  	q "text/scanner"
     9  
    10  	"go/constant"
    11  	"reflect"
    12  
    13  	"github.com/goplus/gossa"
    14  )
    15  
    16  func init() {
    17  	gossa.RegisterPackage(&gossa.Package{
    18  		Name: "scanner",
    19  		Path: "text/scanner",
    20  		Deps: map[string]string{
    21  			"bytes":        "bytes",
    22  			"fmt":          "fmt",
    23  			"io":           "io",
    24  			"os":           "os",
    25  			"unicode":      "unicode",
    26  			"unicode/utf8": "utf8",
    27  		},
    28  		Interfaces: map[string]reflect.Type{},
    29  		NamedTypes: map[string]gossa.NamedType{
    30  			"Position": {reflect.TypeOf((*q.Position)(nil)).Elem(), "String", "IsValid"},
    31  			"Scanner":  {reflect.TypeOf((*q.Scanner)(nil)).Elem(), "", "Init,Next,Peek,Pos,Scan,TokenText,digits,error,errorf,isIdentRune,next,scanChar,scanComment,scanDigits,scanEscape,scanIdentifier,scanNumber,scanRawString,scanString"},
    32  		},
    33  		AliasTypes: map[string]reflect.Type{},
    34  		Vars:       map[string]reflect.Value{},
    35  		Funcs: map[string]reflect.Value{
    36  			"TokenString": reflect.ValueOf(q.TokenString),
    37  		},
    38  		TypedConsts: map[string]gossa.TypedConst{},
    39  		UntypedConsts: map[string]gossa.UntypedConst{
    40  			"Char":           {"untyped int", constant.MakeInt64(int64(q.Char))},
    41  			"Comment":        {"untyped int", constant.MakeInt64(int64(q.Comment))},
    42  			"EOF":            {"untyped int", constant.MakeInt64(int64(q.EOF))},
    43  			"Float":          {"untyped int", constant.MakeInt64(int64(q.Float))},
    44  			"GoTokens":       {"untyped int", constant.MakeInt64(int64(q.GoTokens))},
    45  			"GoWhitespace":   {"untyped int", constant.MakeInt64(int64(q.GoWhitespace))},
    46  			"Ident":          {"untyped int", constant.MakeInt64(int64(q.Ident))},
    47  			"Int":            {"untyped int", constant.MakeInt64(int64(q.Int))},
    48  			"RawString":      {"untyped int", constant.MakeInt64(int64(q.RawString))},
    49  			"ScanChars":      {"untyped int", constant.MakeInt64(int64(q.ScanChars))},
    50  			"ScanComments":   {"untyped int", constant.MakeInt64(int64(q.ScanComments))},
    51  			"ScanFloats":     {"untyped int", constant.MakeInt64(int64(q.ScanFloats))},
    52  			"ScanIdents":     {"untyped int", constant.MakeInt64(int64(q.ScanIdents))},
    53  			"ScanInts":       {"untyped int", constant.MakeInt64(int64(q.ScanInts))},
    54  			"ScanRawStrings": {"untyped int", constant.MakeInt64(int64(q.ScanRawStrings))},
    55  			"ScanStrings":    {"untyped int", constant.MakeInt64(int64(q.ScanStrings))},
    56  			"SkipComments":   {"untyped int", constant.MakeInt64(int64(q.SkipComments))},
    57  			"String":         {"untyped int", constant.MakeInt64(int64(q.String))},
    58  		},
    59  	})
    60  }