-
Notifications
You must be signed in to change notification settings - Fork 39
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
add regex for bool parsing & test struct w/ bool parsing #169
add regex for bool parsing & test struct w/ bool parsing #169
Conversation
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.
Could you explain what is the problem and how to solve it in the PR description?
We'll use the PR description for commit message.
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Now that I gave it some thought, shouldn't this be the other way around? I.e. isn't parse_struct supposed to invoke parse_ctype on just the type definition, and not parse_ctype running regexp on given string? |
We can revisit it as a separated task. |
parsing (ruby/fiddle#169) GitHub: fix ruby/fiddle#168 Struct parsing invokes "parse_ctype" on the whole member signature, which fails if member type is "bool" due to plain string matching for it. This change updates "bool" type matching to a regexp, so TYPE_BOOL is correctly parsed for a whole signature like "bool toggle" as well as just "bool". --------- ruby/fiddle@71607446d4 Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
parsing (ruby/fiddle#169) GitHub: fix ruby/fiddle#168 Struct parsing invokes "parse_ctype" on the whole member signature, which fails if member type is "bool" due to plain string matching for it. This change updates "bool" type matching to a regexp, so TYPE_BOOL is correctly parsed for a whole signature like "bool toggle" as well as just "bool". --------- ruby/fiddle@71607446d4 Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
parsing (ruby/fiddle#169) GitHub: fix ruby/fiddle#168 Struct parsing invokes "parse_ctype" on the whole member signature, which fails if member type is "bool" due to plain string matching for it. This change updates "bool" type matching to a regexp, so TYPE_BOOL is correctly parsed for a whole signature like "bool toggle" as well as just "bool". --------- ruby/fiddle@71607446d4 Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
GitHub: fix GH-168
Struct parsing invokes "parse_ctype" on the whole member signature, which fails if member type is "bool" due to plain string matching for it. This change updates "bool" type matching to a regexp, so TYPE_BOOL is correctly parsed for a whole signature like "bool toggle" as well as just "bool".