Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support actions #36

Open
matthewmueller opened this issue May 7, 2023 · 1 comment
Open

Support actions #36

matthewmueller opened this issue May 7, 2023 · 1 comment

Comments

@matthewmueller
Copy link

Hi @Himujjal, thanks for the great library!

I was wondering if you would consider supporting Svelte actions? https://svelte.dev/docs#template-syntax-element-directives-use-action

Currently they're just treated as attribute names, but it's be nice to parse them further. Here's some examples of what's possible:

https://astexplorer.net/#/gist/ae11d23cc35d98746f3fa5469d625491/5a57c9897eec94076c38f0673c1eeaa5aae89cb8

@Himujjal
Copy link
Owner

Himujjal commented May 15, 2023

So, I looked over at the code. I need to change attribute_value for the actions to be separated out. This also applies to other element directives like bind:, use:, on:, transition:, use:, in:, out:, animate:, style: etc.

Now, the question is should I use this as a generic syntax expression: <directive>:<dir_value> and keep future directives also intact with one single commit or should I use only the above I mentioned?

As far as the AST implementation goes, directives are separated out into various groups. I think I should follow the svelte official AST.

Will fix this ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants