1
0
This commit is contained in:
Jeff 2024-03-27 13:53:55 -04:00
parent e728aa8fbb
commit 70303a77e6

View File

@ -700,7 +700,7 @@ mod tests {
#[test] #[test]
fn map_index() { fn map_index() {
assert_eq!( assert_eq!(
parse(&lex("{ x = 42}.x").unwrap()).unwrap()[0], parse(&lex("{ x = 42 }.x").unwrap()).unwrap()[0],
Statement::Expression(Expression::MapIndex( Statement::Expression(Expression::MapIndex(
Box::new(MapIndex::new( Box::new(MapIndex::new(
Expression::Value( Expression::Value(
@ -870,14 +870,14 @@ mod tests {
#[test] #[test]
fn function_call() { fn function_call() {
assert_eq!( assert_eq!(
parse(&lex("io.write_line()").unwrap()).unwrap()[0], parse(&lex("io.read_line()").unwrap()).unwrap()[0],
Statement::Expression(Expression::FunctionCall( Statement::Expression(Expression::FunctionCall(
FunctionCall::new( FunctionCall::new(
Expression::MapIndex( Expression::MapIndex(
Box::new(MapIndex::new( Box::new(MapIndex::new(
Expression::Identifier(Identifier::new("io").with_position((0, 2))), Expression::Identifier(Identifier::new("io").with_position((0, 2))),
Expression::Identifier( Expression::Identifier(
Identifier::new("write_line").with_position((3, 13)) Identifier::new("read_line").with_position((3, 13))
) )
)) ))
.with_position((0, 13)) .with_position((0, 13))