mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +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 super::{is_newline, Scanner};
|
||||||
use crate::geom::Unit;
|
use crate::geom::Unit;
|
||||||
use crate::syntax::token::*;
|
use crate::syntax::*;
|
||||||
use crate::syntax::{is_ident, Pos};
|
|
||||||
|
|
||||||
use TokenMode::*;
|
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.
|
//! Syntax types.
|
||||||
|
|
||||||
pub mod ast;
|
mod expr;
|
||||||
pub mod token;
|
|
||||||
|
|
||||||
mod ident;
|
mod ident;
|
||||||
|
mod lit;
|
||||||
|
mod node;
|
||||||
mod span;
|
mod span;
|
||||||
|
mod token;
|
||||||
|
|
||||||
pub use ast::*;
|
pub use expr::*;
|
||||||
pub use ident::*;
|
pub use ident::*;
|
||||||
|
pub use lit::*;
|
||||||
|
pub use node::*;
|
||||||
pub use span::*;
|
pub use span::*;
|
||||||
pub use token::*;
|
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