emberjs / emberjs/ember.js

Add block params as first class node in V2 syntax tree

Open
#21,028 1 comment 1 reaction 0 assignees View on GitHub
glimmervm
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

There are at least three cases where it would be helpful to have a first class node for block params:

1. Codemods, where renaming a block parameter may need to be done
2. Linting, where the name of a block parameter/variable may be linted against (e.g. if it conflicts with keywords)
3. Throwing syntax errors, as in the work done in glimmerjs/glimmer-vm#1206

We should add them to the v2 syntax tree in a way that allows us to easily access their `loc`, so errors can be informative and helpful for users.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.