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 more fine-grained spans to some AST nodes #1401

Closed
Rafer45 opened this issue Jul 14, 2021 · 0 comments · Fixed by #1445
Closed

Add more fine-grained spans to some AST nodes #1401

Rafer45 opened this issue Jul 14, 2021 · 0 comments · Fixed by #1445

Comments

@Rafer45
Copy link
Contributor

Rafer45 commented Jul 14, 2021

It would be useful to have more fine-grained spans for certain AST nodes. Specifically:

  • A span for the URL portion of a use rule.
  • A span for the namespace of a use rule that has an as foobar portion.
  • A span for the namespace of a namespaced variable.
  • A span for just the variable, without the namespace, for a namespaced variable.

I would be happy to be the assignee for this issue.

jathak added a commit that referenced this issue Aug 20, 2021
Fixes #1401 and #1414.

Adds `Dependency`, `SassDeclaration`, and `SassReference` interfaces,
which expose some getters that multiple AST nodes have in common with a
single type.

These also add getters for common subspans (URL, name, and namespace) to
the interfaces.

To allow for `FunctionExpression` to have a common interface with the
other two reference nodes, its old `name` getter has been renamed to
`interpolatedName`, and the new `name` getter now is either just a
string, or null if the name is interpolated.
jathak added a commit that referenced this issue Aug 23, 2021
Fixes #1401 and #1414.

Adds `Dependency`, `SassDeclaration`, and `SassReference` interfaces,
which expose some getters that multiple AST nodes have in common with a
single type.

These also add getters for common subspans (URL, name, and namespace) to
the interfaces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants