From e9a5b83c306203a8e46c68140fbcca39ac7ac613 Mon Sep 17 00:00:00 2001 From: A4-Tacks Date: Sun, 2 Feb 2025 09:26:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dop=E5=86=85=E8=81=94=E4=B8=BA?= =?UTF-8?q?=E6=AF=94=E8=BE=83=E5=8E=9F=E5=AD=90=E5=A4=A7=E4=BA=8E=E5=8F=B7?= =?UTF-8?q?=E5=8F=98=E6=88=90=E4=BA=86=E5=A4=A7=E4=BA=8E=E7=AD=89=E4=BA=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- tools/parser/tests/Cargo.toml | 2 +- tools/parser/tests/src/lib.rs | 15 +++++++++++++++ tools/syntax/Cargo.toml | 2 +- tools/syntax/src/lib.rs | 2 +- 6 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1be22bc..f6d2e1e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -285,7 +285,7 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mindustry_logic_bang_lang" -version = "0.18.1" +version = "0.18.2" dependencies = [ "display_source", "logic_lint", @@ -342,7 +342,7 @@ dependencies = [ [[package]] name = "parser-tests" -version = "0.1.51" +version = "0.1.52" dependencies = [ "either", "parser", @@ -531,7 +531,7 @@ dependencies = [ [[package]] name = "syntax" -version = "0.2.55" +version = "0.2.56" dependencies = [ "either", "itermaps", diff --git a/Cargo.toml b/Cargo.toml index e2e5257..c04d6f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mindustry_logic_bang_lang" -version = "0.18.1" +version = "0.18.2" edition = "2021" authors = ["A4-Tacks "] diff --git a/tools/parser/tests/Cargo.toml b/tools/parser/tests/Cargo.toml index 29d69ce..4844f5a 100644 --- a/tools/parser/tests/Cargo.toml +++ b/tools/parser/tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parser-tests" -version = "0.1.51" +version = "0.1.52" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/tools/parser/tests/src/lib.rs b/tools/parser/tests/src/lib.rs index 7becaf6..d18bd45 100644 --- a/tools/parser/tests/src/lib.rs +++ b/tools/parser/tests/src/lib.rs @@ -3221,6 +3221,21 @@ fn inline_cmp_op_test() { ] ); + assert_eq!( + CompileMeta::new().compile(parse!(parser, r#" + break (?ab); + break (?a>=b); + "#).unwrap()).compile().unwrap(), + vec![ + "jump 0 lessThan a b", + "jump 0 lessThanEq a b", + "jump 0 greaterThan a b", + "jump 0 greaterThanEq a b", + ] + ); + assert_eq!( CompileMeta::new().compile(parse!(parser, r#" const false = 2; diff --git a/tools/syntax/Cargo.toml b/tools/syntax/Cargo.toml index 95f7e44..c7b6634 100644 --- a/tools/syntax/Cargo.toml +++ b/tools/syntax/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "syntax" -version = "0.2.55" +version = "0.2.56" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/tools/syntax/src/lib.rs b/tools/syntax/src/lib.rs index 23f1bbe..3698a54 100644 --- a/tools/syntax/src/lib.rs +++ b/tools/syntax/src/lib.rs @@ -2001,7 +2001,7 @@ impl Op { build_match! [ LessThan: LessThan, LessThanEq: LessThanEq, - GreaterThan: GreaterThanEq, + GreaterThan: GreaterThan, GreaterThanEq: GreaterThanEq, Equal: Equal, NotEqual: NotEqual,