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)
| 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 |