-
-
Notifications
You must be signed in to change notification settings - Fork 71
C: Use hb_string_T in lexer_peek_helpers.c
#656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C: Use hb_string_T in lexer_peek_helpers.c
#656
Conversation
ff80bda to
6218970
Compare
marcoroth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request @timkaechele!
I'm struggling to see the motivation for this migration here. Is this so we more consistently use hb_string_T over char*, or is there something else I'm missing?
Mostly for consistency, and because I think we can later refactor the |
ededbc1 to
ac8181f
Compare
| hb_string_T remaining_source = hb_string_slice(lexer->source, lexer->current_position + offset); | ||
| remaining_source.length = MIN(pattern.length, remaining_source.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this is elegant! 😍
marcoroth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @timkaechele! 🙌🏼
dcc7e9e to
004212f
Compare
hb_string_T in lexer peek helperhb_string_T in lexer_peek_helpers.c
This PR migrates the lexer peek helper interfaces to use `hb_string_T` instead of null terminated strings.
This PR migrates the lexer peek helper interfaces to use
hb_string_Tinstead of null terminated strings.