X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/032131d5afeca86ad9d94d9bd7e4f299d06906b1..6244bca0d4d6048c9c27e501648dbc955882d7cf:/Scanner.lpp.in?ds=sidebyside diff --git a/Scanner.lpp.in b/Scanner.lpp.in index 2a858c1..399feb8 100644 --- a/Scanner.lpp.in +++ b/Scanner.lpp.in @@ -47,9 +47,6 @@ typedef cy::parser::token tk; #define YY_EXTRA_TYPE CYDriver * #define F(value, highlight) do { \ - yyextra->newline_ = yyextra->last_; \ - yyextra->last_ = false; \ - yyextra->next_ = false; \ BEGIN(yyextra->template_.top() ? DivOrTemplateTail : Div); \ yylval->highlight_ = highlight; \ return value; \ @@ -72,7 +69,7 @@ typedef cy::parser::token tk; } while (false) #define N \ - if (yyextra->last_ && yyextra->next_) { \ + if (yyextra->last_) { \ yyextra->last_ = false; \ F(tk::NewLine, hi::Nothing); \ } @@ -366,13 +363,13 @@ XMLName {XMLNameStart}{XMLNamePart}* "=" L F(tk::Equal, hi::Operator); "==" L F(tk::EqualEqual, hi::Operator); "===" L F(tk::EqualEqualEqual, hi::Operator); -"=>" L F(yyextra->newline_ ? tk::EqualRight_ : tk::EqualRight, hi::Operator); +"=>" L F(tk::EqualRight, hi::Operator); "!" L F(tk::Exclamation, hi::Operator); "!=" L F(tk::ExclamationEqual, hi::Operator); "!==" L F(tk::ExclamationEqualEqual, hi::Operator); "-" L F(tk::Hyphen, hi::Operator); "-=" L F(tk::HyphenEqual, hi::Operator); -"--" L F(yyextra->newline_ ? tk::HyphenHyphen_ : tk::HyphenHyphen, hi::Operator); +"--" L F(tk::HyphenHyphen, hi::Operator); "->" L F(tk::HyphenRight, hi::Operator); "<" L F(tk::Left, hi::Operator); "<=" L F(tk::LeftEqual, hi::Operator); @@ -386,7 +383,7 @@ XMLName {XMLNameStart}{XMLNamePart}* "||" L F(tk::PipePipe, hi::Operator); "+" L F(tk::Plus, hi::Operator); "+=" L F(tk::PlusEqual, hi::Operator); -"++" L F(yyextra->newline_ ? tk::PlusPlus_ : tk::PlusPlus, hi::Operator); +"++" L F(tk::PlusPlus, hi::Operator); ">" L F(tk::Right, hi::Operator); ">=" L F(tk::RightEqual, hi::Operator); ">>" L F(tk::RightRight, hi::Operator); @@ -408,7 +405,7 @@ XMLName {XMLNameStart}{XMLNamePart}* "(" L F(tk::OpenParen, hi::Structure); ")" L F(tk::CloseParen, hi::Structure); -"{" L yyextra->template_.push(false); F(yyextra->newline_ ? tk::OpenBrace_ : tk::OpenBrace, hi::Structure); +"{" L yyextra->template_.push(false); F(tk::OpenBrace, hi::Structure);