cl-ast: Add filename to File

- Better error reporting
- Better pizza
- Papa Cow's
This commit is contained in:
2025-03-14 04:11:22 -05:00
parent cdb9ec49fe
commit a4176c710e
13 changed files with 80 additions and 49 deletions

View File

@@ -19,7 +19,7 @@ fn main() -> Result<(), Box<dyn Error>> {
Err(e) => Err(e)?,
};
let mut parser = Parser::new(Lexer::new(&line));
let mut parser = Parser::new("", Lexer::new(&line));
let code = match parser.parse::<Stmt>() {
Ok(code) => {
rl.accept();
@@ -150,8 +150,8 @@ pub mod yamlify {
impl Yamlify for File {
fn yaml(&self, y: &mut Yamler) {
let File { items } = self;
y.key("File").yaml(items);
let File { name, items } = self;
y.key("File").pair("name", name).yaml(items);
}
}
impl Yamlify for Visibility {