From 74f8a88bcf8b2c86b7205bee1ae5ee9455b2b323 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Thu, 6 Aug 2020 14:20:10 +0200 Subject: Fixed issue that could cause wrong line numbers --- src/scanner.l | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scanner.l b/src/scanner.l index e63b8a0..7c710fa 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -5629,6 +5629,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } } {B}*"{"{B}* { + yyextra->current->program.resize(0); yyextra->current->fileName = yyextra->yyFileName ; yyextra->current->bodyLine = yyextra->yyLineNr; yyextra->current->bodyColumn = yyextra->yyColNr; @@ -5880,7 +5881,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) BEGIN(BasesProt); } } -{B}*"{"{B}* { yyextra->current->fileName = yyextra->yyFileName ; +{B}*"{"{B}* { + yyextra->current->program.resize(0); + yyextra->current->fileName = yyextra->yyFileName ; yyextra->current->bodyLine = yyextra->yyLineNr; yyextra->current->bodyColumn = yyextra->yyColNr; yyextra->current->name = removeRedundantWhiteSpace(yyextra->current->name); -- cgit v0.12