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

Feature: Expose method for calling Acorn and attaching comments #26

Closed
Conduitry opened this issue Jan 16, 2020 · 0 comments
Closed

Feature: Expose method for calling Acorn and attaching comments #26

Conduitry opened this issue Jan 16, 2020 · 0 comments

Comments

@Conduitry
Copy link
Collaborator

See sveltejs/svelte#4268

A nice solution to this seems to be to expose a method that calls Acorn with an onComment handler and then walks the AST and attaches the comments in non-standard fields.

code-red could then be free to change the mechanism later if so desired, without affecting Svelte. I don't think we want to make these fields part of code-red's API.

Rich-Harris added a commit that referenced this issue Jan 21, 2020
expose wrapped Acorn methods which include comment information
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

1 participant