Add expressions in parenthesis
This commit is contained in:
parent
3eaf91760e
commit
8bb49321ae
@ -90,6 +90,6 @@ function ipairs(t)
|
|||||||
end, "otus", "potus"
|
end, "otus", "potus"
|
||||||
end
|
end
|
||||||
|
|
||||||
for k, v in ipairs(table) do
|
for k, v in (ipairs(table)) do
|
||||||
print(k, v)
|
print(k, v)
|
||||||
end
|
end
|
||||||
@ -689,6 +689,11 @@ impl Parse for PrimaryExpression {
|
|||||||
Expression::TableConstructor(entries)
|
Expression::TableConstructor(entries)
|
||||||
} else if let Ok(_) = stream.parse::<Ellipsis>() {
|
} else if let Ok(_) = stream.parse::<Ellipsis>() {
|
||||||
Expression::Ellipsis
|
Expression::Ellipsis
|
||||||
|
} else if let Some(Token::Symbol('(')) = stream.peek() {
|
||||||
|
stream.next();
|
||||||
|
let expression = stream.parse()?;
|
||||||
|
stream.expect_symbol(')')?;
|
||||||
|
expression
|
||||||
} else {
|
} else {
|
||||||
Expression::ValueRef(stream.parse()?)
|
Expression::ValueRef(stream.parse()?)
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user