%type <infix_> RelationalExpressionNoIn_
%type <statement_> ReturnStatement
%type <rubyProc_> RubyProcExpression
+%type <rubyProc_> RubyProcExpressionNoOA
%type <functionParameter_> RubyProcParameterList
%type <functionParameter_> RubyProcParameterList_
+%type <functionParameter_> RubyProcParameters
%type <functionParameter_> RubyProcParametersOpt
%type <expression_> ShiftExpression
%type <expression_> ShiftExpressionNoBF
/* }}} */
/* 11.1.5 Object Initialiser {{{ */
ObjectLiteral
- : OpenBrace PropertyNameAndValueListOpt "}" { $$ = CYNew CYObject($2); }
+ : Brace PropertyNameAndValueListOpt "}" { $$ = CYNew CYObject($2); }
;
PropertyNameAndValueList_
;
CategoryName
- : "(" Word ")"
+ : "(" WordOpt ")"
;
CategoryStatement
| { $$ = NULL; }
;
-RubyProcParametersOpt
+RubyProcParameters
: "|" RubyProcParameterList "|" { $$ = $2; }
+ | "||" { $$ = NULL; }
+ ;
+
+RubyProcParametersOpt
+ : RubyProcParameters
| { $$ = NULL; }
;
: "{" RubyProcParametersOpt StatementListOpt "}" { $$ = CYNew CYRubyProc($2, $3); }
;
+RubyProcExpressionNoOA
+ : "{" RubyProcParameters StatementListOpt "}" { $$ = CYNew CYRubyProc($2, $3); }
+ ;
+
+PrimaryExpressionNo
+ : RubyProcExpressionNoOA { $$ = $1; }
+ ;
+
LeftHandSideExpression
: LeftHandSideExpression RubyProcExpression { $$ = CYNew CYRubyBlock($1, $2); }
;