Return the span of this primitive.
(&self)
| 42 | impl Primitive { |
| 43 | /// Return the span of this primitive. |
| 44 | fn span(&self) -> &Span { |
| 45 | match *self { |
| 46 | Primitive::Literal(ref x) => &x.span, |
| 47 | Primitive::Assertion(ref x) => &x.span, |
| 48 | Primitive::Dot(ref span) => span, |
| 49 | Primitive::Perl(ref x) => &x.span, |
| 50 | Primitive::Unicode(ref x) => &x.span, |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | /// Convert this primitive into a proper AST. |
| 55 | fn into_ast(self) -> Ast { |
no test coverage detected