330
return ContextKeyRegexExpr.create(key, regexp);
331
}
333
>
switch (expr.type) {
334
>
case TokenType.RegexStr:
335
case TokenType.Error: { // also handle an ErrorToken in case of smth such as /(/file)/
336
>
const lexemeReconstruction = [expr.lexeme]; // /REGEX/ or /REGEX/FLAGS
contextkey.ts
337
>
this._advance();
338
>
339
>
let followingToken = this._peek();
340
>
let parenBalance = 0;
341
>
for (let i = 0; i < expr.lexeme.length; i++) {
342
>
if (expr.lexeme.charCodeAt(i) === CharCode.OpenParen) {
343
parenBalance++;
344
>
} else if (expr.lexeme.charCodeAt(i) === CharCode.CloseParen) {
contextkey.ts
345
parenBalance--;
346
}
348
>
349
>
while (!this._isAtEnd() && followingToken.type !== TokenType.And && followingToken.type !== TokenType.Or) {
350
switch (followingToken.type) {
351
case TokenType.LParen: