tree-sitter-html
tree-sitter-html copied to clipboard
Web-components (lit-html) support
Hi,
I have started learning about web-components and there is some weird syntax related to it. This PR solves a lot of problems. There is still one big major issue left, related to how HTML parses arrow functions.
Please see this issue comment for a nice explanation.
Basically there is a syntax like this <button @click="${(x) => x.handlePress()}">
and this <button @click=${(x) => x.handlePress()}>
.
The one with quotes handled by the PR mentioned above. The problem comes with the second part.
<button @click=${this.handlePress}>
--> this works with injection.
<button @click="${(x) => x.handlePress()}">
--> doesn't work because =>
part forces it to HTML.
Is it possible we solve this somehow?
Thanks.