diff options
Diffstat (limited to 'src/cmd/compile/internal/syntax/nodes.go')
-rw-r--r-- | src/cmd/compile/internal/syntax/nodes.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/syntax/nodes.go b/src/cmd/compile/internal/syntax/nodes.go index fee155c97c..d450654343 100644 --- a/src/cmd/compile/internal/syntax/nodes.go +++ b/src/cmd/compile/internal/syntax/nodes.go @@ -91,6 +91,7 @@ type ( Type *FuncType Body []Stmt // nil means no body (forward declaration) decl + EndLine uint32 // TODO(mdempsky): Cleaner solution. } ) @@ -141,8 +142,9 @@ type ( // func Type { Body } FuncLit struct { - Type *FuncType - Body []Stmt + Type *FuncType + Body []Stmt + EndLine uint32 // TODO(mdempsky): Cleaner solution. expr } @@ -170,6 +172,11 @@ type ( SliceExpr struct { X Expr Index [3]Expr + // Full indicates whether this is a simple or full slice expression. + // In a valid AST, this is equivalent to Index[2] != nil. + // TODO(mdempsky): This is only needed to report the "3-index + // slice of string" error when Index[2] is missing. + Full bool expr } |