You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
Normally, when the ANTLR runtime encounters a parse error, it attempts to recover by removing tokens from the token stream until it finds a token that satisfies the current or enclosing context.
However, in our case, it seems that Wist is unable to recover from a parse error because it makes the assumption that the enclosing scope is always a componentContext or componentHeadContext. These are always followed by EOF which means that the runtime will continue to remove tokens from the stream until the end of the file.
It seems that the solution is to remove the component rule as well as the componentBody rule from componentHeadElement.
The text was updated successfully, but these errors were encountered:
nishtahir
changed the title
Grammar parse error prevents recovery on parse error
Grammar does not recover correctly on parse error
May 22, 2018
Looks like this was solved by removing componendBody from componentHead
#82
The result is that the parser doesn't bail out on the first error now.
The linter is now usable in its current state.
Looks like this was solved by removing componendBody from componentHead
#82
The result is that the parser doesn't bail out on the first error now.
The linter is now usable in its current state.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Normally, when the ANTLR runtime encounters a parse error, it attempts to recover by removing tokens from the token stream until it finds a token that satisfies the current or enclosing context.
However, in our case, it seems that Wist is unable to recover from a parse error because it makes the assumption that the enclosing scope is always a
componentContext
orcomponentHeadContext
. These are always followed byEOF
which means that the runtime will continue to remove tokens from the stream until the end of the file.It seems that the solution is to remove the
component
rule as well as thecomponentBody
rule fromcomponentHeadElement
.The text was updated successfully, but these errors were encountered: