X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/72b2086fb92dfcc524adc4749395c1e06b2594ac..2b1c9594666c525586f1956c064d60ea2e7a0a3b:/Scanner.lpp.in diff --git a/Scanner.lpp.in b/Scanner.lpp.in index 518b6b4..235dc80 100644 --- a/Scanner.lpp.in +++ b/Scanner.lpp.in @@ -184,15 +184,9 @@ static unsigned U(char *&local, const char *text, yy_size_t &i) { I(type, Type(P.strmemdup(yyextra->buffer_.data(), yyextra->buffer_.size()), yyextra->buffer_.size()), value, highlight); \ } while (false) -#define YY_INPUT(data, value, size) { \ - if (yyextra->data_.eof()) \ - value = YY_NULL; \ - else { \ - yyextra->data_.read(data, size); \ - size_t copy(yyextra->data_.gcount()); \ - value = copy == 0 ? YY_NULL : copy; \ - } \ -} +#define YY_INPUT(data, value, size) do { \ + value = yyextra->data_.sgetn(data, size) ?: YY_NULL; \ +} while (false) %} @@ -496,6 +490,7 @@ XMLName {XMLNameStart}{XMLNamePart}* "package" L /*FSS*/ F(tk::_package_, hi::Meta); "private" L /*FSS*/ F(tk::_private_, hi::Meta); "protected" L /*FSS*/ F(tk::_protected_, hi::Meta); +"__proto__" L /*III*/ F(tk::___proto___, hi::Special); "prototype" L /*III*/ F(tk::_prototype_, hi::Special); "public" L /*FSS*/ F(tk::_public_, hi::Meta); "return" L /*KKK*/ F(tk::_return_, hi::Control); @@ -526,6 +521,7 @@ XMLName {XMLNameStart}{XMLNamePart}* @begin C "extern" L F(tk::_extern_, hi::Type); "signed" L F(tk::_signed_, hi::Type); +"struct" L F(tk::_struct_, hi::Meta); "typedef" L F(tk::_typedef_, hi::Meta); "unsigned" L F(tk::_unsigned_, hi::Type); @end