[syntax] Repeated `<`s before a valid tag are silently ignored
- Dominant language
- TypeScript
- Stars
- 22.6k
- Forks
- 4.2k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 15
Description
In `@glimmer/syntax`, the string `<` is parsed the same as the string `< Foo />` — any number of repeated `<` characters before the start of the tag name end up being silently dropped. As an example, the JSON output in these two ASTExplorer gists is identical:
- https://astexplorer.net/#/gist/f1ee151b94b7ec56ed4fcbc63d1f3beb
- https://astexplorer.net/#/gist/a19af922f163c413da9474c41a08cc6a
I spent a bit of time last week [exploring how an error-recovery parse mode might look](https://github.com/glimmerjs/glimmer-vm/compare/master...dfreeman:error-recovery), but since this situation doesn't throw an error, there's nothing to recover from. It seems like this should produce a syntax error?
Contributor guide
Assessment
This issue has not been assessed yet.