Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously a node was cloned with `JSON.parse(JSON.stringify(node))`. This approach needs to be sophisticated because the node.loc property has been changed from a plain JSON object to a `SourceSpan` instance in in v0.66.0 of @glimmer/syntax. (See PR 1170 in https://github.com/glimmerjs/glimmer-vm if you want to take a look at the changes in @glimmer/syntax.) node.loc in v0.65.4 has the following interface: ``` export interface SourceLocation { source?: Option<string>; start: Position; end: Position; } ``` reference: https://github.com/glimmerjs/glimmer-vm/blob/v0.65.4/packages/%40glimmer/syntax/lib/types/nodes.ts#L36-L40 in v0.80.0, node.loc is an instance of SourceSpan, which is defined here: https://github.com/glimmerjs/glimmer-vm/blob/v0.80.0/packages/%40glimmer/syntax/lib/source/loc/span.ts#L106-L309
- Loading branch information