Skip to content

Conversation

@xtay2
Copy link
Contributor

@xtay2 xtay2 commented Jan 3, 2024

Both the tokenizer and the parser frequently check if the next peeked token exists and equals some expected value.

I added two utility functions that should improve the readability.

Copy link

@edy131109 edy131109 left a comment

Choose a reason for hiding this comment

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

Great code but in tokenization.hpp please don't replace the peek().value() == '' with the expect function because we already know that the peek() has a value from the upper statement and that just makes the code slower.

@johnnycharlesw
Copy link

This looks like a good upgrade to the Hydrogen language, I have not seen one in a while...do you want to merge it, @orosmatthew>

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.

3 participants