- 
                Notifications
    
You must be signed in to change notification settings  - Fork 107
 
Open
Labels
Description
Is your feature request related to a problem? Please describe.
Crates are the unit of compilation for Rust. They are also the unit of a re-usable piece of code for cargo. Since the parser and the grammar don't change that often, and changes there are costly (in build time at least), it could make sense to move the parser into its own crate.
Now that we have a proper parse-time AST, we can move it there as well, and have a self-contained nickel-lang-parser crate.
Another benefit would be that third parties could reuse it to implement tooling or to integrate Nickel with other tools.
Describe the solution you'd like
Have a separate nickel-lang-parser crate that contains the grammar, the lexer, the parser, and the type definitions for the AST