diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-07-18 20:11:31 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-07-18 21:04:46 +0200 |
| commit | f5953887c9ae0b40a0c3e0ab516daf425c5a598c (patch) | |
| tree | b517ca68517e49bdf458bfa92036a8ff855c72f6 /crates/typst-syntax/src/lib.rs | |
| parent | 7dc605307cf7d69a3476b8b6fc4786f683c3289b (diff) | |
Extract syntax module into typst-syntax crate
Diffstat (limited to 'crates/typst-syntax/src/lib.rs')
| -rw-r--r-- | crates/typst-syntax/src/lib.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/typst-syntax/src/lib.rs b/crates/typst-syntax/src/lib.rs new file mode 100644 index 00000000..8562bb19 --- /dev/null +++ b/crates/typst-syntax/src/lib.rs @@ -0,0 +1,23 @@ +//! Parser and syntax tree for Typst. + +pub mod ast; + +mod file; +mod kind; +mod lexer; +mod node; +mod parser; +mod reparser; +mod source; +mod span; + +pub use self::file::{FileId, PackageSpec, PackageVersion}; +pub use self::kind::SyntaxKind; +pub use self::lexer::{is_id_continue, is_id_start, is_ident, is_newline}; +pub use self::node::{LinkedChildren, LinkedNode, SyntaxError, SyntaxNode}; +pub use self::parser::{parse, parse_code, parse_math}; +pub use self::source::Source; +pub use self::span::{Span, Spanned}; + +use self::lexer::{split_newlines, LexMode, Lexer}; +use self::parser::{reparse_block, reparse_markup}; |
