%type <expression_> FunctionExpression
%type <identifier_> Identifier
%type <identifier_> IdentifierOpt
+%type <word_> IdentifierName
%type <comprehension_> IfComprehension
%type <statement_> IfStatement
%type <expression_> Initialiser
%type <declarations_> VariableDeclarationList
%type <statement_> VariableStatement
%type <statement_> WithStatement
+%type <word_> Word
+%type <word_> WordOpt
@begin ObjectiveC
%type <statement_> CategoryStatement
%type <word_> SelectorWordOpt
%type <expression_> TypeOpt
%type <argument_> VariadicCall
-%type <word_> Word
-%type <word_> WordOpt
@end
@begin E4X
|
;*/
-@begin ObjectiveC
NewLineOpt
: "\n"
|
;
+IdentifierName
+ : Word { $$ = $1; }
+ ;
+
Word
: Identifier { $$ = $1; }
| "break" NewLineOpt { $$ = $1; }
| "if" { $$ = $1; }
| "import" { $$ = $1; }
/* XXX: | "in" { $$ = $1; } */
+ | "!in" { $$ = $1; }
/* XXX: | "instanceof" { $$ = $1; } */
// XXX: as it currently is not an Identifier
| { $$ = NULL; }
;
+@begin ObjectiveC
PrimaryExpression
: "@" LiteralNoRE { $$ = CYNew CYBox($2); }
| "@" ArrayLiteral { $$ = CYNew CYBox($2); }
;
PropertyName_
- : Identifier { $$ = $1; }
+ : IdentifierName { $$ = $1; }
| StringLiteral { $$ = $1; }
| NumericLiteral { $$ = $1; }
;