Fix parsing of binary expressions
Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
parent
3dbe9b6915
commit
0813d084cc
@ -386,8 +386,11 @@ parser_parse_binary_expression :: proc(
|
||||
next: proc(parser: ^Parser) -> ^Node,
|
||||
) -> ^Node {
|
||||
lhs := next(parser)
|
||||
for kind in kinds {
|
||||
i := 0
|
||||
for i < len(kinds) {
|
||||
kind := kinds[i]
|
||||
for accept(parser, kind) {
|
||||
i = 0
|
||||
prev_can_be_function := parser.can_be_function
|
||||
parser.can_be_function = false
|
||||
rhs := next(parser)
|
||||
@ -395,6 +398,7 @@ parser_parse_binary_expression :: proc(
|
||||
lhs^.range.end = rhs.range.end
|
||||
parser.can_be_function = prev_can_be_function
|
||||
}
|
||||
i += 1
|
||||
}
|
||||
|
||||
return lhs
|
||||
|
Loading…
x
Reference in New Issue
Block a user