diff --git a/examples/test.lua b/examples/test.lua index 469c44d..c2877c4 100644 --- a/examples/test.lua +++ b/examples/test.lua @@ -90,6 +90,6 @@ function ipairs(t) end, "otus", "potus" end -for k, v in ipairs(table) do +for k, v in (ipairs(table)) do print(k, v) end \ No newline at end of file diff --git a/src/ast.rs b/src/ast.rs index 4796297..983d56a 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -689,6 +689,11 @@ impl Parse for PrimaryExpression { Expression::TableConstructor(entries) } else if let Ok(_) = stream.parse::() { Expression::Ellipsis + } else if let Some(Token::Symbol('(')) = stream.peek() { + stream.next(); + let expression = stream.parse()?; + stream.expect_symbol(')')?; + expression } else { Expression::ValueRef(stream.parse()?) };