Skip to content

Commit

Permalink
Remove num_tokens argument from bump_glue (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxd3 committed Aug 12, 2023
1 parent 84ccafe commit 94bad1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/parse_stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -731,12 +731,12 @@ This is for use in special circumstances where the parser needs to resolve
lexing ambiguities. There's no special whitespace handling — bump any
whitespace if necessary with bump_trivia.
"""
function bump_glue(stream::ParseStream, kind, flags, num_tokens)
function bump_glue(stream::ParseStream, kind, flags)
i = stream.lookahead_index
h = SyntaxHead(kind, flags)
push!(stream.tokens, SyntaxToken(h, kind, false,
stream.lookahead[i+1].next_byte))
stream.lookahead_index += num_tokens
stream.lookahead_index += 2
stream.peek_count = 0
return position(stream)
end
Expand Down
2 changes: 1 addition & 1 deletion src/parser.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ function parse_unary(ps::ParseState)
# -1.0f0 ==> -1.0f0
# -2*x ==> (call-i -2 * x)
# +0xff ==> 0xff
bump_glue(ps, kind(t2), EMPTY_FLAGS, 2)
bump_glue(ps, kind(t2), EMPTY_FLAGS)
end
return
end
Expand Down

0 comments on commit 94bad1a

Please sign in to comment.