Moved register state to scopes
This commit is contained in:
parent
d1ccd60139
commit
d6d018c5c5
22 changed files with 230 additions and 129 deletions
|
@ -248,7 +248,7 @@ func scanFile(path string, functions chan<- *core.Function) error {
|
|||
|
||||
name := tokens[0].Text()
|
||||
register := x64.CallRegisters[count]
|
||||
uses := core.CountIdentifier(function.Body, name)
|
||||
uses := token.Count(function.Body, token.Identifier, name)
|
||||
|
||||
if uses == 0 {
|
||||
return errors.New(&errors.UnusedVariable{Name: name}, file, tokens[0].Position)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue