{{ message }}
Repository navigation
Conversation
added 5 commits
April 6, 2020 21:38
This reverts commit 1390079.
Contributor
rhendric
requested changes
Sep 2, 2020
rhendric
left a comment
Member
There was a problem hiding this comment.
I like the overall approach; I think this will be an easy PR to land once you add a few tests per @hdgarrood's comment.
| | ErrQualifiedName | ||
| | ErrEmptyDo | ||
| | ErrLexeme (Maybe String) [String] | ||
| | ErrQualifierLexeme Char |
Member
There was a problem hiding this comment.
By analogy with ErrImportInDecl, ErrTypeInConstraint, etc., should this be ErrLexemeInQualified?
Member
There was a problem hiding this comment.
Don't you mean ‘expected identifier or operator’ instead of ‘expected qualifier’? The qualifier has already been seen at this point in the parse, right?
Also, it looks like the other error messages of this nature follow an ‘Expected X, saw Y’ pattern; I'd expect these messages to match that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This intends to close #3801 . See issue for motivation/some discussion.
This PR adds a new lex error for when an unexpected character is encountered when tokenizing a qualified identifier.
My hope is that this indicates that the error is likely caused by a missing identifier, whereas the old error said "Illegal whitespace".
I'm not sure how useful it is to print out the unexpected whitespace character - I'm willing to remove that if others agree.
I'm not sure if parser tests exist/where they are, but if there's a useful way of writing a test for this, I'd be happy to add it if someone points me in the right direction.