Skip to content

Commit 9e84301

Browse files
committed
try harder to get the right line numbers
1 parent 2ae29cc commit 9e84301

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

frontends/basic/basiclang.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,9 @@ doBasicTransform(AST **astptr, bool transformFuncall)
10151015
AST *seq = NULL;
10161016
AST *lineptr = NULL;
10171017
AST *read_lineptr;
1018+
ASTReportInfo saveinfo;
10181019

1020+
AstReportAs(ast, &saveinfo);
10191021
if (handle) {
10201022
lineptr = AstTempLocalVariable("_tmp_", ast_type_string);
10211023
read_lineptr = AstAssign(lineptr,
@@ -1045,6 +1047,7 @@ doBasicTransform(AST **astptr, bool transformFuncall)
10451047
}
10461048
}
10471049
*astptr = ast = seq;
1050+
AstReportDone(&saveinfo);
10481051
}
10491052
break;
10501053
case AST_PRINT:

0 commit comments

Comments
 (0)