Move program ast into separate file

This commit is contained in:
Joscha 2022-11-19 11:02:31 +01:00
parent e2bb847577
commit 3e2f118e2e
2 changed files with 19 additions and 16 deletions

17
src/ast/program.rs Normal file
View file

@ -0,0 +1,17 @@
use crate::span::{HasSpan, Span};
use super::{Space, TableLitElem};
#[derive(Debug, Clone)]
pub struct Program {
pub elems: Vec<(Space, TableLitElem, Space)>,
/// `Some` if there is a trailing comma, `None` otherwise.
pub trailing_comma: Option<Space>,
pub span: Span,
}
impl HasSpan for Program {
fn span(&self) -> Span {
self.span
}
}