efx-core 1.0.0

Core parser and AST for EFx proc-macro
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub use crate::parser::error::ParseError;
pub use crate::parser::nodes::{Node, Element, Text, Interpolation, Attr};
pub use crate::parser::parser::Parser;

pub mod error;
mod span_range;
pub mod nodes;
mod tok;
mod lexer;
pub mod parser;

/// Top-level utility: parse DSL source string into AST
pub fn parse_str(src: &str) -> PResult<Vec<Node>> {
    let mut p = Parser::new(src);
    p.parse_nodes()
}

pub type PResult<T> = Result<T, ParseError>;