ysugimoto / falco

falco is a VCL parser and linter dedicated to Fastly
MIT License
105 stars 29 forks source link

Improve parser/ast for complex comments #302

Closed ysugimoto closed 6 months ago

ysugimoto commented 6 months ago

This PR improves more complex comment parsing, which relates to #299 .

The current implementation focuses on the meaning syntax (IDENT, STRING, etc...) so some positions of comments are ignored. It's okay to run linter and interpreter but this is important for a formatter to keep the original VCL including comments.

See https://github.com/ysugimoto/falco/blob/feature/complex-comments/docs/parser.md which defines parser spec, and enables to put comment position.

ysugimoto commented 6 months ago

I will merge this PR this weekend. If you have any opinions to improve, make another PR, please.