blade-syntax 0.1.1

Lossless parser for Laravel Blade templates
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Lossless parser for Laravel Blade templates.
//!
//! ```
//! let parse = blade_syntax::parse("@if($user) Hi {{ $user->name }} @endif");
//! assert!(parse.errors().is_empty());
//! // The tree always reproduces the input exactly.
//! assert_eq!(parse.syntax().to_string(), "@if($user) Hi {{ $user->name }} @endif");
//! ```

mod blocks;
pub mod debug;
mod kind;
mod lexer;
mod parser;

pub use kind::{BladeLanguage, SyntaxKind, SyntaxNode, SyntaxToken};
pub use parser::{Parse, ParseError, parse};
pub use rowan::{TextRange, TextSize};