X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/2fad14e52c8cde8c45003a2ebb6907a57ca380e4..2c4a8bb6222b88ff96fbf25372179646ce15f706:/Scanner.lpp.in diff --git a/Scanner.lpp.in b/Scanner.lpp.in index b0def8d..dc8a3dd 100644 --- a/Scanner.lpp.in +++ b/Scanner.lpp.in @@ -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 {{{ */ @@ -345,7 +345,6 @@ XMLName {XMLNameStart}{XMLNamePart}* @begin E4X ObjectiveC "@" L F(tk::At, hi::Operator); -"#" L F(tk::Pound, hi::Operator); @end "&" L F(tk::Ampersand, hi::Operator); @@ -371,6 +370,7 @@ XMLName {XMLNameStart}{XMLNamePart}* "%" L F(tk::Percent, hi::Operator); "%=" L F(tk::PercentEqual, hi::Operator); "." L F(tk::Period, hi::Operator); +"?." L F(tk::QuestionPeriod, hi::Operator); "|" L F(tk::Pipe, hi::Operator); "|=" L F(tk::PipeEqual, hi::Operator); "||" L F(tk::PipePipe, hi::Operator); @@ -395,6 +395,7 @@ XMLName {XMLNameStart}{XMLNamePart}* "," 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 +483,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); @@ -494,8 +496,6 @@ XMLName {XMLNameStart}{XMLNamePart}* "__proto__" L /*III*/ F(tk::___proto___, hi::Special); "prototype" L /*III*/ F(tk::_prototype_, hi::Special); "public" L /*FSS*/ F(tk::_public_, hi::Meta); -"__restrict" L /*III*/ F(tk::___restrict_, hi::Meta); -"restrict" L /*III*/ F(tk::_restrict_, hi::Meta); "return" L /*KKK*/ F(tk::_return_, hi::Control); "set" L /*III*/ F(tk::_set_, hi::Meta); "short" L /*FII*/ F(tk::_short_, hi::Type); @@ -605,8 +605,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 {{{ */