Skip to content

Add a special diagnostic for when the parser is not making progress in loops #39331

@RikkiGibson

Description

@RikkiGibson

See IsMakingProgress(ref int):

protected bool IsMakingProgress(ref int lastTokenPosition)

This method Debug.Asserts so that we know there's an infinite loop bug in the parser in debug mode. In release mode, it just returns 'false' so that the related loop terminates and compilation finishes (expected to finish with syntax errors.)

I think we should consider making it so this method also adds a special diagnostic which requests the user to report an issue, so that when users inadvertently put the parser into an unexpected no-progress state, we can find out about it and address any underlying issues.

/cc @jcouv

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions