]> git.saurik.com Git - cycript.git/commitdiff
Support Unicode line ends in single-line comments.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 16 Dec 2015 00:26:56 +0000 (16:26 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 16 Dec 2015 00:26:56 +0000 (16:26 -0800)
Scanner.lpp.in

index 5773c8944065c082e84a0fef57b01594e9477a7f..2a858c1739b43d7d394343f8cdadefc06d6495d3 100644 (file)
@@ -303,8 +303,10 @@ XMLName {XMLNameStart}{XMLNamePart}*
 }
     /* }}} */
     /* Comment {{{ */
-#![^\n]* L M
-\/\/[^\n]* L M
+    /* XXX: maybe fold LineTerminatorSequence into these definitions */
+#!{NoneTerminatorCharacter}* L M
+\/\/{NoneTerminatorCharacter}* L M
+(#!|\/\/){NoneTerminatorCharacter}*{UnicodeError} L E("invalid character");
 
 \/\* L yy_push_state(MultiLine, yyscanner);