microcad_syntax/ast/
mod.rs1mod expression;
5mod literal;
6mod statement;
7mod ty;
8
9use crate::Span;
10use compact_str::CompactString;
11
12pub use expression::*;
13pub use literal::*;
14pub use statement::*;
15pub use ty::*;
16
17#[derive(Debug, PartialEq, Hash, Eq)]
19#[allow(missing_docs)]
20pub struct Identifier {
21 pub span: Span,
22 pub name: CompactString,
23}
24
25#[derive(Debug)]
27#[allow(missing_docs)]
28pub struct SourceFile {
29 pub span: Span,
30 pub statements: StatementList,
31}
32
33#[derive(Debug, PartialEq, Default)]
35#[allow(missing_docs)]
36pub struct ItemExtras {
37 pub leading: Vec<ItemExtra>,
38 pub trailing: Vec<ItemExtra>,
39}
40
41#[derive(Debug, PartialEq)]
42#[allow(missing_docs)]
43#[non_exhaustive]
44pub enum ItemExtra {
45 Comment(Comment),
46}