Skip to content

Parse escape sequences and interpolations in strings#33

Merged
maxbrunsfeld merged 2 commits intomasterfrom
string-formats-and-escapes
Jul 25, 2018
Merged

Parse escape sequences and interpolations in strings#33
maxbrunsfeld merged 2 commits intomasterfrom
string-formats-and-escapes

Conversation

@maxbrunsfeld
Copy link
Contributor

@maxbrunsfeld maxbrunsfeld commented Jul 25, 2018

This PR adds parsing for escape sequences (e.g. "one\ntwo") and interpolations (e.g. f"one{a.b}two") in strings.

  • simple escape sequences
  • simple interpolations
  • multi-character escape sequences (e.g. \x01, \u01234)

Depends on tree-sitter/tree-sitter#187
Fixes #26

@maxbrunsfeld
Copy link
Contributor Author

/cc @rewinfrey this will add some new child nodes of strings; not sure if that'll matter for your code that consumes these trees.

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