summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-05-23 12:05:30 +0900
committerYukihiro Matsumoto <[email protected]>2012-05-23 12:05:30 +0900
commitd26100d529604767aaad20866e84092e620c7e22 (patch)
tree6e6a1bfd8057adc2411e228556742b7cb03003b3 /src
parent52b2d092d38482257971789bc59257d16bbe8c4c (diff)
downloadmruby-d26100d529604767aaad20866e84092e620c7e22.tar.gz
mruby-d26100d529604767aaad20866e84092e620c7e22.zip
allow empty paren as a valid expr
Diffstat (limited to 'src')
-rw-r--r--src/parse.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parse.y b/src/parse.y
index 871842668..752993a4a 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -1869,6 +1869,10 @@ primary : literal
{
$$ = $2;
}
+ | tLPAREN_ARG {p->lstate = EXPR_ENDARG;} rparen
+ {
+ $$ = 0;
+ }
| tLPAREN compstmt ')'
{
$$ = $2;