mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 14:13:52 +01:00
<, <=, > and >= are ordered to happen before == and != instead of defaulting to left-to-right
This commit is contained in:
parent
14d1995d8b
commit
07a443a60b
@ -944,8 +944,8 @@ pub mod implementation {
|
||||
)
|
||||
.to()
|
||||
}
|
||||
// 050 == != > >= < <=
|
||||
(0..=50, Some('>')) => {
|
||||
// 045 > >= < <=
|
||||
(0..=45, Some('>')) => {
|
||||
file.next();
|
||||
SStatementEnum::FunctionCall(
|
||||
if let Some('=') = file.peek() {
|
||||
@ -954,11 +954,11 @@ pub mod implementation {
|
||||
} else {
|
||||
"gt".to_owned()
|
||||
},
|
||||
vec![out, parse_statement_adv(file, false, 51)?],
|
||||
vec![out, parse_statement_adv(file, false, 46)?],
|
||||
)
|
||||
.to()
|
||||
}
|
||||
(0..=50, Some('<')) => {
|
||||
(0..=45, Some('<')) => {
|
||||
file.next();
|
||||
SStatementEnum::FunctionCall(
|
||||
if let Some('=') = file.peek() {
|
||||
@ -967,10 +967,11 @@ pub mod implementation {
|
||||
} else {
|
||||
"lt".to_owned()
|
||||
},
|
||||
vec![out, parse_statement_adv(file, false, 51)?],
|
||||
vec![out, parse_statement_adv(file, false, 46)?],
|
||||
)
|
||||
.to()
|
||||
}
|
||||
// 050 == !=
|
||||
(0..=50, Some('='))
|
||||
if matches!(
|
||||
file.get_char(file.get_pos().current_char_index + 1),
|
||||
|
Loading…
Reference in New Issue
Block a user