%union { bool bool_; }
+%union { CYMember *access_; }
%union { CYArgument *argument_; }
%union { CYAssignment *assignment_; }
%union { CYBoolean *boolean_; }
%union { CYClause *clause_; }
%union { cy::Syntax::Catch *catch_; }
+%union { CYClassTail *classTail_; }
%union { CYComprehension *comprehension_; }
%union { CYDeclaration *declaration_; }
%union { CYDeclarations *declarations_; }
%union { CYIdentifier *identifier_; }
%union { CYInfix *infix_; }
%union { CYLiteral *literal_; }
-%union { CYMember *member_; }
+%union { CYMethod *method_; }
%union { CYModule *module_; }
%union { CYNull *null_; }
%union { CYNumber *number_; }
%union { CYSpan *span_; }
%union { CYStatement *statement_; }
%union { CYString *string_; }
+%union { CYTarget *target_; }
%union { CYThis *this_; }
%union { CYTrue *true_; }
%union { CYWord *word_; }
@end
@begin ObjectiveC
-%union { CYClassName *className_; }
-%union { CYClassField *classField_; }
%union { CYMessage *message_; }
%union { CYMessageParameter *messageParameter_; }
+%union { CYImplementationField *implementationField_; }
%union { CYProtocol *protocol_; }
%union { CYSelectorPart *selector_; }
@end
return token;
}
+#define CYLEX() do if (yyla.empty()) { \
+ YYCDEBUG << "Mapping a token: "; \
+ yyla.type = yytranslate_(yylex(&yyla.value, &yyla.location, driver)); \
+ YY_SYMBOL_PRINT("Next token is", yyla); \
+} while (false)
+
#define CYMAP(to, from) do { \
- if (yyla.empty()) \
- yyla.type = yytranslate_(yylex(&yyla.value, &yyla.location, driver)); \
+ CYLEX(); \
if (yyla.type == yytranslate_(token::from)) \
yyla.type = yytranslate_(token::to); \
} while (false)
%token _import_ "import"
%token _in_ "in"
%token _in__ "!in"
+%token _Infinity_ "Infinity"
%token _instanceof_ "instanceof"
%token _new_ "new"
%token _return_ "return"
%token _return__ "!return"
%token _super_ "super"
+%token _super__ "!super"
%token _switch_ "switch"
%token _this_ "this"
%token _throw_ "throw"
%token _boolean_ "boolean"
%token _byte_ "byte"
%token _char_ "char"
+%token _constructor_ "constructor"
%token _double_ "double"
+%token _eval_ "eval"
%token _final_ "final"
%token _float_ "float"
%token _from_ "from"
%token _package_ "package"
%token _private_ "private"
%token _protected_ "protected"
+%token _prototype_ "prototype"
%token _public_ "public"
%token _set_ "set"
%token _short_ "short"
%type <argument_> ArgumentList
%type <argument_> ArgumentListOpt
%type <argument_> Arguments
-%type <expression_> ArrayComprehension
+%type <target_> ArrayComprehension
%type <literal_> ArrayLiteral
%type <expression_> ArrowFunction
%type <functionParameter_> ArrowParameters
%type <statement_> BreakStatement
%type <statement_> BreakableStatement
%type <expression_> CallExpression_
-%type <expression_> CallExpression
+%type <target_> CallExpression
%type <clause_> CaseBlock
%type <clause_> CaseClause
%type <clause_> CaseClausesOpt
%type <catch_> Catch
%type <identifier_> CatchParameter
%type <statement_> ClassDeclaration
-%type <expression_> ClassExpression
-%type <expression_> Comprehension
+%type <target_> ClassExpression
+%type <classTail_> ClassHeritage
+%type <classTail_> ClassHeritageOpt
+%type <classTail_> ClassTail
+%type <target_> Comprehension
%type <comprehension_> ComprehensionFor
%type <comprehension_> ComprehensionIf
%type <comprehension_> ComprehensionTail
-%type <expression_> ComputedPropertyName
+%type <propertyName_> ComputedPropertyName
%type <expression_> ConditionalExpression
%type <statement_> ContinueStatement
%type <statement_> ConciseBody
%type <element_> ElementList
%type <element_> ElementListOpt
%type <statement_> ElseStatementOpt
-%type <statement_> EmptyStatement
+%type <for_> EmptyStatement
%type <expression_> EqualityExpression
%type <expression_> Expression
%type <expression_> ExpressionOpt
+%type <for_> ExpressionStatement_
%type <statement_> ExpressionStatement
%type <finally_> Finally
%type <declaration_> ForBinding
-%type <declaration_> ForDeclaration
+%type <forin_> ForDeclaration
%type <forin_> ForInStatementInitializer
%type <for_> ForStatementInitializer
%type <declaration_> FormalParameter
%type <functionParameter_> FormalParameters
%type <statement_> FunctionBody
%type <statement_> FunctionDeclaration
-%type <expression_> FunctionExpression
+%type <target_> FunctionExpression
%type <statement_> FunctionStatementList
%type <statement_> GeneratorBody
%type <statement_> GeneratorDeclaration
-%type <expression_> GeneratorExpression
-%type <property_> GeneratorMethod
+%type <target_> GeneratorExpression
+%type <method_> GeneratorMethod
%type <statement_> HoistableDeclaration
%type <identifier_> Identifier
%type <identifier_> IdentifierType
%type <identifier_> LabelIdentifier
%type <statement_> LabelledItem
%type <statement_> LabelledStatement
-%type <expression_> LeftHandSideExpression
-%type <statement_> LetStatement
+%type <target_> LeftHandSideExpression
+%type <bool_> LetOrConst
%type <declaration_> LexicalBinding
+%type <for_> LexicalDeclaration_
%type <statement_> LexicalDeclaration
%type <literal_> Literal
%type <propertyName_> LiteralPropertyName
%type <expression_> LogicalANDExpression
%type <expression_> LogicalORExpression
-%type <member_> MemberAccess
-%type <expression_> MemberExpression
-%type <property_> MethodDefinition
+%type <access_> MemberAccess
+%type <target_> MemberExpression
+%type <method_> MethodDefinition
%type <module_> ModulePath
%type <expression_> MultiplicativeExpression
-%type <expression_> NewExpression
+%type <target_> NewExpression
%type <null_> NullLiteral
%type <literal_> ObjectLiteral
%type <expression_> PostfixExpression
-%type <expression_> PrimaryExpression
+%type <target_> PrimaryExpression
%type <propertyName_> PropertyName
%type <property_> PropertyDefinition
%type <property_> PropertyDefinitionList_
%type <statement_> StatementListOpt
%type <statement_> StatementListItem
%type <functionParameter_> StrictFormalParameters
+%type <target_> SuperCall
+%type <target_> SuperProperty
%type <statement_> SwitchStatement
-%type <expression_> TemplateLiteral
+%type <target_> TemplateLiteral
%type <span_> TemplateSpans
%type <statement_> ThrowStatement
%type <statement_> TryStatement
%type <declaration_> VariableDeclaration
%type <declarations_> VariableDeclarationList_
%type <declarations_> VariableDeclarationList
+%type <for_> VariableStatement_
%type <statement_> VariableStatement
%type <statement_> WithStatement
%type <word_> Word
@begin ObjectiveC
%type <expression_> BoxableExpression
%type <statement_> CategoryStatement
-%type <classField_> ClassFieldListOpt
-%type <classField_> ClassFields
-%type <statement_> ClassStatement
%type <expression_> ClassSuperOpt
+%type <implementationField_> ImplementationFieldListOpt
+%type <implementationField_> ImplementationFields
%type <message_> ClassMessageDeclaration
%type <message_> ClassMessageDeclarationListOpt
-%type <className_> ClassName
%type <protocol_> ClassProtocolListOpt
%type <protocol_> ClassProtocols
%type <protocol_> ClassProtocolsOpt
-%type <expression_> MessageExpression
+%type <statement_> ImplementationStatement
+%type <target_> MessageExpression
%type <messageParameter_> MessageParameter
%type <messageParameter_> MessageParameters
%type <messageParameter_> MessageParameterList
LexPushReturnOn: { driver.return_.push(true); };
LexPopReturn: { driver.return_.pop(); };
+LexPushSuperOn: { driver.super_.push(true); };
+LexPushSuperOff: { driver.super_.push(false); };
+LexPopSuper: { driver.super_.pop(); };
+
LexPushYieldOn: { driver.yield_.push(true); };
LexPushYieldOff: { driver.yield_.push(false); };
LexPopYield: { driver.yield_.pop(); };
LexSetRegExp
- : { driver.SetCondition(CYDriver::RegExpCondition); }
+ : { CYLEX(); if (yyla.type == yytranslate_(token::Slash)) { yyla.clear(); driver.SetRegEx(false); } else if (yyla.type == yytranslate_(token::SlashEqual)) { yyla.clear(); driver.SetRegEx(true); } }
;
LexNewLine
: Word { $$ = $1; }
| "for" { $$ = CYNew CYWord("for"); }
| "in" { $$ = CYNew CYWord("in"); }
+ | "Infinity" { $$ = CYNew CYIdentifier("Infinity"); }
| "instanceof" { $$ = CYNew CYWord("instanceof"); }
;
| "return" { $$ = CYNew CYWord("return"); }
| "!return" { $$ = CYNew CYWord("return"); }
| "super" { $$ = CYNew CYWord("super"); }
+ | "!super" { $$ = CYNew CYWord("super"); }
| "switch" { $$ = CYNew CYWord("switch"); }
| "this" { $$ = CYNew CYWord("this"); }
| "throw" { $$ = CYNew CYWord("throw"); }
| "await" { $$ = CYNew CYIdentifier("await"); }
| "boolean" { $$ = CYNew CYIdentifier("boolean"); }
| "byte" { $$ = CYNew CYIdentifier("byte"); }
+ | "constructor" { $$ = CYNew CYIdentifier("constructor"); }
| "double" { $$ = CYNew CYIdentifier("double"); }
| "each" { $$ = CYNew CYIdentifier("each"); }
+ | "eval" { $$ = CYNew CYIdentifier("eval"); }
| "final" { $$ = CYNew CYIdentifier("final"); }
| "float" { $$ = CYNew CYIdentifier("float"); }
+ | "from" { $$ = CYNew CYIdentifier("from"); }
+ | "get" { $$ = CYNew CYIdentifier("get"); }
| "goto" { $$ = CYNew CYIdentifier("goto"); }
| "implements" { $$ = CYNew CYIdentifier("implements"); }
| "interface" { $$ = CYNew CYIdentifier("interface"); }
| "package" { $$ = CYNew CYIdentifier("package"); }
| "private" { $$ = CYNew CYIdentifier("private"); }
| "protected" { $$ = CYNew CYIdentifier("protected"); }
+ | "prototype" { $$ = CYNew CYIdentifier("prototype"); }
| "public" { $$ = CYNew CYIdentifier("public"); }
- | "static" { $$ = CYNew CYIdentifier("static"); }
+ | "set" { $$ = CYNew CYIdentifier("set"); }
| "synchronized" { $$ = CYNew CYIdentifier("synchronized"); }
| "throws" { $$ = CYNew CYIdentifier("throws"); }
| "transient" { $$ = CYNew CYIdentifier("transient"); }
+ | "undefined" { $$ = CYNew CYIdentifier("undefined"); }
@begin ObjectiveC
| "bool" { $$ = CYNew CYIdentifier("bool"); }
| "BOOL" { $$ = CYNew CYIdentifier("BOOL"); }
Identifier
: IdentifierType
| "char" { $$ = CYNew CYIdentifier("char"); }
- | "from" { $$ = CYNew CYIdentifier("from"); }
- | "get" { $$ = CYNew CYIdentifier("get"); }
| "int" { $$ = CYNew CYIdentifier("int"); }
| "long" { $$ = CYNew CYIdentifier("long"); }
- | "set" { $$ = CYNew CYIdentifier("set"); }
| "short" { $$ = CYNew CYIdentifier("short"); }
- | "undefined" { $$ = CYNew CYIdentifier("undefined"); }
+ | "static" { $$ = CYNew CYIdentifier("static"); }
| "volatile" { $$ = CYNew CYIdentifier("volatile"); }
@begin C
| "extern" { $$ = CYNew CYIdentifier("extern"); }
: NullLiteral { $$ = $1; }
| BooleanLiteral { $$ = $1; }
| NumericLiteral { $$ = $1; }
+ | "Infinity" { $$ = CYNew CYNumber(std::numeric_limits<double>::infinity()); }
| StringLiteral { $$ = $1; }
;
/* }}} */
;
PropertyDefinition
- : IdentifierReference { $$ = CYNew CYProperty($1->name_, $1); }
+ : IdentifierReference { $$ = CYNew CYPropertyValue($1->name_, $1); }
| CoverInitializedName { CYNOT(@$); }
- | PropertyName ":" AssignmentExpression { $$ = CYNew CYProperty($1, $3); }
+ | PropertyName ":" AssignmentExpression { $$ = CYNew CYPropertyValue($1, $3); }
| MethodDefinition { $$ = $1; }
;
PropertyName
: LiteralPropertyName { $$ = $1; }
- | ComputedPropertyName { CYNOT(@$); /* $$ = $1; */ }
+ | ComputedPropertyName { $$ = $1; }
;
LiteralPropertyName
;
ComputedPropertyName
- : "[" AssignmentExpression "]" { $$ = $2; }
+ : "[" AssignmentExpression "]" { $$ = CYNew CYComputed($2); }
;
CoverInitializedName
MemberExpression
: LexSetRegExp PrimaryExpression { $$ = $2; }
| MemberExpression { driver.context_ = $1; } MemberAccess { $3->SetLeft($1); $$ = $3; }
- | SuperProperty { CYNOT(@$); }
+ | SuperProperty { $$ = $1; }
| MetaProperty { CYNOT(@$); }
| LexSetRegExp "new" MemberExpression Arguments { $$ = CYNew cy::Syntax::New($3, $4); }
;
SuperProperty
- : LexSetRegExp "super" "[" Expression "]"
- | LexSetRegExp "super" "." IdentifierName
+ : LexSetRegExp "!super" "[" Expression "]" { $$ = CYNew CYSuperAccess($4); }
+ | LexSetRegExp "!super" "." IdentifierName { $$ = CYNew CYSuperAccess(CYNew CYString($4)); }
;
MetaProperty
;
CallExpression_
- : MemberExpression
- | CallExpression
+ : MemberExpression { $$ = $1; }
+ | CallExpression { $$ = $1; }
;
CallExpression
- : CallExpression_ Arguments { $$ = CYNew CYCall($1, $2); }
- | SuperCall { CYNOT(@$); }
+ : CallExpression_ Arguments { if (!$1->Eval()) $$ = CYNew CYCall($1, $2); else $$ = CYNew CYEval($2); }
+ | SuperCall { $$ = $1; }
| CallExpression { driver.context_ = $1; } MemberAccess { $3->SetLeft($1); $$ = $3; }
;
SuperCall
- : LexSetRegExp "super" Arguments
+ : LexSetRegExp "!super" Arguments { $$ = CYNew CYSuperCall($3); }
;
Arguments
;
/* }}} */
/* 13.3 Let and Const Declarations {{{ */
+LexicalDeclaration_
+ : LetOrConst BindingList { $$ = CYNew CYLet($1, $2); }
+ ;
+
LexicalDeclaration
- : LetOrConst BindingList Terminator { $$ = CYNew CYVar($2); }
+ : LexicalDeclaration_ Terminator { $$ = $1; }
;
LetOrConst
- : "let"
- | "const"
+ : "let" { $$ = false; }
+ | "const" { $$ = true; }
;
BindingList_
;
/* }}} */
/* 13.3.2 Variable Statement {{{ */
+VariableStatement_
+ : Var_ VariableDeclarationList { $$ = CYNew CYVar($2); }
+ ;
+
VariableStatement
- : Var_ VariableDeclarationList Terminator { $$ = CYNew CYVar($2); }
+ : VariableStatement_ Terminator { $$ = $1; }
;
VariableDeclarationList_
;
/* }}} */
/* 13.5 Expression Statement {{{ */
+ExpressionStatement_
+ : Expression { $$ = CYNew CYExpress($1); }
+
ExpressionStatement
- : Expression Terminator { $$ = CYNew CYExpress($1); }
+ : ExpressionStatement_ Terminator { $$ = $1; }
;
/* }}} */
/* 13.6 The if Statement {{{ */
IterationStatement
: "do" Statement "while" "(" Expression ")" TerminatorOpt { $$ = CYNew CYDoWhile($5, $2); }
| "while" "(" Expression ")" Statement { $$ = CYNew CYWhile($3, $5); }
- | "for" "(" LexPushInOn ForStatementInitializer ";" LexPopIn ExpressionOpt ";" ExpressionOpt ")" Statement { $$ = CYNew CYFor($4, $7, $9, $11); }
+ | "for" "(" LexPushInOn ForStatementInitializer LexPopIn ExpressionOpt ";" ExpressionOpt ")" Statement { $$ = CYNew CYFor($4, $6, $8, $10); }
+ | "for" "(" LexPushInOn LexSetRegExp Var_ BindingIdentifier Initializer "!in" LexPopIn Expression ")" Statement { $$ = CYNew CYForInitialized(CYNew CYDeclaration($6, $7), $10, $12); }
| "for" "(" LexPushInOn ForInStatementInitializer "!in" LexPopIn Expression ")" Statement { $$ = CYNew CYForIn($4, $7, $9); }
- | "for" "(" LexPushInOn ForInStatementInitializer "of" LexPopIn Expression ")" Statement { $$ = CYNew CYForOf($4, $7, $9); }
+ | "for" "(" LexPushInOn ForInStatementInitializer "of" LexPopIn AssignmentExpression ")" Statement { $$ = CYNew CYForOf($4, $7, $9); }
;
ForStatementInitializer
- : ExpressionOpt { $$ = $1; }
- | LexSetRegExp Var_ VariableDeclarationList { $$ = CYNew CYForDeclarations($3); }
- | LexSetRegExp LexicalDeclaration { CYNOT(@$); }
+ : LexSetRegExp EmptyStatement { $$ = $2; }
+ | ExpressionStatement_ ";" { $$ = $1; }
+ | LexSetRegExp VariableStatement_ ";" { $$ = $2; }
+ | LexSetRegExp LexicalDeclaration_ ";" { $$ = $2; }
;
ForInStatementInitializer
: LeftHandSideExpression { $$ = $1; }
- | LexSetRegExp Var_ ForBinding { $$ = $3; }
+ | LexSetRegExp Var_ ForBinding { $$ = CYNew CYForVariable($3); }
| LexSetRegExp ForDeclaration { $$ = $2; }
;
ForDeclaration
- : LetOrConst ForBinding { $$ = $2; }
+ : LetOrConst ForBinding { $$ = CYNew CYForLexical($1, $2); }
;
ForBinding
/* 14.1 Function Definitions {{{ */
FunctionDeclaration
- : ";function" BindingIdentifier "(" FormalParameters ")" BRACE FunctionBody "}" { $$ = CYNew CYFunctionStatement($2, $4, $7); }
+ : ";function" BindingIdentifier "(" FormalParameters ")" BRACE LexPushSuperOff FunctionBody "}" LexPopSuper { $$ = CYNew CYFunctionStatement($2, $4, $8); }
;
FunctionExpression
- : "function" BindingIdentifierOpt "(" LexPushInOff FormalParameters ")" LexPopIn BRACE LexPushInOff FunctionBody "}" LexPopIn { $$ = CYNew CYFunctionExpression($2, $5, $10); }
+ : "function" BindingIdentifierOpt "(" LexPushInOff FormalParameters ")" LexPopIn BRACE LexPushSuperOff LexPushInOff FunctionBody "}" LexPopIn LexPopSuper { $$ = CYNew CYFunctionExpression($2, $5, $11); }
;
StrictFormalParameters
/* }}} */
/* 14.3 Method Definitions {{{ */
MethodDefinition
- : PropertyName "(" StrictFormalParameters ")" BRACE FunctionBody "}" { CYNOT(@$); /* $$ = CYNew CYFunctionMethod($1, $3, $6); */ }
+ : PropertyName "(" StrictFormalParameters ")" BRACE FunctionBody "}" { $$ = CYNew CYPropertyMethod($1, $3, $6); }
| GeneratorMethod { $$ = $1; }
- | "get" PropertyName "(" ")" BRACE FunctionBody "}" { CYNOT(@$); /* $$ = CYNew CYMethodGet($2, $6); */ }
- | "set" PropertyName "(" PropertySetParameterList ")" BRACE FunctionBody "}" { CYNOT(@$); /* $$ = CYNew CYMethodSet($2, $4); */ }
+ | "get" PropertyName "(" ")" BRACE FunctionBody "}" { $$ = CYNew CYPropertyGetter($2, $6); }
+ | "set" PropertyName "(" PropertySetParameterList ")" BRACE FunctionBody "}" { $$ = CYNew CYPropertySetter($2, CYNew CYFunctionParameter($4), $7); }
;
PropertySetParameterList
/* }}} */
/* 14.5 Class Definitions {{{ */
ClassDeclaration
- : ";class" BindingIdentifier ClassTail { CYNOT(@$); }
+ : ";class" BindingIdentifier ClassTail { $$ = CYNew CYClassStatement($2, $3); }
;
ClassExpression
- : "class" BindingIdentifierOpt ClassTail { CYNOT(@$); }
+ : "class" BindingIdentifierOpt ClassTail { $$ = CYNew CYClassExpression($2, $3); }
;
ClassTail
- : ClassHeritageOpt BRACE ClassBodyOpt "}"
+ : ClassHeritageOpt { driver.class_.push($1); } BRACE LexPushSuperOn ClassBodyOpt "}" LexPopSuper { driver.class_.pop(); $$ = $1; }
;
ClassHeritage
- : "extends" LeftHandSideExpression
+ : "extends" LeftHandSideExpression { $$ = CYNew CYClassTail($2); }
;
ClassHeritageOpt
- : ClassHeritage
- |
+ : ClassHeritage { $$ = $1; }
+ | { $$ = CYNew CYClassTail(NULL); }
;
ClassBody
;
ClassElement
- : MethodDefinition
- | "static" MethodDefinition
+ : MethodDefinition { if (CYFunctionExpression *constructor = $1->Constructor()) driver.class_.top()->constructor_ = constructor; else driver.class_.top()->instance_->*$1; }
+ | "static" MethodDefinition { driver.class_.top()->static_->*$2; }
| ";"
;
/* }}} */
| { $$ = NULL; }
;
-ClassFieldListOpt
- : TypedIdentifier ";" ClassFieldListOpt { $$ = CYNew CYClassField($1, $3); }
+ImplementationFieldListOpt
+ : TypedIdentifier ";" ImplementationFieldListOpt { $$ = CYNew CYImplementationField($1, $3); }
| LexSetRegExp { $$ = NULL; }
;
-ClassFields
- : BRACE ClassFieldListOpt "}" { $$ = $2; }
+ImplementationFields
+ : BRACE ImplementationFieldListOpt "}" { $$ = $2; }
;
MessageScope
;
ClassMessageDeclaration
- : MessageScope TypeOpt MessageParameters BRACE FunctionBody "}" { $$ = CYNew CYMessage($1, $2, $3, $5); }
+ : MessageScope TypeOpt MessageParameters BRACE LexPushSuperOn FunctionBody "}" LexPopSuper { $$ = CYNew CYMessage($1, $2, $3, $6); }
;
ClassMessageDeclarationListOpt
| { $$ = NULL; }
;
-ClassName
- : Identifier { $$ = $1; }
- | "(" AssignmentExpression ")" { $$ = $2; }
- ;
-
// XXX: this should be AssignmentExpressionNoRight
ClassProtocols
: ShiftExpression ClassProtocolsOpt { $$ = CYNew CYProtocol($1, $2); }
| { $$ = NULL; }
;
-ClassStatement
- : "@implementation" ClassName ClassSuperOpt ClassProtocolListOpt ClassFields ClassMessageDeclarationListOpt "@end" { $$ = CYNew CYClassStatement($2, $3, $4, $5, $6); }
+ImplementationStatement
+ : "@implementation" Identifier ClassSuperOpt ClassProtocolListOpt ImplementationFields ClassMessageDeclarationListOpt "@end" { $$ = CYNew CYImplementation($2, $3, $4, $5, $6); }
;
CategoryName
;
CategoryStatement
- : "@implementation" ClassName CategoryName ClassMessageDeclarationListOpt "@end" { $$ = CYNew CYCategory($2, $4); }
+ : "@implementation" Identifier CategoryName ClassMessageDeclarationListOpt "@end" { $$ = CYNew CYCategory($2, $4); }
;
Statement__
- : ClassStatement { $$ = $1; }
+ : ImplementationStatement { $$ = $1; }
| CategoryStatement { $$ = $1; }
;
/* }}} */
MessageExpression
: "[" LexPushInOff AssignmentExpression { driver.contexts_.push_back($3); } SelectorList "]" LexPopIn { driver.contexts_.pop_back(); } { $$ = CYNew CYSendDirect($3, $5); }
- | "[" LexPushInOff LexSetRegExp "super" { driver.context_ = NULL; } SelectorList "]" LexPopIn { $$ = CYNew CYSendSuper($6); }
+ | "[" LexPushInOff LexSetRegExp "!super" { driver.context_ = NULL; } SelectorList "]" LexPopIn { $$ = CYNew CYSendSuper($6); }
;
SelectorExpression_
: "for" "each" "(" LexPushInOn ForInStatementInitializer "!in" LexPopIn Expression ")" Statement { $$ = CYNew CYForOf($5, $8, $10); }
;
/* }}} */
-/* JavaScript FTL: let Statements {{{ */
-LetStatement
- : "let" "(" VariableDeclarationList ")" Statement { $$ = CYNew CYLetStatement($3, $5); }
- ;
-
-Statement__
- : LetStatement
- ;
-/* }}} */
/* JavaScript FTW: Array Comprehensions {{{ */
PrimaryExpression