From: Jay Freeman (saurik) Date: Wed, 29 Jan 2014 16:53:25 +0000 (-0800) Subject: Let's reserve # entirely for the pre-processor. X-Git-Tag: v0.9.502~32 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/217246731b8e62c9a6715db96fd0c752c879d7fa?ds=sidebyside Let's reserve # entirely for the pre-processor. --- diff --git a/Cycript.l.in b/Cycript.l.in index 798e354..73721e2 100644 --- a/Cycript.l.in +++ b/Cycript.l.in @@ -193,7 +193,6 @@ XMLName {XMLNameStart}{XMLNamePart}* @begin E4X ObjectiveC "@" L C F(tk::At, hi::Operator); -"#" L C F(tk::Pound, hi::Operator); @end "&" L C F(tk::Ampersand, hi::Operator); diff --git a/Cycript.yy.in b/Cycript.yy.in index 3a31f1e..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 "&" @@ -1665,7 +1664,7 @@ PrimaryExpression /* }}} */ /* Cycript (Objective-C): Instance Literals {{{ */ PrimaryExpression - : "#" NumericLiteral { $$ = CYNew CYInstanceLiteral($2); } + : "^" NumericLiteral { $$ = CYNew CYInstanceLiteral($2); } ; /* }}} */ @end diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index c50f5b7..57bfcc7 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -1087,7 +1087,7 @@ NSObject *CYCopyNSObject(CYPool &pool, JSContextRef context, JSValueRef value) { } - (NSString *) cy$toCYON:(bool)objective { - return [@"#" stringByAppendingString:[[self description] cy$toCYON:true]]; + return [@"^" stringByAppendingString:[[self description] cy$toCYON:true]]; } - (bool) cy$hasProperty:(NSString *)name {