Home | History | Annotate | Download | only in ast

Lines Matching refs:token

11 	"go/token"
36 Pos() token.Pos // position of first character belonging to the node
37 End() token.Pos // position of first character immediately after the node
63 Slash token.Pos // position of "/" starting the comment
67 func (c *Comment) Pos() token.Pos { return c.Slash }
68 func (c *Comment) End() token.Pos { return token.Pos(int(c.Slash) + len(c.Text)) }
77 func (g *CommentGroup) Pos() token.Pos { return g.List[0].Pos() }
78 func (g *CommentGroup) End() token.Pos { return g.List[len(g.List)-1].End() }
165 func (f *Field) Pos() token.Pos {
172 func (f *Field) End() token.Pos {
181 Opening token.Pos // position of opening parenthesis/brace, if any
183 Closing token.Pos // position of closing parenthesis/brace, if any
186 func (f *FieldList) Pos() token.Pos {
195 return token.NoPos
198 func (f *FieldList) End() token.Pos {
207 return token.NoPos
234 From, To token.Pos // position range of bad expression
239 NamePos token.Pos // identifier position
248 Ellipsis token.Pos // position of "..."
254 ValuePos token.Pos // literal position
255 Kind token.Token // token.INT, token.FLOAT, token.IMAG, token.CHAR, or token.STRING
268 Lbrace token.Pos // position of "{"
270 Rbrace token.Pos // position of "}"
275 Lparen token.Pos // position of "("
277 Rparen token.Pos // position of ")"
289 Lbrack token.Pos // position of "["
291 Rbrack token.Pos // position of "]"
297 Lbrack token.Pos // position of "["
302 Rbrack token.Pos // position of "]"
310 Lparen token.Pos // position of "("
312 Rparen token.Pos // position of ")"
318 Lparen token.Pos // position of "("
320 Ellipsis token.Pos // position of "..." (token.NoPos if there is no "...")
321 Rparen token.Pos // position of ")"
328 Star token.Pos // position of "*"
336 OpPos token.Pos // position of Op
337 Op token.Token // operator
344 OpPos token.Pos // position of Op
345 Op token.Token // operator
354 Colon token.Pos // position of ":"
376 Lbrack token.Pos // position of "["
383 Struct token.Pos // position of "struct" keyword
392 Func token.Pos // position of "func" keyword (token.NoPos if there is no "func")
399 Interface token.Pos // position of "interface" keyword
406 Map token.Pos // position of "map" keyword
413 Begin token.Pos // position of "chan" keyword or "<-" (whichever comes first)
414 Arrow token.Pos // position of "<-" (token.NoPos if there is no "<-")
422 func (x *BadExpr) Pos() token.Pos { return x.From }
423 func (x *Ident) Pos() token.Pos { return x.NamePos }
424 func (x *Ellipsis) Pos() token.Pos { return x.Ellipsis }
425 func (x *BasicLit) Pos() token.Pos { return x.ValuePos }
426 func (x *FuncLit) Pos() token.Pos { return x.Type.Pos() }
427 func (x *CompositeLit) Pos() token.Pos {
433 func (x *ParenExpr) Pos() token.Pos { return x.Lparen }
434 func (x *SelectorExpr) Pos() token.Pos { return x.X.Pos() }
435 func (x *IndexExpr) Pos() token.Pos { return x.X.Pos() }
436 func (x *SliceExpr) Pos() token.Pos { return x.X.Pos() }
437 func (x *TypeAssertExpr) Pos() token.Pos { return x.X.Pos() }
438 func (x *CallExpr) Pos() token.Pos { return x.Fun.Pos() }
439 func (x *StarExpr) Pos() token.Pos { return x.Star }
440 func (x *UnaryExpr) Pos() token.Pos { return x.OpPos }
441 func (x *BinaryExpr) Pos() token.Pos { return x.X.Pos() }
442 func (x *KeyValueExpr) Pos() token.Pos { return x.Key.Pos() }
443 func (x *ArrayType) Pos() token.Pos { return x.Lbrack }
444 func (x *StructType) Pos() token.Pos { return x.Struct }
445 func (x *FuncType) Pos() token.Pos {
451 func (x *InterfaceType) Pos() token.Pos { return x.Interface }
452 func (x *MapType) Pos() token.Pos { return x.Map }
453 func (x *ChanType) Pos() token.Pos { return x.Begin }
455 func (x *BadExpr) End() token.Pos { return x.To }
456 func (x *Ident) End() token.Pos { return token.Pos(int(x.NamePos) + len(x.Name)) }
457 func (x *Ellipsis) End() token.Pos {
463 func (x *BasicLit) End() token.Pos { return token.Pos(int(x.ValuePos) + len(x.Value)) }
464 func (x *FuncLit) End() token.Pos { return x.Body.End() }
465 func (x *CompositeLit) End() token.Pos { return x.Rbrace + 1 }
466 func (x *ParenExpr) End() token.Pos { return x.Rparen + 1 }
467 func (x *SelectorExpr) End() token.Pos { return x.Sel.End() }
468 func (x *IndexExpr) End() token.Pos { return x.Rbrack + 1 }
469 func (x *SliceExpr) End() token.Pos { return x.Rbrack + 1 }
470 func (x *TypeAssertExpr) End() token.Pos { return x.Rparen + 1 }
471 func (x *CallExpr) End() token.Pos { return x.Rparen + 1 }
472 func (x *StarExpr) End() token.Pos { return x.X.End() }
473 func (x *UnaryExpr) End() token.Pos { return x.X.End() }
474 func (x *BinaryExpr) End() token.Pos { return x.Y.End() }
475 func (x *KeyValueExpr) End() token.Pos { return x.Value.End() }
476 func (x *ArrayType) End() token.Pos { return x.Elt.End() }
477 func (x *StructType) End() token.Pos { return x.Fields.End() }
478 func (x *FuncType) End() token.Pos {
484 func (x *InterfaceType) End() token.Pos { return x.Methods.End() }
485 func (x *MapType) End() token.Pos { return x.Value.End() }
486 func (x *ChanType) End() token.Pos { return x.Value.End() }
521 func NewIdent(name string) *Ident { return &Ident{token.NoPos, name, nil} }
555 From, To token.Pos // position range of bad statement
560 Decl Decl // *GenDecl with CONST, TYPE, or VAR token
568 Semicolon token.Pos // position of following ";"
575 Colon token.Pos // position of ":"
589 Arrow token.Pos // position of "<-"
596 TokPos token.Pos // position of Tok
597 Tok token.Token // INC or DEC
605 TokPos token.Pos // position of Tok
606 Tok token.Token // assignment token, DEFINE
612 Go token.Pos // position of "go" keyword
618 Defer token.Pos // position of "defer" keyword
624 Return token.Pos // position of "return" keyword
632 TokPos token.Pos // position of Tok
633 Tok token.Token // keyword token (BREAK, CONTINUE, GOTO, FALLTHROUGH)
639 Lbrace token.Pos // position of "{"
641 Rbrace token.Pos // position of "}"
646 If token.Pos // position of "if" keyword
655 Case token.Pos // position of "case" or "default" keyword
657 Colon token.Pos // position of ":"
663 Switch token.Pos // position of "switch" keyword
671 Switch token.Pos // position of "switch" keyword
679 Case token.Pos // position of "case" or "default" keyword
681 Colon token.Pos // position of ":"
687 Select token.Pos // position of "select" keyword
693 For token.Pos // position of "for" keyword
702 For token.Pos // position of "for" keyword
704 TokPos token.Pos // position of Tok; invalid if Key == nil
705 Tok token.Token // ILLEGAL if Key == nil, ASSIGN, DEFINE
713 func (s *BadStmt) Pos() token.Pos { return s.From }
714 func (s *DeclStmt) Pos() token.Pos { return s.Decl.Pos() }
715 func (s *EmptyStmt) Pos() token.Pos { return s.Semicolon }
716 func (s *LabeledStmt) Pos() token.Pos { return s.Label.Pos() }
717 func (s *ExprStmt) Pos() token.Pos { return s.X.Pos() }
718 func (s *SendStmt) Pos() token.Pos { return s.Chan.Pos() }
719 func (s *IncDecStmt) Pos() token.Pos { return s.X.Pos() }
720 func (s *AssignStmt) Pos() token.Pos { return s.Lhs[0].Pos() }
721 func (s *GoStmt) Pos() token.Pos { return s.Go }
722 func (s *DeferStmt) Pos() token.Pos { return s.Defer }
723 func (s *ReturnStmt) Pos() token.Pos { return s.Return }
724 func (s *BranchStmt) Pos() token.Pos { return s.TokPos }
725 func (s *BlockStmt) Pos() token.Pos { return s.Lbrace }
726 func (s *IfStmt) Pos() token.Pos { return s.If }
727 func (s *CaseClause) Pos() token.Pos { return s.Case }
728 func (s *SwitchStmt) Pos() token.Pos { return s.Switch }
729 func (s *TypeSwitchStmt) Pos() token.Pos { return s.Switch }
730 func (s *CommClause) Pos() token.Pos { return s.Case }
731 func (s *SelectStmt) Pos() token.Pos { return s.Select }
732 func (s *ForStmt) Pos() token.Pos { return s.For }
733 func (s *RangeStmt) Pos() token.Pos { return s.For }
735 func (s *BadStmt) End() token.Pos { return s.To }
736 func (s *DeclStmt) End() token.Pos { return s.Decl.End() }
737 func (s *EmptyStmt) End() token.Pos {
743 func (s *LabeledStmt) End() token.Pos { return s.Stmt.End() }
744 func (s *ExprStmt) End() token.Pos { return s.X.End() }
745 func (s *SendStmt) End() token.Pos { return s.Value.End() }
746 func (s *IncDecStmt) End() token.Pos {
749 func (s *AssignStmt) End() token.Pos { return s.Rhs[len(s.Rhs)-1].End() }
750 func (s *GoStmt) End() token.Pos { return s.Call.End() }
751 func (s *DeferStmt) End() token.Pos { return s.Call.End() }
752 func (s *ReturnStmt) End() token.Pos {
758 func (s *BranchStmt) End() token.Pos {
762 return token.Pos(int(s.TokPos) + len(s.Tok.String()))
764 func (s *BlockStmt) End() token.Pos { return s.Rbrace + 1 }
765 func (s *IfStmt) End() token.Pos {
771 func (s *CaseClause) End() token.Pos {
777 func (s *SwitchStmt) End() token.Pos { return s.Body.End() }
778 func (s *TypeSwitchStmt) End() token.Pos { return s.Body.End() }
779 func (s *CommClause) End() token.Pos {
785 func (s *SelectStmt) End() token.Pos { return s.Body.End() }
786 func (s *ForStmt) End() token.Pos { return s.Body.End() }
787 func (s *RangeStmt) End() token.Pos { return s.Body.End() }
833 EndPos token.Pos // end of spec (overrides Path.Pos if nonzero)
851 Assign token.Pos // position of '=', if any
859 func (s *ImportSpec) Pos() token.Pos {
865 func (s *ValueSpec) Pos() token.Pos { return s.Names[0].Pos() }
866 func (s *TypeSpec) Pos() token.Pos { return s.Name.Pos() }
868 func (s *ImportSpec) End() token.Pos {
875 func (s *ValueSpec) End() token.Pos {
884 func (s *TypeSpec) End() token.Pos { return s.Type.End() }
901 From, To token.Pos // position range of bad declaration
910 // token.IMPORT *ImportSpec
911 // token.CONST *ValueSpec
912 // token.TYPE *TypeSpec
913 // token.VAR *ValueSpec
917 TokPos token.Pos // position of Tok
918 Tok token.Token // IMPORT, CONST, TYPE, VAR
919 Lparen token.Pos // position of '(', if any
921 Rparen token.Pos // position of ')', if any
936 func (d *BadDecl) Pos() token.Pos { return d.From }
937 func (d *GenDecl) Pos() token.Pos { return d.TokPos }
938 func (d *FuncDecl) Pos() token.Pos { return d.Type.Pos() }
940 func (d *BadDecl) End() token.Pos { return d.To }
941 func (d *GenDecl) End() token.Pos {
947 func (d *FuncDecl) End() token.Pos {
985 Package token.Pos // position of "package" keyword
994 func (f *File) Pos() token.Pos { return f.Package }
995 func (f *File) End() token.Pos {
1012 func (p *Package) Pos() token.Pos { return token.NoPos }
1013 func (p *Package) End() token.Pos { return token.NoPos }