pub(crate) struct ExprParser {
pub(crate) tok: ExprTokenizer,
pub(crate) cur: ExprToken,
}Expand description
Recursive-descent parser for expression filter strings.
Grammar: expr := or_expr or_expr := and_expr (“or” and_expr)* and_expr := not_expr (“and” not_expr)* not_expr := “not” not_expr | primary primary := function “(” STRING “)” | “(” expr “)” function := “glob” | “regex” | “regex_search” | “regex_match”
Fields§
§tok: ExprTokenizer§cur: ExprTokenImplementations§
Source§impl ExprParser
impl ExprParser
pub(crate) fn new(src: &str) -> Self
pub(crate) fn advance(&mut self)
pub(crate) fn expect(&mut self, t: ExprTokenType, desc: &str)
pub(crate) fn parse_primary(&mut self) -> Box<ExprNode>
pub(crate) fn parse_not(&mut self) -> Box<ExprNode>
pub(crate) fn parse_and(&mut self) -> Box<ExprNode>
pub(crate) fn parse_or(&mut self) -> Box<ExprNode>
pub(crate) fn parse(self) -> Box<ExprNode>
Auto Trait Implementations§
impl Freeze for ExprParser
impl RefUnwindSafe for ExprParser
impl Send for ExprParser
impl Sync for ExprParser
impl Unpin for ExprParser
impl UnwindSafe for ExprParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more