Fixed bug where infix wouldn't rewind when encountering a comma, causing the rest of a syscall parse in an assignment expression to fail
This commit is contained in:
@@ -249,7 +249,7 @@ fn test_max_from_game() -> Result<()> {
|
||||
debug
|
||||
r#"
|
||||
let item = 0;
|
||||
item = max(1, 2);
|
||||
item = max(1 + 2, 2);
|
||||
"#
|
||||
};
|
||||
|
||||
@@ -260,7 +260,7 @@ fn test_max_from_game() -> Result<()> {
|
||||
j main
|
||||
main:
|
||||
move r8 0 #item
|
||||
max r15 1 2
|
||||
max r15 3 2
|
||||
move r8 r15 #item
|
||||
"
|
||||
}
|
||||
|
||||
@@ -1059,7 +1059,9 @@ impl<'a> Parser<'a> {
|
||||
|
||||
if token_matches!(
|
||||
temp_token,
|
||||
TokenType::Symbol(Symbol::Semicolon) | TokenType::Symbol(Symbol::RParen)
|
||||
TokenType::Symbol(Symbol::Semicolon)
|
||||
| TokenType::Symbol(Symbol::RParen)
|
||||
| TokenType::Symbol(Symbol::Comma)
|
||||
) {
|
||||
self.tokenizer.seek(SeekFrom::Current(-1))?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user