mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Flatten ast module back into syntax module 🌪
This commit is contained in:
parent
51bf3268dd
commit
c216a4fc26
@ -4,8 +4,7 @@ use std::fmt::{self, Debug, Formatter};
|
||||
|
||||
use super::{is_newline, Scanner};
|
||||
use crate::geom::Unit;
|
||||
use crate::syntax::token::*;
|
||||
use crate::syntax::{is_ident, Pos};
|
||||
use crate::syntax::*;
|
||||
|
||||
use TokenMode::*;
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
//! Abstract syntax tree definition.
|
||||
|
||||
mod expr;
|
||||
mod lit;
|
||||
mod node;
|
||||
|
||||
pub use expr::*;
|
||||
pub use lit::*;
|
||||
pub use node::*;
|
||||
|
||||
use super::{Ident, SpanVec, Spanned};
|
||||
|
||||
/// A collection of nodes which form a tree together with the nodes' children.
|
||||
pub type SynTree = SpanVec<SynNode>;
|
@ -1,12 +1,18 @@
|
||||
//! Syntax types.
|
||||
|
||||
pub mod ast;
|
||||
pub mod token;
|
||||
|
||||
mod expr;
|
||||
mod ident;
|
||||
mod lit;
|
||||
mod node;
|
||||
mod span;
|
||||
mod token;
|
||||
|
||||
pub use ast::*;
|
||||
pub use expr::*;
|
||||
pub use ident::*;
|
||||
pub use lit::*;
|
||||
pub use node::*;
|
||||
pub use span::*;
|
||||
pub use token::*;
|
||||
|
||||
/// A collection of nodes which form a tree together with the nodes' children.
|
||||
pub type SynTree = SpanVec<SynNode>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user