ysugimoto / falco

falco is a VCL parser and linter decicated to Fastly
MIT License
101 stars 25 forks source link

Feature/custom syntax #309

Closed ysugimoto closed 4 months ago

ysugimoto commented 4 months ago

This PR implements a mechanism of custom token lexer and parser. It means we can expand VCL language spec (custom declaration, statement, etc)

Of course, this feature should not be enabled as default, so as not to be misunderstood by a VCL user. For example, I implemented describe and before_each custom syntax for custom parsing test.

And, to use some parser methods from other packages inside, all parser methods like parseXXX are made publicly.