]> git.saurik.com Git - cycript.git/blobdiff - Cycript.l.in
Avoid error caused by passing -pthread to libtool.
[cycript.git] / Cycript.l.in
index ab5d0b3882dbf02e8a208de2ad63a197005b554b..417afe3ecd7624f081ef66f5d884ff96e5cf3d80 100644 (file)
@@ -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<const char *>(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