Allow chained equals.
This commit is contained in:
@@ -285,32 +285,34 @@ fn order_of_operations() {
|
||||
assert_eq!(
|
||||
Program::from_str(muladd1).unwrap(),
|
||||
Program {
|
||||
items: vec![TopLevel::Statement(Statement::Binding(
|
||||
Location::new(testfile, 0..1),
|
||||
Name::manufactured("x"),
|
||||
Expression::Primitive(
|
||||
Location::new(testfile, 6..7),
|
||||
"+".to_string(),
|
||||
vec![
|
||||
Expression::Value(
|
||||
Location::new(testfile, 4..5),
|
||||
Value::Number(None, None, 1),
|
||||
),
|
||||
Expression::Primitive(
|
||||
Location::new(testfile, 10..11),
|
||||
"*".to_string(),
|
||||
vec![
|
||||
Expression::Value(
|
||||
Location::new(testfile, 8..9),
|
||||
Value::Number(None, None, 2),
|
||||
),
|
||||
Expression::Value(
|
||||
Location::new(testfile, 12..13),
|
||||
Value::Number(None, None, 3),
|
||||
),
|
||||
]
|
||||
)
|
||||
]
|
||||
items: vec![TopLevel::Statement(Statement::Expression(
|
||||
Expression::Binding(
|
||||
Location::new(testfile, 0..1),
|
||||
Name::manufactured("x"),
|
||||
Box::new(Expression::Primitive(
|
||||
Location::new(testfile, 6..7),
|
||||
"+".to_string(),
|
||||
vec![
|
||||
Expression::Value(
|
||||
Location::new(testfile, 4..5),
|
||||
Value::Number(None, None, 1),
|
||||
),
|
||||
Expression::Primitive(
|
||||
Location::new(testfile, 10..11),
|
||||
"*".to_string(),
|
||||
vec![
|
||||
Expression::Value(
|
||||
Location::new(testfile, 8..9),
|
||||
Value::Number(None, None, 2),
|
||||
),
|
||||
Expression::Value(
|
||||
Location::new(testfile, 12..13),
|
||||
Value::Number(None, None, 3),
|
||||
),
|
||||
]
|
||||
)
|
||||
]
|
||||
))
|
||||
)
|
||||
))],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user