efx-core 1.1.1

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::ast::error::ParseError;
pub use crate::ast::nodes::{Attr, Element, Interpolation, Node, Text};
pub use crate::ast::parser::Parser;

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

/// 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>;