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

Handle variables with array & hash references #212

Merged
merged 5 commits into from
Aug 3, 2013
Merged

Handle variables with array & hash references #212

merged 5 commits into from
Aug 3, 2013

Conversation

rodjek
Copy link
Owner

@rodjek rodjek commented Aug 3, 2013

This addresses two issues that were brought up in #181

  • Not identifying variables with references (like $foo[0]) as variables, so when run with fix mode enabled, the leading $ would be stripped
  • only_variable_strings would throw a false negative result for these sorts of variables.

rodjek added 5 commits August 3, 2013 13:23
Previously, a seperate logic block would handle enclosed variables and
anything else would be passed to a new instance of the lexer for
tokenisation. Unfortunately, this lead to variables that had array or hash
references being classified as :NAME tokens and then when running with fix
mode enabled, would not be turned back into variables.
Adjusted the logic in this check so that it allows for any number of array
or hash references at the end of a variable name, while still correctly
detecting that it is only a single variable.
rodjek pushed a commit that referenced this pull request Aug 3, 2013
Handle variables with array & hash references
@rodjek rodjek merged commit ec984f5 into fix_stuff Aug 3, 2013
@rodjek rodjek deleted the fix-181 branch August 3, 2013 20:44
@rodjek rodjek added this to the 1.0.0 milestone Aug 17, 2014
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.

1 participant