mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-22 19:29:39 +00:00
compiler: make sequence points on global var/const declarations
This commit is contained in:
parent
128626de5c
commit
553e57c2c4
1 changed files with 3 additions and 0 deletions
|
@ -400,6 +400,9 @@ func (c *codegen) Visit(node ast.Node) ast.Visitor {
|
|||
// x = 2
|
||||
// )
|
||||
case *ast.GenDecl:
|
||||
if n.Tok == token.VAR || n.Tok == token.CONST {
|
||||
c.saveSequencePoint(n)
|
||||
}
|
||||
if n.Tok == token.CONST {
|
||||
for _, spec := range n.Specs {
|
||||
vs := spec.(*ast.ValueSpec)
|
||||
|
|
Loading…
Reference in a new issue