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

Method has_subexprs

regex/regex-syntax/src/ast/mod.rs:529–542  ·  view source on GitHub ↗

Returns true if and only if this AST has any (including possibly empty) subexpressions.

(&self)

Source from the content-addressed store, hash-verified

527 /// Returns true if and only if this AST has any (including possibly empty)
528 /// subexpressions.
529 fn has_subexprs(&self) -> bool {
530 match *self {
531 Ast::Empty(_)
532 | Ast::Flags(_)
533 | Ast::Literal(_)
534 | Ast::Dot(_)
535 | Ast::Assertion(_) => false,
536 Ast::Class(_)
537 | Ast::Repetition(_)
538 | Ast::Group(_)
539 | Ast::Alternation(_)
540 | Ast::Concat(_) => true,
541 }
542 }
543}
544
545/// Print a display representation of this Ast.

Callers 1

dropMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected