Add expressions in parenthesis
This commit is contained in:
parent
3eaf91760e
commit
8bb49321ae
@ -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
|
||||
@ -689,6 +689,11 @@ impl Parse for PrimaryExpression {
|
||||
Expression::TableConstructor(entries)
|
||||
} else if let Ok(_) = stream.parse::<Ellipsis>() {
|
||||
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()?)
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user