]> git.saurik.com Git - cycript.git/blobdiff - Cycript.l
Picked some minor nits.
[cycript.git] / Cycript.l
index 08b7cd5e97504268e3a300e1d48f0eee6187718b..6e2a78044f1dd687315b3744652b6ad46c4fb4fb 100644 (file)
--- a/Cycript.l
+++ b/Cycript.l
@@ -1,12 +1,14 @@
 %{
 #include "Cycript.tab.hh"
 typedef cy::parser::token tk;
+
 #define YY_EXTRA_TYPE CYDriver *
+#define YYLTYPE cy::location
 
 #define T yylval->newline_ = yyextra->state_ == CYNewLine;
 #define C T yyextra->state_ = CYClear;
 #define R T yyextra->state_ = CYRestricted;
-#define N { bool restricted(yyextra->state_ == CYRestricted); if (restricted) { yyextra->state_ = CYClear; return tk::NewLine; } else yyextra->state_ = CYNewLine; }
+#define N if (yyextra->state_ != CYNewLine) { bool restricted(yyextra->state_ == CYRestricted); if (restricted) { yyextra->state_ = CYClear; return tk::NewLine; } else yyextra->state_ = CYNewLine; }
 %}
 
 %option prefix="cy"