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

[4.0] Re-worked parser to support escaping dollars #380

Merged
merged 5 commits into from
Nov 25, 2019
Merged

Conversation

GrahamCampbell
Copy link
Collaborator

@GrahamCampbell GrahamCampbell commented Nov 4, 2019

Changes:

  1. The parser now returns a special Value object instead of a pure string. The value object contains both the parsed string, and the locations of nested environment variables for interpolation.
  2. Interpolation of environment variables is now performed right to left instead of left to right. This allows one to write code such as "${${FOO}}" where FOO holds the name of the actual variable.
  3. Double quoted strings now support escaping dollars with a backlash.
  4. Escape sequences are now banned in single quoted strings, just like for unquoted strings. This includes disallowing escaped (or otherwise) single quote characters within a single quoted string.

Closes #378.

@GrahamCampbell GrahamCampbell changed the title [4.x] Re-worked parser to support escaping dollars [4.0] Re-worked parser to support escaping dollars Nov 25, 2019
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.

[RFC] [4.0] Behaviour of nested variables
1 participant