Skip to content
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

Prism::StringQuery #3178

Merged
merged 1 commit into from
Oct 11, 2024
Merged

Prism::StringQuery #3178

merged 1 commit into from
Oct 11, 2024

Conversation

kddnewton
Copy link
Collaborator

Introduce StringQuery to provide methods to access some metadata about the Ruby lexer.

@kddnewton kddnewton force-pushed the string-query branch 4 times, most recently from 1c3e481 to 65cd2be Compare October 11, 2024 19:19
Introduce StringQuery to provide methods to access some metadata
about the Ruby lexer.
@kddnewton kddnewton merged commit 3142fed into main Oct 11, 2024
54 checks passed
@kddnewton kddnewton deleted the string-query branch October 11, 2024 19:34
return Qfalse;
case PM_STRING_QUERY_TRUE:
return Qtrue;
}
Copy link
Member

Choose a reason for hiding this comment

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

-Wreturn-type warns this:

../prism/extension.c: In function ‘string_query’:
../prism/extension.c:1156:1: warning: control reaches end of non-void function [-Wreturn-type]
 1156 | }
      | ^

But I'm not sure how you'd like to fix this. Should it be default: rb_bug("unreachable");?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahh sorry about that, @S-H-GAMELINKS fixed this in a follow-up PR. But yeah, it should be unreachable, I'm not sure why the compiler can't figure out that the enum is exhaustive.

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