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

Disentangle grammar resolution and related PG code #1018

Merged
merged 10 commits into from
Jun 21, 2024
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/codegen/runtime/generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ quote = { workspace = true }
semver = { workspace = true }
serde = { workspace = true }
strum = { workspace = true }
strum_macros = { workspace = true }

[lints]
workspace = true
5 changes: 3 additions & 2 deletions crates/codegen/runtime/generator/src/parser/grammar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ use std::rc::Rc;

use codegen_language_definition::model::{self, Identifier};

pub mod constructor;
pub mod parser_definition;
pub mod precedence_parser_definition;
pub mod resolver;
pub mod scanner_definition;
pub mod visitor;

pub use parser_definition::*;
pub use precedence_parser_definition::*;
pub use resolver::ResolveCtx;
pub use scanner_definition::*;
pub use visitor::*;

Expand All @@ -35,7 +36,7 @@ impl Grammar {
}

#[allow(clippy::enum_variant_names)] // this will be removed soon
#[derive(Clone)]
#[derive(Clone, strum_macros::EnumTryAs)]
pub enum GrammarElement {
ScannerDefinition(ScannerDefinitionRef),
KeywordScannerDefinition(Rc<model::KeywordItem>),
Expand Down
Loading
Loading