X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/3fe283c53edc2a98d0164d893a4a667245da8e78..fc44232bcff15a35c016ddfc1dc34b6503125020:/Cycript.yy.in diff --git a/Cycript.yy.in b/Cycript.yy.in index c8a1862..2c8125e 100644 --- a/Cycript.yy.in +++ b/Cycript.yy.in @@ -161,7 +161,6 @@ int cylex(YYSTYPE *, cy::location *, void *); @begin E4X ObjectiveC %token At "@" -%token Pound "#" @end %token Ampersand "&" @@ -1054,11 +1053,11 @@ AssignmentExpression /* 11.14 Comma Operator {{{ */ Expression_ : "," Expression { $$ = $2; } - | { $$ = CYNew CYCompound(); } + | { $$ = NULL; } ; Expression - : AssignmentExpression Expression_ { $2->AddPrev($1); $$ = $2; } + : AssignmentExpression Expression_ { $$ = CYNew CYCompound($1, $2); } ; ExpressionOpt @@ -1449,7 +1448,7 @@ IntegerType IntegerTypeOpt : IntegerType { $$ = $1; } - | + | { $$ = CYNew CYTypeVariable("int"); } ; PrimitiveType @@ -1470,7 +1469,7 @@ EncodedType ; PrimaryExpression - : AtEncode "(" EncodedType ")" { $$ = $3; } + : "@encode" "(" EncodedType ")" { $$ = $3; } ; /* }}} */ /* Cycript (Objective-C): @class Declaration {{{ */ @@ -1481,7 +1480,7 @@ ClassSuperOpt ; ClassFieldListOpt - : Expression Identifier ";" ClassFieldListOpt { $$ = CYNew CYField($1, $2, $4); } + : TypedIdentifier ";" ClassFieldListOpt { $$ = CYNew CYField($1, $3); } | LexSetRegExp { $$ = NULL; } ; @@ -1665,7 +1664,7 @@ PrimaryExpression /* }}} */ /* Cycript (Objective-C): Instance Literals {{{ */ PrimaryExpression - : "#" NumericLiteral { $$ = CYNew CYInstanceLiteral($2); } + : "^" NumericLiteral { $$ = CYNew CYInstanceLiteral($2); } ; /* }}} */ @end