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

Use AST instead of files to avoid parsing phase (decouple internal functions) #160

Open
ezhlobo opened this issue Jan 24, 2019 · 0 comments

Comments

@ezhlobo
Copy link
Member

ezhlobo commented Jan 24, 2019

Right now this plugin works with files only and it always parses the file, then analyze and then provide feedback.

I suggest to split this plugin into two options: a) linter; b) parser; c) cli. We might think about more options, but it will be a good start to make it extendable.

a) linter — will get AST and provide feedback
b) parser — will parse string into AST (mostly nested from pug-parser but it should be different than that to allow plugins)
c) cli — it will works with files, get their source code and execute a) and b) phases

The main advantage is that we will allow integrations with plugins like eslint when we use pug in js way more efficiently.

The disadvantage it will require a lot of work and a lot of decisions among community.

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