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

Method is_lookaround_prefix

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

Returns true if and only if the parser is positioned at a look-around prefix. The conditions under which this returns true must always correspond to a regular expression that would otherwise be consider invalid. This should only be called immediately after parsing the opening of a group or a set of flags.

(&self)

Source from the content-addressed store, hash-verified

521 /// This should only be called immediately after parsing the opening of
522 /// a group or a set of flags.
523 fn is_lookaround_prefix(&self) -> bool {
524 self.bump_if("?=")
525 || self.bump_if("?!")
526 || self.bump_if("?<=")
527 || self.bump_if("?<!")
528 }
529
530 /// Bump the parser, and if the `x` flag is enabled, bump through any
531 /// subsequent spaces. Return true if and only if the parser is not at

Callers 1

parse_groupMethod · 0.80

Calls 1

bump_ifMethod · 0.80

Tested by

no test coverage detected