mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/syntax: track column position at function end
Fixes #19576. Change-Id: I11034fb08e989f6eb7d54bde873b92804223598d Reviewed-on: https://go-review.googlesource.com/38291 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
c8f38b3398
commit
f37ee0f33b
3 changed files with 31 additions and 33 deletions
|
|
@ -100,13 +100,13 @@ type (
|
|||
// func Receiver Name Type { Body }
|
||||
// func Receiver Name Type
|
||||
FuncDecl struct {
|
||||
Attr map[string]bool // go:attr map
|
||||
Recv *Field // nil means regular function
|
||||
Name *Name
|
||||
Type *FuncType
|
||||
Body []Stmt // nil means no body (forward declaration)
|
||||
Pragma Pragma // TODO(mdempsky): Cleaner solution.
|
||||
EndLine uint // TODO(mdempsky): Cleaner solution.
|
||||
Attr map[string]bool // go:attr map
|
||||
Recv *Field // nil means regular function
|
||||
Name *Name
|
||||
Type *FuncType
|
||||
Body []Stmt // nil means no body (forward declaration)
|
||||
Pragma Pragma // TODO(mdempsky): Cleaner solution.
|
||||
Rbrace src.Pos // TODO(mdempsky): Cleaner solution.
|
||||
decl
|
||||
}
|
||||
)
|
||||
|
|
@ -146,8 +146,8 @@ type (
|
|||
CompositeLit struct {
|
||||
Type Expr // nil means no literal type
|
||||
ElemList []Expr
|
||||
NKeys int // number of elements with keys
|
||||
EndLine uint // TODO(mdempsky): Cleaner solution.
|
||||
NKeys int // number of elements with keys
|
||||
Rbrace src.Pos // TODO(mdempsky): Cleaner solution.
|
||||
expr
|
||||
}
|
||||
|
||||
|
|
@ -159,9 +159,9 @@ type (
|
|||
|
||||
// func Type { Body }
|
||||
FuncLit struct {
|
||||
Type *FuncType
|
||||
Body []Stmt
|
||||
EndLine uint // TODO(mdempsky): Cleaner solution.
|
||||
Type *FuncType
|
||||
Body []Stmt
|
||||
Rbrace src.Pos // TODO(mdempsky): Cleaner solution.
|
||||
expr
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue