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

Method span

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

Return the span of this primitive.

(&self)

Source from the content-addressed store, hash-verified

42impl 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 {

Callers 15

into_class_set_itemMethod · 0.45
into_class_literalMethod · 0.45
push_alternateMethod · 0.45
push_groupMethod · 0.45
push_class_opMethod · 0.45
pop_class_opMethod · 0.45
parse_with_commentsMethod · 0.45
parse_groupMethod · 0.45
parse_capture_nameMethod · 0.45
parse_flagsMethod · 0.45

Calls 1

posMethod · 0.45

Tested by

no test coverage detected