Skip to content

Commit 94bad1a

Browse files
authored
Remove num_tokens argument from bump_glue (#338)
1 parent 84ccafe commit 94bad1a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/parse_stream.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,12 +731,12 @@ This is for use in special circumstances where the parser needs to resolve
731731
lexing ambiguities. There's no special whitespace handling — bump any
732732
whitespace if necessary with bump_trivia.
733733
"""
734-
function bump_glue(stream::ParseStream, kind, flags, num_tokens)
734+
function bump_glue(stream::ParseStream, kind, flags)
735735
i = stream.lookahead_index
736736
h = SyntaxHead(kind, flags)
737737
push!(stream.tokens, SyntaxToken(h, kind, false,
738738
stream.lookahead[i+1].next_byte))
739-
stream.lookahead_index += num_tokens
739+
stream.lookahead_index += 2
740740
stream.peek_count = 0
741741
return position(stream)
742742
end

src/parser.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ function parse_unary(ps::ParseState)
12041204
# -1.0f0 ==> -1.0f0
12051205
# -2*x ==> (call-i -2 * x)
12061206
# +0xff ==> 0xff
1207-
bump_glue(ps, kind(t2), EMPTY_FLAGS, 2)
1207+
bump_glue(ps, kind(t2), EMPTY_FLAGS)
12081208
end
12091209
return
12101210
end

0 commit comments

Comments
 (0)