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

Method start_ptr

regex/src/dfa.rs:1593–1599  ·  view source on GitHub ↗

Sets the STATE_START bit in the given state pointer if and only if we have a prefix to scan for. If there's no prefix, then it's a waste to treat the start state specially.

(&self, si: StatePtr)

Source from the content-addressed store, hash-verified

1591 /// If there's no prefix, then it's a waste to treat the start state
1592 /// specially.
1593 fn start_ptr(&self, si: StatePtr) -> StatePtr {
1594 if self.has_prefix() {
1595 si | STATE_START
1596 } else {
1597 si
1598 }
1599 }
1600
1601 /// Approximate size returns the approximate heap space currently used by
1602 /// the DFA. It is used to determine whether the DFA's state cache needs to

Callers 3

exec_byteMethod · 0.80
clear_cacheMethod · 0.80
start_stateMethod · 0.80

Calls 1

has_prefixMethod · 0.80

Tested by

no test coverage detected