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:
2
rust_compiler/Cargo.lock
generated
2
rust_compiler/Cargo.lock
generated
@@ -909,7 +909,7 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
|
||||
|
||||
[[package]]
|
||||
name = "slang"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "slang"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
edition = "2021"
|
||||
|
||||
[workspace]
|
||||
|
||||
@@ -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