Skip to content

dart2js: please validate positions #3675

Closed
@peter-ahe-google

Description

@peter-ahe-google

We should add an assertion that ensures that all tokens are found between the begin and end token of the current element.

The current API is quite subtle and requires compiler engineers to be very careful about calling Compiler.withCurrentElement when reporting an error on an element that is being inlined. So it is easy to forget that.

Also, as some tokens are synthesized by the parser, we should probably record the original token in synthesized tokens. This will make the proposed validation easier to implement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requesttype-code-healthInternal changes to our tools and workflows to make them cleaner, simpler, or more maintainableweb-dart2js

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions