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

Method into_ast

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

Convert this primitive into a proper AST.

(self)

Source from the content-addressed store, hash-verified

53
54 /// Convert this primitive into a proper AST.
55 fn into_ast(self) -> Ast {
56 match self {
57 Primitive::Literal(lit) => Ast::Literal(lit),
58 Primitive::Assertion(assert) => Ast::Assertion(assert),
59 Primitive::Dot(span) => Ast::Dot(span),
60 Primitive::Perl(cls) => Ast::Class(ast::Class::Perl(cls)),
61 Primitive::Unicode(cls) => Ast::Class(ast::Class::Unicode(cls)),
62 }
63 }
64
65 /// Convert this primitive into an item in a character class.
66 ///

Callers 4

pop_groupMethod · 0.45
pop_group_endMethod · 0.45
parse_with_commentsMethod · 0.45

Calls 4

AssertionClass · 0.85
UnicodeClass · 0.85
LiteralClass · 0.70
ClassEnum · 0.70

Tested by

no test coverage detected