-
Notifications
You must be signed in to change notification settings - Fork 204
Capture delimiter in percent encoded literals #7
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
Conversation
|
This commit includes some other stuff, will redo it, sorry for the noise. |
|
Fixed, should not result in coverage decrease! |
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.
Parser follows the GitHub style guide, which instructs to never use and and or.
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.
Also, #end_with? is much more clear in this case.
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.
Not only it is more clear, it also fixes a bug :)
1) Failure:
TestLexer#test_regexp_escape_backslash_terminator [/home/whitequark/parser/test/test_lexer.rb:71]:
%r%blah\%blah%.
Expected: [:tREGEXP_BEG, "%r"]
Actual: [:tREGEXP_BEG, "%r%"]
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.
I followed dkubb styleguide, no problem for me to use the GH styleguide here.
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.
@mbj I'm not sure I would've used and or or in a boolean statement either :P
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.
@dkubb I remember I nitpicked about this some time :P
Capture delimiter in percent encoded literals



Fixes the missing
(in%W()style literals.