mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
parent
b126056f04
commit
d0735257ce
3 changed files with 21 additions and 18 deletions
|
@ -104,6 +104,15 @@ func (c *funcScope) countLocals() int {
|
|||
// This handles the inline GenDecl like "var x = 2"
|
||||
case *ast.ValueSpec:
|
||||
size += len(n.Names)
|
||||
case *ast.RangeStmt:
|
||||
if n.Tok == token.DEFINE {
|
||||
if n.Key != nil {
|
||||
size++
|
||||
}
|
||||
if n.Value != nil {
|
||||
size++
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue