- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for importDecl (0.27 sec)
-
src/cmd/compile/internal/syntax/nodes_test.go
// position of the first token of an individual // declaration, independent of grouping. {"ImportDecl", `import @"math"`}, {"ImportDecl", `import @mymath "math"`}, {"ImportDecl", `import @. "math"`}, {"ImportDecl", `import (@"math")`}, {"ImportDecl", `import (@mymath "math")`}, {"ImportDecl", `import (@. "math")`}, {"ConstDecl", `const @x`}, {"ConstDecl", `const @x = 0`},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 18:45:06 UTC 2023 - 8.7K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/positions.go
case nil: panic("nil node") // packages case *File: // file block starts at the beginning of the file return MakePos(n.Pos().Base(), 1, 1) // declarations // case *ImportDecl: // case *ConstDecl: // case *TypeDecl: // case *VarDecl: // case *FuncDecl: // expressions // case *BadExpr: // case *Name: // case *BasicLit: case *CompositeLit:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 17:49:19 UTC 2024 - 6.5K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/syntax.go
// and it returns an updated pragma value. // The text is the directive, with the "//" prefix stripped. // The current pragma is saved at each package, import, const, func, type, or var // declaration, into the File, ImportDecl, ConstDecl, FuncDecl, TypeDecl, or VarDecl node. // // If text is the empty string, the pragma is being returned // to the handler unused, meaning it appeared before a non-declaration.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 01 18:18:07 UTC 2022 - 3.1K bytes - Viewed (0) -
src/go/doc/example.go
if d.Doc != nil { comments = append(comments, d.Doc) } } } // Synthesize import declaration. importDecl := &ast.GenDecl{ Tok: token.IMPORT, Lparen: 1, // Need non-zero Lparen and Rparen so that printer Rparen: 1, // treats this as a factored import. } importDecl.Specs = append(namedImports, blankImports...) // Synthesize main function. funcDecl := &ast.FuncDecl{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 21.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/api.go
// Implicits maps nodes to their implicitly declared objects, if any. // The following node and object types may appear: // // node declared object // // *syntax.ImportDecl *PkgName for imports without renames // *syntax.CaseClause type-specific *Var for each type switch case clause (incl. default) // *syntax.Field anonymous parameter *Var (incl. unnamed results) //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 13:48:53 UTC 2024 - 17.4K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/walk.go
} w.v = w.v.Visit(n) if w.v == nil { return } switch n := n.(type) { // packages case *File: w.node(n.PkgName) w.declList(n.DeclList) // declarations case *ImportDecl: if n.LocalPkgName != nil { w.node(n.LocalPkgName) } w.node(n.Path) case *ConstDecl: w.nameList(n.NameList) if n.Type != nil { w.node(n.Type) } if n.Values != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:55:04 UTC 2023 - 5.7K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/nodes.go
} // ---------------------------------------------------------------------------- // Declarations type ( Decl interface { Node aDecl() } // Path // LocalPkgName Path ImportDecl struct { Group *Group // nil means not part of a group Pragma Pragma LocalPkgName *Name // including "."; nil means no rename present
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 14:52:38 UTC 2023 - 9K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/parser.go
list = append(list, x) } } return list } // ImportSpec = [ "." | PackageName ] ImportPath . // ImportPath = string_lit . func (p *parser) importDecl(group *Group) Decl { if trace { defer p.trace("importDecl")() } d := new(ImportDecl) d.pos = p.pos() d.Group = group d.Pragma = p.takePragma() switch p.tok { case _Name: d.LocalPkgName = p.name() case _Dot:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 62.9K bytes - Viewed (0) -
src/go/types/decl.go
decl interface { node() ast.Node } importDecl struct{ spec *ast.ImportSpec } constDecl struct { spec *ast.ValueSpec iota int typ ast.Expr init []ast.Expr inherited bool } varDecl struct{ spec *ast.ValueSpec } typeDecl struct{ spec *ast.TypeSpec } funcDecl struct{ decl *ast.FuncDecl } ) func (d importDecl) node() ast.Node { return d.spec }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/printer.go
p.print(_Semi, blank) if n.Cond != nil { p.print(n.Cond) } p.print(_Semi, blank) if n.Post != nil { p.print(n.Post, blank) } } p.print(n.Body) case *ImportDecl: if n.Group == nil { p.print(_Import, blank) } if n.LocalPkgName != nil { p.print(n.LocalPkgName, blank) } p.print(n.Path) case *ConstDecl: if n.Group == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 24 07:17:27 UTC 2023 - 21.5K bytes - Viewed (0)