blade_syntax/lib.rs
1//! Lossless parser for Laravel Blade templates.
2//!
3//! ```
4//! let parse = blade_syntax::parse("@if($user) Hi {{ $user->name }} @endif");
5//! assert!(parse.errors().is_empty());
6//! // The tree always reproduces the input exactly.
7//! assert_eq!(parse.syntax().to_string(), "@if($user) Hi {{ $user->name }} @endif");
8//! ```
9
10mod blocks;
11pub mod debug;
12mod kind;
13mod lexer;
14mod parser;
15
16pub use kind::{BladeLanguage, SyntaxKind, SyntaxNode, SyntaxToken};
17pub use parser::{Parse, ParseError, parse};
18pub use rowan::{TextRange, TextSize};