Convert this primitive into a proper AST.
(self)
| 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 | /// |
no test coverage detected