Skip to content

Commit

Permalink
fix shadow of struct token definition
Browse files Browse the repository at this point in the history
  • Loading branch information
cce committed May 26, 2023
1 parent ed8e0ea commit 25a357e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data/transactions/logic/assembler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2019,15 +2019,15 @@ func (ops *OpStream) trackStack(args StackTypes, returns StackTypes, instruction
// nextStatement breaks tokens into two slices at the first semicolon and expands macros along the way.
func nextStatement(ops *OpStream, tokens []token) (current, rest []token) {
for i := 0; i < len(tokens); i++ {
token := tokens[i]
replacement, ok := ops.macros[token.str]
tok := tokens[i]
replacement, ok := ops.macros[tok.str]
if ok {
tokens = append(tokens[0:i], append(replacement[1:], tokens[i+1:]...)...)
// backup to handle potential re-expansion of the first token in the expansion
i--
continue
}
if token.str == ";" {
if tok.str == ";" {
return tokens[:i], tokens[i+1:]
}
}
Expand Down

0 comments on commit 25a357e

Please sign in to comment.