pub struct Expr<'i>(_);Expand description
A parsed pomsky expression, which might contain more sub-expressions.
Implementations§
source§impl<'i> Expr<'i>
impl<'i> Expr<'i>
sourcepub fn parse(input: &'i str) -> Result<(Self, Vec<ParseWarning>), ParseError>
pub fn parse(input: &'i str) -> Result<(Self, Vec<ParseWarning>), ParseError>
Parse a Expr without generating code.
The parsed Expr can be displayed with Debug if the dbg feature is
enabled.
sourcepub fn compile(&self, options: CompileOptions) -> Result<String, CompileError>
pub fn compile(&self, options: CompileOptions) -> Result<String, CompileError>
Compile a Expr that has been parsed, to a regex
sourcepub fn parse_and_compile(
input: &'i str,
options: CompileOptions
) -> Result<(String, Vec<ParseWarning>), CompileError>
pub fn parse_and_compile(
input: &'i str,
options: CompileOptions
) -> Result<(String, Vec<ParseWarning>), CompileError>
Parse a string to a Expr and compile it to a regex.