Skip to content

Commit

Permalink
Merge pull request #3270 from d-torrance/bump-line-number
Browse files Browse the repository at this point in the history
Bump line number after syntax errors
  • Loading branch information
DanGrayson authored Jun 5, 2024
2 parents c0fe52c + 53af2ae commit da09945
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions M2/Macaulay2/d/interp.dd
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ readeval4(file:TokenFile,printout:bool,dictionary:Dictionary,returnLastvalue:boo
if fileError(file) then return buildErrorPacket(fileErrorMessage(file));
if stopIfError || returnIfError then return buildErrorPacket("--backtrace: token read error--");
if isatty(file) || file.posFile.file.fulllines then flushToken(file);
file.posFile.line = file.posFile.line + 1;
file.posFile.column = ushort(0);
)
)
else (
Expand Down Expand Up @@ -142,6 +144,8 @@ readeval4(file:TokenFile,printout:bool,dictionary:Dictionary,returnLastvalue:boo
if debugLevel == 123 then stderr << "-- error during parsing" << endl;
if fileError(file) then return buildErrorPacket(fileErrorMessage(file));
if stopIfError || returnIfError then return buildErrorPacket("--backtrace: parse error--");
file.posFile.line = file.posFile.line + 1;
file.posFile.column = ushort(0);
);
)
else (
Expand Down

0 comments on commit da09945

Please sign in to comment.