lexRegexPattern
lexRegexPattern(
source):Token[]
Defined in: packages/format-regex/src/lexer.ts:50
Tokenizes a regex pattern.
Two context-sensitive regions change how bytes are tokenized: inside a
[...] character class (classDepth > 0), where -/^ are only special
there and everything else is literal; and inside a {...} quantifier
(inBrace), where only digits/, are meaningful. Neither region can nest
inside the other in this grammar.
Parameters
Section titled “Parameters”source
Section titled “source”string
Returns
Section titled “Returns”Token[]