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()
|
.to()
|
||||||
}
|
}
|
||||||
// 050 == != > >= < <=
|
// 045 > >= < <=
|
||||||
(0..=50, Some('>')) => {
|
(0..=45, Some('>')) => {
|
||||||
file.next();
|
file.next();
|
||||||
SStatementEnum::FunctionCall(
|
SStatementEnum::FunctionCall(
|
||||||
if let Some('=') = file.peek() {
|
if let Some('=') = file.peek() {
|
||||||
@ -954,11 +954,11 @@ pub mod implementation {
|
|||||||
} else {
|
} else {
|
||||||
"gt".to_owned()
|
"gt".to_owned()
|
||||||
},
|
},
|
||||||
vec![out, parse_statement_adv(file, false, 51)?],
|
vec![out, parse_statement_adv(file, false, 46)?],
|
||||||
)
|
)
|
||||||
.to()
|
.to()
|
||||||
}
|
}
|
||||||
(0..=50, Some('<')) => {
|
(0..=45, Some('<')) => {
|
||||||
file.next();
|
file.next();
|
||||||
SStatementEnum::FunctionCall(
|
SStatementEnum::FunctionCall(
|
||||||
if let Some('=') = file.peek() {
|
if let Some('=') = file.peek() {
|
||||||
@ -967,10 +967,11 @@ pub mod implementation {
|
|||||||
} else {
|
} else {
|
||||||
"lt".to_owned()
|
"lt".to_owned()
|
||||||
},
|
},
|
||||||
vec![out, parse_statement_adv(file, false, 51)?],
|
vec![out, parse_statement_adv(file, false, 46)?],
|
||||||
)
|
)
|
||||||
.to()
|
.to()
|
||||||
}
|
}
|
||||||
|
// 050 == !=
|
||||||
(0..=50, Some('='))
|
(0..=50, Some('='))
|
||||||
if matches!(
|
if matches!(
|
||||||
file.get_char(file.get_pos().current_char_index + 1),
|
file.get_char(file.get_pos().current_char_index + 1),
|
||||||
|
Loading…
Reference in New Issue
Block a user