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

Correctly parse statements with multiple escaped characters #292

Merged
merged 2 commits into from Jun 6, 2017
Merged

Correctly parse statements with multiple escaped characters #292

merged 2 commits into from Jun 6, 2017

Conversation

hgoldstein
Copy link
Contributor

Problem: Statements such as foo\(\) were not being correctly parsed, see #291.

Solution: Whenever a character is read by a WordIterator when the BACKSL flag is set, the flag gets unset.

Changes introduced by this pull request:

  • Backslash flag now reset upon reading the escaped character
  • Add regression test for multiple backslashes

Drawbacks:

  • It could use some more tests for these sorts of use cases
  • It is unclear if this affects the other uses of the WordIterator beyond parsing command line statements.

Fixes: Resolves #291.
State: Ready with the caveat of adding more unit / regression tests, also formatting and such.

@mmstick mmstick merged commit 1ecae0a into redox-os:master Jun 6, 2017
@mmstick
Copy link
Contributor

mmstick commented Jun 6, 2017

Thanks for the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants