]> git.saurik.com Git - cycript.git/commitdiff
The nice thing about # is its similar density to @.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 11 Mar 2014 23:35:13 +0000 (16:35 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 11 Mar 2014 23:35:13 +0000 (16:35 -0700)
Cycript.l.in
Cycript.yy.in
ObjectiveC/Library.mm

index 7eb9d11c91d2905157d56a86bac23134d82ac1fe..cbe4fe5c354229fd5ec569d676cea3fdc5003a7e 100644 (file)
@@ -196,6 +196,7 @@ 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 2c8125ea37c1a0d663f4968f62082dfbc1ac1af5..3a31f1ebbe797f220e5cf17bb7123ecc846eb4fb 100644 (file)
@@ -161,6 +161,7 @@ int cylex(YYSTYPE *, cy::location *, void *);
 
 @begin E4X ObjectiveC
 %token At "@"
+%token Pound "#"
 @end
 
 %token Ampersand "&"
@@ -1664,7 +1665,7 @@ PrimaryExpression
 /* }}} */
 /* Cycript (Objective-C): Instance Literals {{{ */
 PrimaryExpression
-    : "^" NumericLiteral { $$ = CYNew CYInstanceLiteral($2); }
+    : "#" NumericLiteral { $$ = CYNew CYInstanceLiteral($2); }
     ;
 /* }}} */
 @end
index b707a906a929256bec9200e2bc65b6185585900f..b7d23efc742fd201932e3b32773279a53d1b6e60 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 {