]> git.saurik.com Git - cycript.git/blobdiff - Scanner.lpp.in
Also use CXType walker to for function prototypes.
[cycript.git] / Scanner.lpp.in
index 7df83885fd9e822c1d81770e0915f9088552c0ea..d9614df0b2c5c4e316d1cf123abfecb46e9dae0d 100644 (file)
@@ -1,5 +1,5 @@
-/* Cycript - Optimizing JavaScript Compiler/Runtime
- * Copyright (C) 2009-2015  Jay Freeman (saurik)
+/* Cycript - The Truly Universal Scripting Language
+ * Copyright (C) 2009-2016  Jay Freeman (saurik)
 */
 
 /* GNU Affero General Public License, Version 3 {{{ */
@@ -340,13 +340,11 @@ XMLName {XMLNameStart}{XMLNamePart}*
 ".."   L E("invalid operator")
 
 @begin E4X
-"::"   L F(tk::ColonColon, hi::Operator);
 ".."   L F(tk::PeriodPeriod, hi::Operator);
 @end
 
 @begin E4X ObjectiveC
 "@"    L F(tk::At, hi::Operator);
-"#"    L F(tk::Pound, hi::Operator);
 @end
 
 "&"    L F(tk::Ampersand, hi::Operator);
@@ -392,9 +390,11 @@ XMLName {XMLNameStart}{XMLNamePart}*
 "/=" L F(tk::SlashEqual, hi::Operator);
 
 ":"    L F(tk::Colon, hi::Structure);
+"::"   L F(tk::ColonColon, hi::Structure);
 ","    L F(tk::Comma, hi::Structure);
 "?"    L F(tk::Question, hi::Structure);
 ";"    L F(tk::SemiColon, hi::Structure);
+"#"    L F(tk::Pound, hi::Operator);
 
 "("    L F(tk::OpenParen, hi::Structure);
 ")"    L F(tk::CloseParen, hi::Structure);
@@ -482,6 +482,7 @@ XMLName {XMLNameStart}{XMLNamePart}*
 "Infinity"        L /*III*/ F(tk::_Infinity_, hi::Constant);
 "instanceof"      L /*KKK*/ F(tk::_instanceof_, hi::Operator);
 "int"             L /*FII*/ F(tk::_int_, hi::Type);
+"__int128"        L /*III*/ F(tk::___int128_, hi::Type);
 "interface"       L /*FSS*/ F(tk::_interface_, hi::Meta);
 "let"             L /*IS?*/ F(tk::_let_, hi::Meta);
 "long"            L /*FII*/ F(tk::_long_, hi::Type);
@@ -510,6 +511,7 @@ XMLName {XMLNameStart}{XMLNamePart}*
 "transient"       L /*FII*/ F(tk::_transient_, hi::Meta);
 "true"            L /*LLL*/ F(tk::_true_, hi::Constant);
 "try"             L /*KKK*/ F(tk::_try_, hi::Control);
+"typeid"          L /*III*/ F(tk::_typeid_, hi::Operator);
 "typeof"          L /*KKK*/ F(tk::_typeof_, hi::Operator);
 "var"             L /*KKK*/ F(tk::_var_, hi::Meta);
 "void"            L /*KKK*/ F(tk::_void_, hi::Operator);
@@ -604,8 +606,10 @@ XMLName {XMLNameStart}{XMLNamePart}*
     "$" R CYLexBufferUnit('$');
 
     {PlateCharacter}+ R CYLexBufferUnits(yytext, yyleng);
-    {PlateCharacter}*{LineTerminatorSequence} R E("invalid newline");
     {PlateCharacter}*{UnicodeScrap} R E("invalid character");
+
+    {PlateCharacter}*{LineTerminatorSequence} yylloc->end.Lines(); CYLexBufferUnits(yytext, yyleng);
+    \\{LineTerminatorSequence} yylloc->end.Lines();
 }
     /* }}} */
     /* Escapes {{{ */