Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump line number after syntax errors #3270

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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