diff options
Diffstat (limited to 'libgo/go/go/ast/ast.go')
-rw-r--r-- | libgo/go/go/ast/ast.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libgo/go/go/ast/ast.go b/libgo/go/go/ast/ast.go index 5ab4283826..a197b5a5bf 100644 --- a/libgo/go/go/ast/ast.go +++ b/libgo/go/go/ast/ast.go @@ -99,7 +99,7 @@ func (g *CommentGroup) Text() string { } comments := make([]string, len(g.List)) for i, c := range g.List { - comments[i] = string(c.Text) + comments[i] = c.Text } lines := make([]string, 0, 10) // most comments are less than 10 lines @@ -317,7 +317,7 @@ type ( Fun Expr // function expression Lparen token.Pos // position of "(" Args []Expr // function arguments; or nil - Ellipsis token.Pos // position of "...", if any + Ellipsis token.Pos // position of "..." (token.NoPos if there is no "...") Rparen token.Pos // position of ")" } @@ -418,7 +418,7 @@ type ( ) // Pos and End implementations for expression/type nodes. -// + func (x *BadExpr) Pos() token.Pos { return x.From } func (x *Ident) Pos() token.Pos { return x.NamePos } func (x *Ellipsis) Pos() token.Pos { return x.Ellipsis } @@ -709,7 +709,7 @@ type ( ) // Pos and End implementations for statement nodes. -// + func (s *BadStmt) Pos() token.Pos { return s.From } func (s *DeclStmt) Pos() token.Pos { return s.Decl.Pos() } func (s *EmptyStmt) Pos() token.Pos { return s.Semicolon } @@ -854,7 +854,7 @@ type ( ) // Pos and End implementations for spec nodes. -// + func (s *ImportSpec) Pos() token.Pos { if s.Name != nil { return s.Name.Pos() @@ -902,7 +902,7 @@ type ( // A GenDecl node (generic declaration node) represents an import, // constant, type or variable declaration. A valid Lparen position - // (Lparen.Line > 0) indicates a parenthesized declaration. + // (Lparen.IsValid()) indicates a parenthesized declaration. // // Relationship between Tok value and Specs element type: // @@ -931,7 +931,7 @@ type ( ) // Pos and End implementations for declaration nodes. -// + func (d *BadDecl) Pos() token.Pos { return d.From } func (d *GenDecl) Pos() token.Pos { return d.TokPos } func (d *FuncDecl) Pos() token.Pos { return d.Type.Pos() } |