Skip to main content

ling/parser/
grammar.rs

1//! Placeholder module: src/parser/grammar.rs
2//!
3//! The real grammar is normally generated by lalrpop into `$OUT_DIR`
4//! (see build.rs). This placeholder exists so the crate compiles in this WIP state.
5
6#[allow(unused_imports)]
7use crate::lexer::{Lexer, Token};
8use crate::parser::ast::Program;
9
10pub struct ProgramParser;
11
12impl ProgramParser {
13    pub fn new() -> Self {
14        Self
15    }
16
17    pub fn parse(&self, _lexer: &mut Lexer<'_>) -> Result<Program, String> {
18        Ok(Program { items: vec![] })
19    }
20}
21
22