Skip to main content

syn_grammar/
lib.rs

1#![doc = include_str!("../README.md")]
2
3// src/lib.rs
4
5// 1. Export runtime modules
6// The code generated by the macro refers to `syn_grammar::rt`.
7// Therefore, this module must be publicly available.
8pub mod rt {
9    pub use super::token_filter;
10    pub use grammar_kit::*;
11}
12
13/// Utilities for testing parsers.
14pub use grammar_kit::testing;
15
16// 3. Re-export the macro
17// This allows the user to write: `use syn_grammar::grammar;`
18pub use syn_grammar_macros::grammar;
19
20#[doc(hidden)]
21pub use syn_grammar_macros::include_grammar;
22
23#[doc(hidden)]
24pub mod builtins;
25pub mod token_filter;
26
27// Export portable types
28pub mod types {
29    pub use syn_grammar_model::model::types::*;
30}
31pub use types::{Identifier, StringLiteral};