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

Method push

regex/regex-syntax/src/ast/mod.rs:1046–1052  ·  view source on GitHub ↗

Push a new item in this union. The ending position of this union's span is updated to the ending position of the span of the item given. If the union is empty, then the starting position of this union is set to the starting position of this item. In other words, if you only use this method to add items to a union and you set the spans on each item correctly, then you should never need to adjust

(&mut self, item: ClassSetItem)

Source from the content-addressed store, hash-verified

1044 /// and you set the spans on each item correctly, then you should never
1045 /// need to adjust the span of the union directly.
1046 pub fn push(&mut self, item: ClassSetItem) {
1047 if self.items.is_empty() {
1048 self.span.start = item.span().start;
1049 }
1050 self.span.end = item.span().end;
1051 self.items.push(item);
1052 }
1053
1054 /// Return this union as a character class set item.
1055 ///

Callers 15

parseMethod · 0.45
escape_unicodeFunction · 0.45
parseMethod · 0.45
alternation_literalsFunction · 0.45
expand_bytesFunction · 0.45
follow_epsilonsMethod · 0.45
cached_state_keyMethod · 0.45
insertMethod · 0.45
write_varu32Function · 0.45
clearMethod · 0.45
backtrackMethod · 0.45
stepMethod · 0.45

Calls 2

is_emptyMethod · 0.45
spanMethod · 0.45

Tested by 2

ones_and_zeroesFunction · 0.36