gotools/go/internal/gccgoimporter/parser.go

type parser

type fixupRecord

func (p *parser) init(filename string, src io.Reader, imports map[string]*types.Package) {}

func (p *parser) initScanner(filename string, src io.Reader) {}

type importError

func (e importError) Error() string {}

func (p *parser) error(err interface{}

func (p *parser) errorf(format string, args ...interface{}

func (p *parser) expect(tok rune) string {}

func (p *parser) expectEOL() {}

func (p *parser) expectKeyword(keyword string) {}

func (p *parser) parseString() string {}

// parseUnquotedString parses an UnquotedString:
//
//	unquotedString     = { unquotedStringChar } .
//	unquotedStringChar = <neither a whitespace nor a ';' char> .
func (p *parser) parseUnquotedString() string {}

func (p *parser) next() {}

func (p *parser) parseQualifiedName() (path, name string) {}

func (p *parser) parseUnquotedQualifiedName() (path, name string) {}

// parseQualifiedNameStr is given the leading name (unquoted by the caller if necessary)
// and then parses the remainder of a qualified name:
//
//	qualifiedName = [ ["."] unquotedString "." ] unquotedString .
//
// The above production uses greedy matching.
func (p *parser) parseQualifiedNameStr(unquotedName string) (pkgpath, name string) {}

// getPkg returns the package for a given path. If the package is
// not found but we have a package name, create the package and
// add it to the p.imports map.
func (p *parser) getPkg(pkgpath, name string) *types.Package {}

// parseExportedName is like parseQualifiedName, but
// the package path is resolved to an imported *types.Package.
//
//	ExportedName = string [string] .
func (p *parser) parseExportedName() (pkg *types.Package, name string) {}

// parseName parses a Name:
//
//	Name = QualifiedName | "?" .
func (p *parser) parseName() string {}

// parseField parses a Field:
//
//	Field = Name Type [string] .
func (p *parser) parseField(pkg *types.Package) (field *types.Var, tag string) {}

// parseParam parses a Param:
//
//	Param = Name ["..."] Type .
func (p *parser) parseParam(pkg *types.Package) (param *types.Var, isVariadic bool) {}

// parseVar parses a Var:
//
//	Var = Name Type .
func (p *parser) parseVar(pkg *types.Package) *types.Var {}

// parseConversion parses a Conversion:
//
//	Conversion = "convert" "(" Type "," ConstValue ")" .
func (p *parser) parseConversion(pkg *types.Package) (val constant.Value, typ types.Type) {}

// parseConstValue parses a ConstValue:
//
//	ConstValue     = string | "false" | "true" | ["-"] (int ["'"] | FloatOrComplex) | Conversion .
//	FloatOrComplex = float ["i" | ("+"|"-") float "i"] .
func (p *parser) parseConstValue(pkg *types.Package) (val constant.Value, typ types.Type) {}

// parseConst parses a Const:
//
//	Const = Name [Type] "=" ConstValue .
func (p *parser) parseConst(pkg *types.Package) *types.Const {}

var reserved

// reserve reserves the type map entry n for future use.
func (p *parser) reserve(n int) {}

// update sets the type map entries for the entries in nlist to t.
// An entry in nlist can be a type number in p.typeList,
// used to resolve named types, or it can be a *types.Pointer,
// used to resolve pointers to named types in case they are referenced
// by embedded fields.
func (p *parser) update(t types.Type, nlist []interface{}

// parseNamedType parses a NamedType:
//
//	NamedType = TypeName [ "=" ] Type { Method } .
//	TypeName  = ExportedName .
//	Method    = "func" "(" Param ")" Name ParamList ResultList [InlineBody] ";" .
func (p *parser) parseNamedType(nlist []interface{}

func (p *parser) parseInt64() int64 {}

func (p *parser) parseInt() int {}

// parseArrayOrSliceType parses an ArrayOrSliceType:
//
//	ArrayOrSliceType = "[" [ int ] "]" Type .
func (p *parser) parseArrayOrSliceType(pkg *types.Package, nlist []interface{}

// parseMapType parses a MapType:
//
//	MapType = "map" "[" Type "]" Type .
func (p *parser) parseMapType(pkg *types.Package, nlist []interface{}

// parseChanType parses a ChanType:
//
//	ChanType = "chan" ["<-" | "-<"] Type .
func (p *parser) parseChanType(pkg *types.Package, nlist []interface{}

// parseStructType parses a StructType:
//
//	StructType = "struct" "{" { Field } "}" .
func (p *parser) parseStructType(pkg *types.Package, nlist []interface{}

// parseParamList parses a ParamList:
//
//	ParamList = "(" [ { Parameter "," } Parameter ] ")" .
func (p *parser) parseParamList(pkg *types.Package) (*types.Tuple, bool) {}

// parseResultList parses a ResultList:
//
//	ResultList = Type | ParamList .
func (p *parser) parseResultList(pkg *types.Package) *types.Tuple {}

// parseFunctionType parses a FunctionType:
//
//	FunctionType = ParamList ResultList .
func (p *parser) parseFunctionType(pkg *types.Package, nlist []interface{}

// parseFunc parses a Func:
//
//	Func = Name FunctionType [InlineBody] .
func (p *parser) parseFunc(pkg *types.Package) *types.Func {}

// parseInterfaceType parses an InterfaceType:
//
//	InterfaceType = "interface" "{" { ("?" Type | Func) ";" } "}" .
func (p *parser) parseInterfaceType(pkg *types.Package, nlist []interface{}

// parsePointerType parses a PointerType:
//
//	PointerType = "*" ("any" | Type) .
func (p *parser) parsePointerType(pkg *types.Package, nlist []interface{}

// parseTypeSpec parses a TypeSpec:
//
//	TypeSpec = NamedType | MapType | ChanType | StructType | InterfaceType | PointerType | ArrayOrSliceType | FunctionType .
func (p *parser) parseTypeSpec(pkg *types.Package, nlist []interface{}

const gccgoBuiltinINT8

const gccgoBuiltinINT16

const gccgoBuiltinINT32

const gccgoBuiltinINT64

const gccgoBuiltinUINT8

const gccgoBuiltinUINT16

const gccgoBuiltinUINT32

const gccgoBuiltinUINT64

const gccgoBuiltinFLOAT32

const gccgoBuiltinFLOAT64

const gccgoBuiltinINT

const gccgoBuiltinUINT

const gccgoBuiltinUINTPTR

const gccgoBuiltinBOOL

const gccgoBuiltinSTRING

const gccgoBuiltinCOMPLEX64

const gccgoBuiltinCOMPLEX128

const gccgoBuiltinERROR

const gccgoBuiltinBYTE

const gccgoBuiltinRUNE

const gccgoBuiltinANY

func lookupBuiltinType(typ int) types.Type {}

// parseType parses a Type:
//
//	Type = "<" "type" ( "-" int | int [ TypeSpec ] ) ">" .
//
// parseType updates the type map to t for all type numbers n.
func (p *parser) parseType(pkg *types.Package, n ...interface{}

// (*parser).Type after reading the "<".
func (p *parser) parseTypeAfterAngle(pkg *types.Package, n ...interface{}

// parseTypeExtended is identical to parseType, but if the type in
// question is a saved type, returns the index as well as the type
// pointer (index returned is zero if we parsed a builtin).
func (p *parser) parseTypeExtended(pkg *types.Package, n ...interface{}

// InlineBody = "<inl:NN>" .{NN}
// Reports whether a body was skipped.
func (p *parser) skipInlineBody() {}

// parseTypes parses a Types:
//
//	Types = "types" maxp1 exportedp1 (offset length)* .
func (p *parser) parseTypes(pkg *types.Package) {}

// parseSavedType parses one saved type definition.
func (p *parser) parseSavedType(pkg *types.Package, i int, nlist []interface{}

// parsePackageInit parses a PackageInit:
//
//	PackageInit = unquotedString unquotedString int .
func (p *parser) parsePackageInit() PackageInit {}

// Create the package if we have parsed both the package path and package name.
func (p *parser) maybeCreatePackage() {}

// parseInitDataDirective parses an InitDataDirective:
//
//	InitDataDirective = ( "v1" | "v2" | "v3" ) ";" |
//		"priority" int ";" |
//		"init" { PackageInit } ";" |
//		"checksum" unquotedString ";" .
func (p *parser) parseInitDataDirective() {}

// parseDirective parses a Directive:
//
//	Directive = InitDataDirective |
//		"package" unquotedString [ unquotedString ] [ unquotedString ] ";" |
//		"pkgpath" unquotedString ";" |
//		"prefix" unquotedString ";" |
//		"import" unquotedString unquotedString string ";" |
//		"indirectimport" unquotedString unquotedstring ";" |
//		"func" Func ";" |
//		"type" Type ";" |
//		"var" Var ";" |
//		"const" Const ";" .
func (p *parser) parseDirective() {}

// parsePackage parses a Package:
//
//	Package = { Directive } .
func (p *parser) parsePackage() *types.Package {}