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

Function range

regex/regex-syntax/src/ast/parse.rs:4290–4314  ·  view source on GitHub ↗
(span: Span, start: char, end: char)

Source from the content-addressed store, hash-verified

4288 }
4289
4290 fn range(span: Span, start: char, end: char) -> ast::ClassSetItem {
4291 let pos1 = Position {
4292 offset: span.start.offset + start.len_utf8(),
4293 column: span.start.column + 1,
4294 ..span.start
4295 };
4296 let pos2 = Position {
4297 offset: span.end.offset - end.len_utf8(),
4298 column: span.end.column - 1,
4299 ..span.end
4300 };
4301 ast::ClassSetItem::Range(ast::ClassSetRange {
4302 span: span,
4303 start: ast::Literal {
4304 span: Span { end: pos1, ..span },
4305 kind: ast::LiteralKind::Verbatim,
4306 c: start,
4307 },
4308 end: ast::Literal {
4309 span: Span { start: pos2, ..span },
4310 kind: ast::LiteralKind::Verbatim,
4311 c: end,
4312 },
4313 })
4314 }
4315
4316 fn alnum(span: Span, negated: bool) -> ast::ClassAscii {
4317 ast::ClassAscii {

Callers 4

groupsMethod · 0.85
capturesMethod · 0.85
captures_iterMethod · 0.85
mainFunction · 0.85

Calls 1

len_utf8Method · 0.80

Tested by

no test coverage detected