Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Issue: Cascading Errors in IronPython Parser #1974

Copy link
Copy link
@nagu1137

Description

@nagu1137
Issue body actions

When parsing Python scripts using IronPython’s parser, we observe that a single syntax error (such as a missing quote in a print() statement) sometimes causes multiple errorrx. Instead of reporting only the actual error line, the parser marks all subsequent statements as erroneous. This cascading error behavior is inconsistent and seems to occur mostly with statements involving parentheses or quotation marks (e.g., print(),write(),sys.stdout.write("Hello ") etc).

using (IronPython.Compiler.Parser parser = IronPython.Compiler.Parser.CreateParser(context, new PythonOptions()))

Observed Behavior
A single syntax error (e.g., missing quote in print("Hello)) causes error highlights on all subsequent lines.
This does not happen for all types of syntax errors.
The issue is most frequent with print() .stdout.write("Hello " ,etc statements and string literals.

Expected Behavior
Only the actual error line should be highlighted.
The parser should recover gracefully and not cascade errors to subsequent lines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.