ember-estree 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/parse.js +8 -1
package/package.json
CHANGED
package/src/parse.js
CHANGED
|
@@ -182,7 +182,14 @@ export function toTree(source, options = {}) {
|
|
|
182
182
|
// configured we re-enter the walk manually via `visit()` to
|
|
183
183
|
// dispatch them across the Glimmer nodes. With no handlers the
|
|
184
184
|
// walk would be pure overhead, so just return the subtree.
|
|
185
|
-
|
|
185
|
+
//
|
|
186
|
+
// Pass `state` (the placeholder's inherited parent context) so the
|
|
187
|
+
// Glimmer root's parentPath reflects its true JS parent. The
|
|
188
|
+
// placeholder (TemplateLiteral / StaticBlock) is an internal
|
|
189
|
+
// artifact — the GlimmerTemplate logically lives where the
|
|
190
|
+
// placeholder was, so its parent is e.g. VariableDeclarator or
|
|
191
|
+
// ClassBody, not the placeholder itself.
|
|
192
|
+
return hasVisitors ? visit(ast, state) : ast;
|
|
186
193
|
}
|
|
187
194
|
}
|
|
188
195
|
|