X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/b3aa25d897b2ce3672a306f238c053467fb23df5..e7ff015817107dbac9373c19ce851178e4f3c791:/Cycript.yy.in diff --git a/Cycript.yy.in b/Cycript.yy.in index 983802f..5a35dd7 100644 --- a/Cycript.yy.in +++ b/Cycript.yy.in @@ -160,6 +160,7 @@ int cylex(YYSTYPE *, cy::location *, void *); @begin E4X ObjectiveC %token At "@" +%token Pound "#" @end %token Ampersand "&" @@ -1018,6 +1019,7 @@ LogicalORExpression ConditionalExpression : LogicalORExpression { $$ = $1; } | LogicalORExpression "?" LexPushInOff AssignmentExpression ":" LexPopIn AssignmentExpression { $$ = CYNew CYCondition($1, $4, $7); } + | LogicalORExpression "?" LexPushInOff LexSetRegExp ":" LexPopIn AssignmentExpression { $$ = CYNew CYCondition($1, $1, $7); } ; /* }}} */ /* 11.13 Assignment Operators {{{ */ @@ -1632,6 +1634,11 @@ PrimaryExpression : "^" ModifiedType "(" LexPushInOff TypedParameterListOpt ")" LexPopIn BRACE LexPushInOff FunctionBody "}" LexPopIn { $$ = CYNew CYObjCBlock($2, $5, $10); } ; /* }}} */ +/* Cycript (Objective-C): Instance Literals {{{ */ +PrimaryExpression + : "#" NumericLiteral { $$ = CYNew CYInstanceLiteral($2); } + ; +/* }}} */ @end @begin C