Skip to content

Conversation

@juleswritescode
Copy link
Collaborator

Splitter Context: If we expect a following keyword, but the next token is EOF, we'd push the expectation error onto the EOF token.

That EOF token is the last token in the kind vector, so i == kind.len() - 1, so self.start[i+1] would error:

Screenshot 2025-09-26 at 11 41 39 Screenshot 2025-09-26 at 11 38 25

To solve this case, we'll push the expectation error on the last token before EOF.

Copy link
Collaborator

@psteinroe psteinroe left a comment

Choose a reason for hiding this comment

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

oh wow, great catch!

@juleswritescode juleswritescode merged commit 21ce254 into main Sep 26, 2025
8 checks passed
@juleswritescode juleswritescode deleted the fix/#536 branch October 28, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants