Fixed AS3 - line numbering on pushback string on regexp

This commit is contained in:
Jindra Petřík
2023-01-13 22:09:22 +01:00
parent 50910f57d1
commit 07e94aea45
3 changed files with 8 additions and 1 deletions

View File

@@ -45,9 +45,12 @@ import java.math.BigInteger;
public void yypushbackstr(String s, int state)
{
int numLines = count(s, "\n");
int newYyline = yyline - numLines;
sourceCode = s + sourceCode.substring(yychar + yylength());
yyreset(new StringReader(sourceCode));
yybegin(state);
yyline = newYyline;
}
public void yypushbackstr(String s)