MCPcopy Create free account
hub / github.com/davidblewett/rure-python / push_class_op

Method push_class_op

regex/regex-syntax/src/ast/parse.rs:929–942  ·  view source on GitHub ↗

Push the current set of class items on to the class parser's stack as the left hand side of the given operator. A fresh set union is returned, which should be used to build the right hand side of this operator.

(
        &self,
        next_kind: ast::ClassSetBinaryOpKind,
        next_union: ast::ClassSetUnion,
    )

Source from the content-addressed store, hash-verified

927 /// A fresh set union is returned, which should be used to build the right
928 /// hand side of this operator.
929 fn push_class_op(
930 &self,
931 next_kind: ast::ClassSetBinaryOpKind,
932 next_union: ast::ClassSetUnion,
933 ) -> ast::ClassSetUnion {
934
935 let item = ast::ClassSet::Item(next_union.into_item());
936 let new_lhs = self.pop_class_op(item);
937 self.parser().stack_class.borrow_mut().push(ClassState::Op {
938 kind: next_kind,
939 lhs: new_lhs,
940 });
941 ast::ClassSetUnion { span: self.span(), items: vec![] }
942 }
943
944 /// Pop a character class set from the character class parser stack. If the
945 /// top of the stack is just an item (not an operation), then return the

Callers 1

parse_set_classMethod · 0.80

Calls 5

into_itemMethod · 0.80
pop_class_opMethod · 0.80
parserMethod · 0.80
pushMethod · 0.45
spanMethod · 0.45

Tested by

no test coverage detected