]> git.saurik.com Git - cycript.git/commitdiff
Let's reserve # entirely for the pre-processor.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 29 Jan 2014 16:53:25 +0000 (08:53 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 29 Jan 2014 16:53:25 +0000 (08:53 -0800)
Cycript.l.in
Cycript.yy.in
ObjectiveC/Library.mm

index 798e35458c1be1a95fb42c0995e6c8bf367686a9..73721e27ccf7c56a67c3e27a59a16fb357975224 100644 (file)
@@ -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);
index 3a31f1ebbe797f220e5cf17bb7123ecc846eb4fb..2c8125ea37c1a0d663f4968f62082dfbc1ac1af5 100644 (file)
@@ -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
index c50f5b78f5ecdbb83bb3bd954602f4391c2008ca..57bfcc7d9cee8eb0272edd41b8790b185deb4bf1 100644 (file)
@@ -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 {