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

Add expressions inside string attribute values #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

savetheclocktower
Copy link

Fixes #44.

I tried to roughly follow the design of template strings in tree-sitter-javascript. Instead of doing something like…

(attribute_value
  (value_fragment)
  (expression (raw_text_expr))
  (value_fragment)
)

…I instead did…

(attribute_value
  (expression (raw_text_expr))
)

…so if you want to identify just the literal string parts, you can take (attribute_value) and ignore/subtract its children.

@savetheclocktower
Copy link
Author

By the way, I've purposefully been making atomic PRs, but I've also got a branch with all of these changes combined. If they all look good to you individually, I can open a PR against that branch and we can save ourselves some merging headaches.

@Himujjal
Copy link
Owner

@savetheclocktower I would love for you to make a PR for the same. It would save us time as well

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.

Attribute value inaccurately highighted as plain string instead of an expression.
2 participants