Skip to content

Conversation

kitbellew
Copy link
Collaborator

@kitbellew kitbellew commented Jul 19, 2024

Addresses proposal mentioned in #3813.

@kitbellew kitbellew changed the title LegacyToken: add Invalid, capture tokenize errors Tokenizers: don't throw, report errors as a new Invalid token Jul 21, 2024
@kitbellew kitbellew force-pushed the 3813_10 branch 2 times, most recently from 52c6a88 to 644179d Compare July 24, 2024 15:10
@kitbellew kitbellew requested a review from tgodzik July 24, 2024 15:35
Copy link
Collaborator

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! Should be super useful!

case TRUE => Token.KwTrue(input, dialect, curr.offset)
case FALSE => Token.KwFalse(input, dialect, curr.offset)
case NULL => Token.KwNull(input, dialect, curr.offset)

case INTERPOLATIONID => Token.Interpolation
.Id(input, dialect, curr.offset, curr.endOffset, curr.strVal)
case XMLLIT => getXmlPart(curr)
case XMLLITEND => unreachable
// case XMLLITEND => unreachable
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// case XMLLITEND => unreachable

and also other below?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean to remove the lines completely? i kept them to indicate that these particular tokens should not be obtained via this method, and it's not an oversight they are not here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just add a comment for all those at the end? It's fine either way

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants