diff --git a/Changelog.md b/Changelog.md index a493374..e34a201 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,10 @@ # Changelog +[0.2.1] + +- Added support for `loadSlot` and `setSlot` +- Fixed bug where syscalls like `max(1, 2)` were not allowed in assignment expressions + [0.2.0] - Completely re-wrote the tokenizer to use `logos` diff --git a/ModData/About/About.xml b/ModData/About/About.xml index 98e8f46..8c0bca7 100644 --- a/ModData/About/About.xml +++ b/ModData/About/About.xml @@ -2,7 +2,7 @@ Slang JoeDiertay - 0.2.0 + 0.2.1 [h1]Slang: High-Level Programming for Stationeers[/h1] diff --git a/csharp_mod/stationeersSlang.csproj b/csharp_mod/stationeersSlang.csproj index f519032..91024c0 100644 --- a/csharp_mod/stationeersSlang.csproj +++ b/csharp_mod/stationeersSlang.csproj @@ -5,7 +5,7 @@ enable StationeersSlang Slang Compiler Bridge - 0.2.0 + 0.2.1 true latest diff --git a/rust_compiler/Cargo.lock b/rust_compiler/Cargo.lock index 6867837..2c1e541 100644 --- a/rust_compiler/Cargo.lock +++ b/rust_compiler/Cargo.lock @@ -909,7 +909,7 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "slang" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "clap", diff --git a/rust_compiler/Cargo.toml b/rust_compiler/Cargo.toml index 8969880..6cd02a7 100644 --- a/rust_compiler/Cargo.toml +++ b/rust_compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "slang" -version = "0.2.0" +version = "0.2.1" edition = "2021" [workspace] diff --git a/rust_compiler/libs/compiler/src/test/math_syscall.rs b/rust_compiler/libs/compiler/src/test/math_syscall.rs index 51ee680..f102135 100644 --- a/rust_compiler/libs/compiler/src/test/math_syscall.rs +++ b/rust_compiler/libs/compiler/src/test/math_syscall.rs @@ -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 " } diff --git a/rust_compiler/libs/parser/src/lib.rs b/rust_compiler/libs/parser/src/lib.rs index e07f69f..bcba95d 100644 --- a/rust_compiler/libs/parser/src/lib.rs +++ b/rust_compiler/libs/parser/src/lib.rs @@ -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))?; }