glimmerjs/glimmer-vm

provide parts nodes for ElementNode and block params

Closed this issue · 0 comments

An ElementNode can have dots like <Foo.Bar />.
But only Foo references an upper scope param or variable in JS.
ElementNode should have a parts property with an array of nodes for each name part. Foo and Bar in the example above.

Regarding block params.
when block params are available, they are represented as strings only.
They should also be represented as AST nodes.

this is needed in eslint parser:
https://github.com/ember-cli/eslint-plugin-ember/blob/3ec4b269f8b8cc47fe8fca2110f4d671a80d0fab/lib/parsers/gjs-gts-parser.js#L264
and
https://github.com/ember-cli/eslint-plugin-ember/blob/3ec4b269f8b8cc47fe8fca2110f4d671a80d0fab/lib/parsers/gjs-gts-parser.js#L290