Skip to content

Remove dependency on desugarer from core/ForkMergeParser.java #162

@paulgazz

Description

@paulgazz

Currently, the parser has a dependency on superc.cdesugarer.CContext for some static state in that class. The core/ directory is grammar-independent and the grammars depend on it creating a circular dependency. Using static state also breaks idempotency of the desugarer.

This can be improved by collecting parser error conditions as an instance field on the parser itself (when enabled by a set...() method, e.g., setNewErrorHandling()), and having the desugarer query the parser instance's state instead.

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