X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/c5587ed74e6cf565bf30da661579e80d78f96e80..2ca4dab349cc3f91032b17ced6b76023b4e67115:/Cycript.l.in diff --git a/Cycript.l.in b/Cycript.l.in index ab5d0b3..417afe3 100644 --- a/Cycript.l.in +++ b/Cycript.l.in @@ -29,7 +29,7 @@ #pragma clang diagnostic ignored "-Wdeprecated-register" #endif -#define YYLTYPE cy::location +#define YYLTYPE CYLocation #include "Cycript.tab.hh" typedef cy::parser::token tk; @@ -80,16 +80,16 @@ typedef cy::parser::token tk; left = yyleng - (nl - yytext) - 1; \ nl = reinterpret_cast(memchr(nl + 1, '\n', left)); \ } while (nl != NULL); \ + yylloc->step(); \ yylloc->end.lines(lines); \ yylloc->end.columns(left); \ - yylloc->step(); \ more \ } else L \ } #define L { \ yylloc->step(); \ - yylloc->columns(yyleng); \ + yylloc->end.columns(yyleng); \ } #define M { \ @@ -418,7 +418,7 @@ XMLName {XMLNameStart}{XMLNamePart}* I(string, String(value, local - value), tk::StringLiteral, hi::Constant); } -\r?\n|\r|\xe2\x80[\xa8\xa9] yylloc->end.lines(); yylloc->step(); N +\r?\n|\r|\xe2\x80[\xa8\xa9] yylloc->step(); yylloc->end.lines(); N [ \t] L