Skip to content

Commit

Permalink
修复op内联为比较原子大于号变成了大于等于
Browse files Browse the repository at this point in the history
  • Loading branch information
A4-Tacks committed Feb 2, 2025
1 parent 305992f commit e9a5b83
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mindustry_logic_bang_lang"
version = "0.18.1"
version = "0.18.2"
edition = "2021"

authors = ["A4-Tacks <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion tools/parser/tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 15 additions & 0 deletions tools/parser/tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3221,6 +3221,21 @@ fn inline_cmp_op_test() {
]
);

assert_eq!(
CompileMeta::new().compile(parse!(parser, r#"
break (?a<b);
break (?a<=b);
break (?a>b);
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;
Expand Down
2 changes: 1 addition & 1 deletion tools/syntax/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/syntax/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,7 @@ impl Op {
build_match! [
LessThan: LessThan,
LessThanEq: LessThanEq,
GreaterThan: GreaterThanEq,
GreaterThan: GreaterThan,
GreaterThanEq: GreaterThanEq,
Equal: Equal,
NotEqual: NotEqual,
Expand Down

0 comments on commit e9a5b83

Please sign in to comment.