wenley / rust-awk

Rust Implementation of Awk
MIT License
6 stars 2 forks source link

Inject statement parsers into Action parser #68

Open wenley opened 4 years ago

wenley commented 4 years ago

In order to support context-sensitive parsing of statements (specifically break, continue, and return), we need the parent parser to be able to provide its understanding of which statements are valid.

e.g. Once inside a while statement, any break/continue statement is valid. Once inside a function, any return statement is valid.

This can be done by wrapping the parsers with alt combinators.

wenley commented 4 years ago

This blocks #61

wenley commented 4 years ago

Related to #67