Permalink
Browse files

- fixed script line numbers after multi-line raw string literal

  • Loading branch information...
alexey-lysiuk authored and coelckers committed Jan 11, 2019
1 parent 731fe67 commit e0826726ba7558543c89cde8124152bc2c60c22f
Showing with 9 additions and 2 deletions.
  1. +9 −2 src/sc_man_scanner.re
@@ -93,7 +93,7 @@ std2:
("#region"|"#endregion") (any\"\n")* "\n"
{ goto newline; } /* Region blocks [mxd] */

(["](([\\]["])|[^"])*["]) { RET(TK_StringConst); }
(["](([\\]["])|[^"])*["]) { goto string_const; }
'stop' { RET(TK_Stop); }
'wait' { RET(TK_Wait); }
'fail' { RET(TK_Fail); }
@@ -234,7 +234,7 @@ std2:
{ RET(TK_FloatConst); }

(["](([\\]["])|[^"])*["])
{ RET(TK_StringConst); }
{ goto string_const; }

(['] (any\[\n'])* ['])
{ RET(TK_NameConst); }
@@ -465,6 +465,13 @@ normal_token:
return_val = true;
goto end;
string_const:
for (const char *c = tok; c < YYCURSOR; ++c)
{
if (*c == '\n') ++Line;
}
RET(TK_StringConst);
string:
if (YYLIMIT != ScriptEndPtr)
{

0 comments on commit e082672

Please sign in to comment.