Commit 3f7d3de8 authored by Noric Couderc's avatar Noric Couderc
Browse files

Fixed the printing of line locations

Some inconsistencies in how the line numbers were saved.
parent 71383ddf
......@@ -40,13 +40,13 @@
{
String text = yytext();
Long data = Long.parseLong(text);
return new beaver.Symbol(Terminals.INTEGER_LITERAL, yyline, yycolumn, yylength(), data);
return new beaver.Symbol(Terminals.INTEGER_LITERAL, yyline + 1, yycolumn + 1, yylength(), data);
}
{HexLiteral}
{
String text = yytext();
Long data = Long.parseLong(text.substring(2), 16);
return new beaver.Symbol(Terminals.INTEGER_LITERAL, yyline, yycolumn, yylength(), data);
return new beaver.Symbol(Terminals.INTEGER_LITERAL, yyline + 1, yycolumn + 1, yylength(), data);
}
{StringLiteral}
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment