mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Provide Syntax Checking for Regular Expressions (#55600)
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
This commit is contained in:
@@ -2289,7 +2289,7 @@ export function compareBooleans(a: boolean, b: boolean): Comparison {
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
export function getSpellingSuggestion<T>(name: string, candidates: T[], getName: (candidate: T) => string | undefined): T | undefined {
|
||||
export function getSpellingSuggestion<T>(name: string, candidates: Iterable<T>, getName: (candidate: T) => string | undefined): T | undefined {
|
||||
const maximumLengthDifference = Math.max(2, Math.floor(name.length * 0.34));
|
||||
let bestDistance = Math.floor(name.length * 0.4) + 1; // If the best result is worse than this, don't bother.
|
||||
let bestCandidate: T | undefined;
|
||||
|
||||
@@ -1649,6 +1649,154 @@
|
||||
"category": "Error",
|
||||
"code": 1498
|
||||
},
|
||||
"Unknown regular expression flag.": {
|
||||
"category": "Error",
|
||||
"code": 1499
|
||||
},
|
||||
"Duplicate regular expression flag.": {
|
||||
"category": "Error",
|
||||
"code": 1500
|
||||
},
|
||||
"This regular expression flag is only available when targeting '{0}' or later.": {
|
||||
"category": "Error",
|
||||
"code": 1501
|
||||
},
|
||||
"The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.": {
|
||||
"category": "Error",
|
||||
"code": 1502
|
||||
},
|
||||
"Named capturing groups are only available when targeting 'ES2018' or later.": {
|
||||
"category": "Error",
|
||||
"code": 1503
|
||||
},
|
||||
"Subpattern flags must be present when there is a minus sign.": {
|
||||
"category": "Error",
|
||||
"code": 1504
|
||||
},
|
||||
"Incomplete quantifier. Digit expected.": {
|
||||
"category": "Error",
|
||||
"code": 1505
|
||||
},
|
||||
"Numbers out of order in quantifier.": {
|
||||
"category": "Error",
|
||||
"code": 1506
|
||||
},
|
||||
"There is nothing available for repetition.": {
|
||||
"category": "Error",
|
||||
"code": 1507
|
||||
},
|
||||
"Unexpected '{0}'. Did you mean to escape it with backslash?": {
|
||||
"category": "Error",
|
||||
"code": 1508
|
||||
},
|
||||
"This regular expression flag cannot be toggled within a subpattern.": {
|
||||
"category": "Error",
|
||||
"code": 1509
|
||||
},
|
||||
"'\\k' must be followed by a capturing group name enclosed in angle brackets.": {
|
||||
"category": "Error",
|
||||
"code": 1510
|
||||
},
|
||||
"'\\q' is only available inside character class.": {
|
||||
"category": "Error",
|
||||
"code": 1511
|
||||
},
|
||||
"'\\c' must be followed by an ASCII letter.": {
|
||||
"category": "Error",
|
||||
"code": 1512
|
||||
},
|
||||
"Undetermined character escape.": {
|
||||
"category": "Error",
|
||||
"code": 1513
|
||||
},
|
||||
"Expected a capturing group name.": {
|
||||
"category": "Error",
|
||||
"code": 1514
|
||||
},
|
||||
"Named capturing groups with the same name must be mutually exclusive to each other.": {
|
||||
"category": "Error",
|
||||
"code": 1515
|
||||
},
|
||||
"A character class range must not be bounded by another character class.": {
|
||||
"category": "Error",
|
||||
"code": 1516
|
||||
},
|
||||
"Range out of order in character class.": {
|
||||
"category": "Error",
|
||||
"code": 1517
|
||||
},
|
||||
"Anything that would possibly match more than a single character is invalid inside a negated character class.": {
|
||||
"category": "Error",
|
||||
"code": 1518
|
||||
},
|
||||
"Operators must not be mixed within a character class. Wrap it in a nested class instead.": {
|
||||
"category": "Error",
|
||||
"code": 1519
|
||||
},
|
||||
"Expected a class set oprand.": {
|
||||
"category": "Error",
|
||||
"code": 1520
|
||||
},
|
||||
"'\\q' must be followed by string alternatives enclosed in braces.": {
|
||||
"category": "Error",
|
||||
"code": 1521
|
||||
},
|
||||
"A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?": {
|
||||
"category": "Error",
|
||||
"code": 1522
|
||||
},
|
||||
"Expected a Unicode property name.": {
|
||||
"category": "Error",
|
||||
"code": 1523
|
||||
},
|
||||
"Unknown Unicode property name.": {
|
||||
"category": "Error",
|
||||
"code": 1524
|
||||
},
|
||||
"Expected a Unicode property value.": {
|
||||
"category": "Error",
|
||||
"code": 1525
|
||||
},
|
||||
"Unknown Unicode property value.": {
|
||||
"category": "Error",
|
||||
"code": 1526
|
||||
},
|
||||
"Expected a Unicode property name or value.": {
|
||||
"category": "Error",
|
||||
"code": 1527
|
||||
},
|
||||
"Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.": {
|
||||
"category": "Error",
|
||||
"code": 1528
|
||||
},
|
||||
"Unknown Unicode property name or value.": {
|
||||
"category": "Error",
|
||||
"code": 1529
|
||||
},
|
||||
"Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.": {
|
||||
"category": "Error",
|
||||
"code": 1530
|
||||
},
|
||||
"'\\{0}' must be followed by a Unicode property value expression enclosed in braces.": {
|
||||
"category": "Error",
|
||||
"code": 1531
|
||||
},
|
||||
"There is no capturing group named '{0}' in this regular expression.": {
|
||||
"category": "Error",
|
||||
"code": 1532
|
||||
},
|
||||
"A decimal escape must refer to an existent capturing group. There are only {0} capturing groups in this regular expression.": {
|
||||
"category": "Error",
|
||||
"code": 1533
|
||||
},
|
||||
"Decimal escapes are invalid when there are no capturing groups in a regular expression.": {
|
||||
"category": "Error",
|
||||
"code": 1534
|
||||
},
|
||||
"This character cannot be escaped in a regular expression.": {
|
||||
"category": "Error",
|
||||
"code": 1535
|
||||
},
|
||||
|
||||
"The types of '{0}' are incompatible between these types.": {
|
||||
"category": "Error",
|
||||
|
||||
@@ -62,6 +62,7 @@ import {
|
||||
DeleteExpression,
|
||||
Diagnostic,
|
||||
DiagnosticArguments,
|
||||
DiagnosticCategory,
|
||||
DiagnosticMessage,
|
||||
Diagnostics,
|
||||
DiagnosticWithDetachedLocation,
|
||||
@@ -113,6 +114,7 @@ import {
|
||||
HasModifiers,
|
||||
HeritageClause,
|
||||
Identifier,
|
||||
identity,
|
||||
idText,
|
||||
IfStatement,
|
||||
ImportAttribute,
|
||||
@@ -2142,7 +2144,11 @@ namespace Parser {
|
||||
// Don't report another error if it would just be at the same position as the last error.
|
||||
const lastError = lastOrUndefined(parseDiagnostics);
|
||||
let result: DiagnosticWithDetachedLocation | undefined;
|
||||
if (!lastError || start !== lastError.start) {
|
||||
if (message.category === DiagnosticCategory.Message && lastError && start === lastError.start && length === lastError.length) {
|
||||
result = createDetachedDiagnostic(fileName, sourceText, start, length, message, ...args);
|
||||
addRelatedInfo(lastError, result);
|
||||
}
|
||||
else if (!lastError || start !== lastError.start) {
|
||||
result = createDetachedDiagnostic(fileName, sourceText, start, length, message, ...args);
|
||||
parseDiagnostics.push(result);
|
||||
}
|
||||
@@ -2398,7 +2404,7 @@ namespace Parser {
|
||||
}
|
||||
|
||||
// The user alternatively might have misspelled or forgotten to add a space after a common keyword.
|
||||
const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions, n => n) ?? getSpaceSuggestion(expressionText);
|
||||
const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions, identity) ?? getSpaceSuggestion(expressionText);
|
||||
if (suggestion) {
|
||||
parseErrorAt(pos, node.end, Diagnostics.Unknown_keyword_or_identifier_Did_you_mean_0, suggestion);
|
||||
return;
|
||||
|
||||
@@ -126,6 +126,7 @@ import {
|
||||
getLineStarts,
|
||||
getMatchedFileSpec,
|
||||
getMatchedIncludeSpec,
|
||||
getNameOfScriptTarget,
|
||||
getNewLineCharacter,
|
||||
getNormalizedAbsolutePath,
|
||||
getNormalizedAbsolutePathWithoutRoot,
|
||||
@@ -307,7 +308,6 @@ import {
|
||||
SyntaxKind,
|
||||
sys,
|
||||
System,
|
||||
targetOptionDeclaration,
|
||||
toFileNameLowerCase,
|
||||
tokenToString,
|
||||
toPath as ts_toPath,
|
||||
@@ -4780,7 +4780,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
|
||||
message = Diagnostics.File_is_library_specified_here;
|
||||
break;
|
||||
}
|
||||
const target = forEachEntry(targetOptionDeclaration.type, (value, key) => value === getEmitScriptTarget(options) ? key : undefined);
|
||||
const target = getNameOfScriptTarget(getEmitScriptTarget(options));
|
||||
configFileNode = target ? getOptionsSyntaxByValue("target", target) : undefined;
|
||||
message = Diagnostics.File_is_default_library_for_target_specified_here;
|
||||
break;
|
||||
|
||||
+1139
-79
File diff suppressed because it is too large
Load Diff
@@ -2762,6 +2762,22 @@ export interface RegularExpressionLiteral extends LiteralExpression {
|
||||
readonly kind: SyntaxKind.RegularExpressionLiteral;
|
||||
}
|
||||
|
||||
// dprint-ignore
|
||||
/** @internal */
|
||||
export const enum RegularExpressionFlags {
|
||||
None = 0,
|
||||
HasIndices = 1 << 0, // d
|
||||
Global = 1 << 1, // g
|
||||
IgnoreCase = 1 << 2, // i
|
||||
Multiline = 1 << 3, // m
|
||||
DotAll = 1 << 4, // s
|
||||
Unicode = 1 << 5, // u
|
||||
UnicodeSets = 1 << 6, // v
|
||||
Sticky = 1 << 7, // y
|
||||
UnicodeMode = Unicode | UnicodeSets,
|
||||
Modifiers = IgnoreCase | Multiline | DotAll,
|
||||
}
|
||||
|
||||
export interface NoSubstitutionTemplateLiteral extends LiteralExpression, TemplateLiteralLikeNode, Declaration {
|
||||
readonly kind: SyntaxKind.NoSubstitutionTemplateLiteral;
|
||||
/** @internal */
|
||||
|
||||
@@ -530,6 +530,7 @@ import {
|
||||
SymbolTable,
|
||||
SyntaxKind,
|
||||
TaggedTemplateExpression,
|
||||
targetOptionDeclaration,
|
||||
TemplateExpression,
|
||||
TemplateLiteral,
|
||||
TemplateLiteralLikeNode,
|
||||
@@ -8986,6 +8987,11 @@ export function getStrictOptionValue(compilerOptions: CompilerOptions, flag: Str
|
||||
return compilerOptions[flag] === undefined ? !!compilerOptions.strict : !!compilerOptions[flag];
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function getNameOfScriptTarget(scriptTarget: ScriptTarget): string | undefined {
|
||||
return forEachEntry(targetOptionDeclaration.type, (value, key) => value === scriptTarget ? key : undefined);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function getEmitStandardClassFields(compilerOptions: CompilerOptions) {
|
||||
return compilerOptions.useDefineForClassFields !== false && getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2022;
|
||||
|
||||
@@ -47,7 +47,6 @@ import {
|
||||
findIndex,
|
||||
flattenDiagnosticMessageText,
|
||||
forEach,
|
||||
forEachEntry,
|
||||
ForegroundColorEscapeSequences,
|
||||
formatColorAndReset,
|
||||
formatDiagnostic,
|
||||
@@ -59,6 +58,7 @@ import {
|
||||
getEmitScriptTarget,
|
||||
getImpliedNodeFormatForEmitWorker,
|
||||
getLineAndCharacterOfPosition,
|
||||
getNameOfScriptTarget,
|
||||
getNewLineCharacter,
|
||||
getNormalizedAbsolutePath,
|
||||
getParsedCommandLineOfConfigFile,
|
||||
@@ -95,7 +95,6 @@ import {
|
||||
sourceMapCommentRegExpDontCareLineStart,
|
||||
sys,
|
||||
System,
|
||||
targetOptionDeclaration,
|
||||
WatchCompilerHost,
|
||||
WatchCompilerHostOfConfigFile,
|
||||
WatchCompilerHostOfFilesAndCompilerOptions,
|
||||
@@ -542,7 +541,7 @@ export function fileIncludeReasonToDiagnostics(program: Program, reason: FileInc
|
||||
}
|
||||
case FileIncludeKind.LibFile: {
|
||||
if (reason.index !== undefined) return chainDiagnosticMessages(/*details*/ undefined, Diagnostics.Library_0_specified_in_compilerOptions, options.lib![reason.index]);
|
||||
const target = forEachEntry(targetOptionDeclaration.type, (value, key) => value === getEmitScriptTarget(options) ? key : undefined);
|
||||
const target = getNameOfScriptTarget(getEmitScriptTarget(options));
|
||||
const messageAndArgs: DiagnosticAndArguments = target ? [Diagnostics.Default_library_for_target_0, target] : [Diagnostics.Default_library];
|
||||
return chainDiagnosticMessages(/*details*/ undefined, ...messageAndArgs);
|
||||
}
|
||||
|
||||
@@ -1264,7 +1264,7 @@ function isPathRelativeToScript(path: string) {
|
||||
*
|
||||
* /// <reference path="fragment"
|
||||
*/
|
||||
const tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\3"]*)$/;
|
||||
const tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s*<reference\s+(path|types)\s*=\s*(?:'|"))([^\x03"]*)$/;
|
||||
|
||||
const nodeModulesDependencyKeys: readonly string[] = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"];
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ describe("unittests:: Incremental Parser", () => {
|
||||
const oldText = ts.ScriptSnapshot.fromString(source);
|
||||
const newTextAndChange = withInsert(oldText, semicolonIndex, "/");
|
||||
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 0);
|
||||
compareTrees(oldText, newTextAndChange.text, newTextAndChange.textChangeRange, 4);
|
||||
});
|
||||
|
||||
it("Regular expression 2", () => {
|
||||
|
||||
@@ -8,7 +8,13 @@ doYouNeedToChangeYourTargetLibraryES2016Plus.ts(10,64): error TS2550: Property '
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(11,21): error TS2583: Cannot find name 'Atomics'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2017' or later.
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(12,35): error TS2583: Cannot find name 'SharedArrayBuffer'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2017' or later.
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(15,50): error TS2550: Property 'finally' does not exist on type 'Promise<unknown>'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(16,58): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(16,76): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(16,95): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(16,113): error TS2550: Property 'groups' does not exist on type 'RegExpMatchArray'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(17,38): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(17,56): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(17,75): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(17,111): error TS2550: Property 'groups' does not exist on type 'RegExpExecArray'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(18,33): error TS2550: Property 'dotAll' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(19,38): error TS2550: Property 'PluralRules' does not exist on type 'typeof Intl'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
|
||||
@@ -33,7 +39,7 @@ doYouNeedToChangeYourTargetLibraryES2016Plus.ts(43,32): error TS2550: Property '
|
||||
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(44,33): error TS2550: Property 'replaceAll' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2021' or later.
|
||||
|
||||
|
||||
==== doYouNeedToChangeYourTargetLibraryES2016Plus.ts (33 errors) ====
|
||||
==== doYouNeedToChangeYourTargetLibraryES2016Plus.ts (39 errors) ====
|
||||
// es2016
|
||||
const testIncludes = ["hello"].includes("world");
|
||||
~~~~~~~~
|
||||
@@ -70,9 +76,21 @@ doYouNeedToChangeYourTargetLibraryES2016Plus.ts(44,33): error TS2550: Property '
|
||||
~~~~~~~
|
||||
!!! error TS2550: Property 'finally' does not exist on type 'Promise<unknown>'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
|
||||
const testRegExpMatchArrayGroups = "2019-04-30".match(/(?<year>[0-9]{4})-(?<month>[0-9]{2})-(?<day>[0-9]{2})/g).groups;
|
||||
~~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~~
|
||||
!!! error TS2550: Property 'groups' does not exist on type 'RegExpMatchArray'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
|
||||
const testRegExpExecArrayGroups = /(?<year>[0-9]{4})-(?<month>[0-9]{2})-(?<day>[0-9]{2})/g.exec("2019-04-30").groups;
|
||||
~~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~~
|
||||
!!! error TS2550: Property 'groups' does not exist on type 'RegExpExecArray'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
|
||||
const testRegExpDotAll = /foo/g.dotAll;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[96ma.ts[0m:[93m1[0m:[93m12[0m - [91merror[0m[90m TS18026: [0m'#!' can only be used at the start of a file.
|
||||
|
||||
[7m1[0m const a =!@#!@$
|
||||
[7m [0m [91m [0m
|
||||
[7m [0m [91m ~~[0m
|
||||
[96ma.ts[0m:[93m1[0m:[93m13[0m - [91merror[0m[90m TS1134: [0mVariable declaration expected.
|
||||
|
||||
[7m1[0m const a =!@#!@$
|
||||
@@ -13,7 +13,7 @@
|
||||
[96ma.ts[0m:[93m2[0m:[93m13[0m - [91merror[0m[90m TS18026: [0m'#!' can only be used at the start of a file.
|
||||
|
||||
[7m2[0m const b = !@#!@#!@#!
|
||||
[7m [0m [91m [0m
|
||||
[7m [0m [91m ~~[0m
|
||||
[96ma.ts[0m:[93m2[0m:[93m14[0m - [91merror[0m[90m TS1134: [0mVariable declaration expected.
|
||||
|
||||
[7m2[0m const b = !@#!@#!@#!
|
||||
@@ -21,11 +21,11 @@
|
||||
[96ma.ts[0m:[93m2[0m:[93m16[0m - [91merror[0m[90m TS18026: [0m'#!' can only be used at the start of a file.
|
||||
|
||||
[7m2[0m const b = !@#!@#!@#!
|
||||
[7m [0m [91m [0m
|
||||
[7m [0m [91m ~~[0m
|
||||
[96ma.ts[0m:[93m2[0m:[93m19[0m - [91merror[0m[90m TS18026: [0m'#!' can only be used at the start of a file.
|
||||
|
||||
[7m2[0m const b = !@#!@#!@#!
|
||||
[7m [0m [91m [0m
|
||||
[7m [0m [91m ~~[0m
|
||||
[96ma.ts[0m:[93m3[0m:[93m1[0m - [91merror[0m[90m TS2304: [0mCannot find name 'OK'.
|
||||
|
||||
[7m3[0m OK!
|
||||
@@ -78,20 +78,20 @@
|
||||
|
||||
==== a.ts (16 errors) ====
|
||||
const a =!@#!@$
|
||||
|
||||
~~
|
||||
!!! error TS18026: '#!' can only be used at the start of a file.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
|
||||
!!! error TS1109: Expression expected.
|
||||
const b = !@#!@#!@#!
|
||||
|
||||
~~
|
||||
!!! error TS18026: '#!' can only be used at the start of a file.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
|
||||
~~
|
||||
!!! error TS18026: '#!' can only be used at the start of a file.
|
||||
|
||||
~~
|
||||
!!! error TS18026: '#!' can only be used at the start of a file.
|
||||
OK!
|
||||
~~
|
||||
|
||||
@@ -1,32 +1,46 @@
|
||||
1.ts(1,7): error TS1199: Unterminated Unicode escape sequence.
|
||||
10.ts(1,5): error TS1125: Hexadecimal digit expected.
|
||||
11.ts(1,5): error TS1125: Hexadecimal digit expected.
|
||||
12.ts(1,5): error TS1125: Hexadecimal digit expected.
|
||||
13.ts(1,5): error TS1125: Hexadecimal digit expected.
|
||||
14.ts(1,5): error TS1125: Hexadecimal digit expected.
|
||||
15.ts(1,5): error TS1125: Hexadecimal digit expected.
|
||||
16.ts(1,5): error TS1125: Hexadecimal digit expected.
|
||||
16.ts(1,12): error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
17.ts(1,4): error TS1125: Hexadecimal digit expected.
|
||||
18.ts(1,4): error TS1125: Hexadecimal digit expected.
|
||||
19.ts(1,4): error TS1125: Hexadecimal digit expected.
|
||||
2.ts(1,7): error TS1199: Unterminated Unicode escape sequence.
|
||||
20.ts(1,4): error TS1125: Hexadecimal digit expected.
|
||||
21.ts(1,4): error TS1125: Hexadecimal digit expected.
|
||||
22.ts(1,4): error TS1125: Hexadecimal digit expected.
|
||||
23.ts(1,4): error TS1125: Hexadecimal digit expected.
|
||||
24.ts(1,4): error TS1125: Hexadecimal digit expected.
|
||||
25.ts(1,11): error TS1199: Unterminated Unicode escape sequence.
|
||||
26.ts(1,11): error TS1199: Unterminated Unicode escape sequence.
|
||||
27.ts(1,11): error TS1199: Unterminated Unicode escape sequence.
|
||||
28.ts(1,11): error TS1199: Unterminated Unicode escape sequence.
|
||||
28.ts(1,12): error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
3.ts(1,7): error TS1199: Unterminated Unicode escape sequence.
|
||||
37.ts(1,7): error TS1199: Unterminated Unicode escape sequence.
|
||||
38.ts(1,7): error TS1199: Unterminated Unicode escape sequence.
|
||||
39.ts(1,7): error TS1199: Unterminated Unicode escape sequence.
|
||||
4.ts(1,7): error TS1199: Unterminated Unicode escape sequence.
|
||||
4.ts(1,12): error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
40.ts(1,7): error TS1199: Unterminated Unicode escape sequence.
|
||||
40.ts(1,13): error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
41.ts(1,6): error TS1125: Hexadecimal digit expected.
|
||||
42.ts(1,6): error TS1125: Hexadecimal digit expected.
|
||||
43.ts(1,6): error TS1125: Hexadecimal digit expected.
|
||||
44.ts(1,6): error TS1125: Hexadecimal digit expected.
|
||||
45.ts(1,5): error TS1125: Hexadecimal digit expected.
|
||||
46.ts(1,5): error TS1125: Hexadecimal digit expected.
|
||||
47.ts(1,5): error TS1125: Hexadecimal digit expected.
|
||||
48.ts(1,5): error TS1125: Hexadecimal digit expected.
|
||||
5.ts(1,6): error TS1125: Hexadecimal digit expected.
|
||||
6.ts(1,6): error TS1125: Hexadecimal digit expected.
|
||||
7.ts(1,6): error TS1125: Hexadecimal digit expected.
|
||||
8.ts(1,6): error TS1125: Hexadecimal digit expected.
|
||||
9.ts(1,5): error TS1125: Hexadecimal digit expected.
|
||||
|
||||
|
||||
@@ -45,8 +59,12 @@
|
||||
|
||||
!!! error TS1199: Unterminated Unicode escape sequence.
|
||||
|
||||
==== 4.ts (0 errors) ====
|
||||
==== 4.ts (2 errors) ====
|
||||
/\u{10_ffff}/u
|
||||
|
||||
!!! error TS1199: Unterminated Unicode escape sequence.
|
||||
~
|
||||
!!! error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
|
||||
==== 5.ts (1 errors) ====
|
||||
"\uff_ff"
|
||||
@@ -63,8 +81,10 @@
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
==== 8.ts (0 errors) ====
|
||||
==== 8.ts (1 errors) ====
|
||||
/\uff_ff/u
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
==== 9.ts (1 errors) ====
|
||||
"\xf_f"
|
||||
@@ -81,8 +101,10 @@
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
==== 12.ts (0 errors) ====
|
||||
==== 12.ts (1 errors) ====
|
||||
/\xf_f/u
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
==== 13.ts (1 errors) ====
|
||||
"\u{_10ffff}"
|
||||
@@ -99,8 +121,12 @@
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
==== 16.ts (0 errors) ====
|
||||
==== 16.ts (2 errors) ====
|
||||
/\u{_10ffff}/u
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
~
|
||||
!!! error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
|
||||
==== 17.ts (1 errors) ====
|
||||
"\u_ffff"
|
||||
@@ -117,8 +143,10 @@
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
==== 20.ts (0 errors) ====
|
||||
==== 20.ts (1 errors) ====
|
||||
/\u_ffff/u
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
==== 21.ts (1 errors) ====
|
||||
"\x_ff"
|
||||
@@ -135,8 +163,10 @@
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
==== 24.ts (0 errors) ====
|
||||
==== 24.ts (1 errors) ====
|
||||
/\x_ff/u
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
==== 25.ts (1 errors) ====
|
||||
"\u{10ffff_}"
|
||||
@@ -153,8 +183,12 @@
|
||||
|
||||
!!! error TS1199: Unterminated Unicode escape sequence.
|
||||
|
||||
==== 28.ts (0 errors) ====
|
||||
==== 28.ts (2 errors) ====
|
||||
/\u{10ffff_}/u
|
||||
|
||||
!!! error TS1199: Unterminated Unicode escape sequence.
|
||||
~
|
||||
!!! error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
|
||||
==== 29.ts (0 errors) ====
|
||||
"\uffff_"
|
||||
@@ -195,8 +229,12 @@
|
||||
|
||||
!!! error TS1199: Unterminated Unicode escape sequence.
|
||||
|
||||
==== 40.ts (0 errors) ====
|
||||
==== 40.ts (2 errors) ====
|
||||
/\u{10__ffff}/u
|
||||
|
||||
!!! error TS1199: Unterminated Unicode escape sequence.
|
||||
~
|
||||
!!! error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
|
||||
==== 41.ts (1 errors) ====
|
||||
"\uff__ff"
|
||||
@@ -213,8 +251,10 @@
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
==== 44.ts (0 errors) ====
|
||||
==== 44.ts (1 errors) ====
|
||||
/\uff__ff/u
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
==== 45.ts (1 errors) ====
|
||||
"\xf__f"
|
||||
@@ -231,6 +271,8 @@
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
==== 48.ts (0 errors) ====
|
||||
==== 48.ts (1 errors) ====
|
||||
/\xf__f/u
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
//// [2.js]
|
||||
'\u{10_ffff}';
|
||||
//// [3.js]
|
||||
"\\u{10_ffff}";
|
||||
`\u{10_ffff}`;
|
||||
//// [4.js]
|
||||
/\u{10_ffff}/u;
|
||||
//// [5.js]
|
||||
@@ -158,7 +158,7 @@
|
||||
//// [6.js]
|
||||
'\uff_ff';
|
||||
//// [7.js]
|
||||
"\\uff_ff";
|
||||
`\uff_ff`;
|
||||
//// [8.js]
|
||||
/\uff_ff/u;
|
||||
//// [9.js]
|
||||
@@ -166,7 +166,7 @@
|
||||
//// [10.js]
|
||||
'\xf_f';
|
||||
//// [11.js]
|
||||
"\\xf_f";
|
||||
`\xf_f`;
|
||||
//// [12.js]
|
||||
/\xf_f/u;
|
||||
//// [13.js]
|
||||
@@ -174,7 +174,7 @@
|
||||
//// [14.js]
|
||||
'\u{_10ffff}';
|
||||
//// [15.js]
|
||||
"\\u{_10ffff}";
|
||||
`\u{_10ffff}`;
|
||||
//// [16.js]
|
||||
/\u{_10ffff}/u;
|
||||
//// [17.js]
|
||||
@@ -182,7 +182,7 @@
|
||||
//// [18.js]
|
||||
'\u_ffff';
|
||||
//// [19.js]
|
||||
"\\u_ffff";
|
||||
`\u_ffff`;
|
||||
//// [20.js]
|
||||
/\u_ffff/u;
|
||||
//// [21.js]
|
||||
@@ -190,7 +190,7 @@
|
||||
//// [22.js]
|
||||
'\x_ff';
|
||||
//// [23.js]
|
||||
"\\x_ff";
|
||||
`\x_ff`;
|
||||
//// [24.js]
|
||||
/\x_ff/u;
|
||||
//// [25.js]
|
||||
@@ -198,7 +198,7 @@
|
||||
//// [26.js]
|
||||
'\u{10ffff_}';
|
||||
//// [27.js]
|
||||
"\\u{10ffff_}";
|
||||
`\u{10ffff_}`;
|
||||
//// [28.js]
|
||||
/\u{10ffff_}/u;
|
||||
//// [29.js]
|
||||
@@ -206,7 +206,7 @@
|
||||
//// [30.js]
|
||||
'\uffff_';
|
||||
//// [31.js]
|
||||
"\uFFFF_";
|
||||
`\uffff_`;
|
||||
//// [32.js]
|
||||
/\uffff_/u;
|
||||
//// [33.js]
|
||||
@@ -214,7 +214,7 @@
|
||||
//// [34.js]
|
||||
'\xff_';
|
||||
//// [35.js]
|
||||
"\u00FF_";
|
||||
`\xff_`;
|
||||
//// [36.js]
|
||||
/\xff_/u;
|
||||
//// [37.js]
|
||||
@@ -222,7 +222,7 @@
|
||||
//// [38.js]
|
||||
'\u{10__ffff}';
|
||||
//// [39.js]
|
||||
"\\u{10__ffff}";
|
||||
`\u{10__ffff}`;
|
||||
//// [40.js]
|
||||
/\u{10__ffff}/u;
|
||||
//// [41.js]
|
||||
@@ -230,7 +230,7 @@
|
||||
//// [42.js]
|
||||
'\uff__ff';
|
||||
//// [43.js]
|
||||
"\\uff__ff";
|
||||
`\uff__ff`;
|
||||
//// [44.js]
|
||||
/\uff__ff/u;
|
||||
//// [45.js]
|
||||
@@ -238,6 +238,6 @@
|
||||
//// [46.js]
|
||||
'\xf__f';
|
||||
//// [47.js]
|
||||
"\\xf__f";
|
||||
`\xf__f`;
|
||||
//// [48.js]
|
||||
/\xf__f/u;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
parser579071.ts(1,14): error TS1005: ')' expected.
|
||||
|
||||
|
||||
==== parser579071.ts (1 errors) ====
|
||||
var x = /fo(o/;
|
||||
|
||||
!!! error TS1005: ')' expected.
|
||||
@@ -1,7 +1,7 @@
|
||||
parserRegularExpression1.ts(1,1): error TS1108: A 'return' statement can only be used within a function body.
|
||||
parserRegularExpression1.ts(1,34): error TS1516: A character class range must not be bounded by another character class.
|
||||
|
||||
|
||||
==== parserRegularExpression1.ts (1 errors) ====
|
||||
return /(#?-?\d*\.\d\w*%?)|(@?#?[\w-?]+%?)/g;
|
||||
~~~~~~
|
||||
!!! error TS1108: A 'return' statement can only be used within a function body.
|
||||
~~
|
||||
!!! error TS1516: A character class range must not be bounded by another character class.
|
||||
@@ -1,7 +1,10 @@
|
||||
parserRegularExpressionDivideAmbiguity3.ts(1,16): error TS1499: Unknown regular expression flag.
|
||||
parserRegularExpressionDivideAmbiguity3.ts(1,18): error TS2339: Property 'foo' does not exist on type 'RegExp'.
|
||||
|
||||
|
||||
==== parserRegularExpressionDivideAmbiguity3.ts (1 errors) ====
|
||||
==== parserRegularExpressionDivideAmbiguity3.ts (2 errors) ====
|
||||
if (1) /regexp/a.foo();
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~~~
|
||||
!!! error TS2339: Property 'foo' does not exist on type 'RegExp'.
|
||||
@@ -1,13 +1,10 @@
|
||||
parserRegularExpressionDivideAmbiguity4.ts(1,1): error TS2304: Cannot find name 'foo'.
|
||||
parserRegularExpressionDivideAmbiguity4.ts(1,6): error TS1161: Unterminated regular expression literal.
|
||||
parserRegularExpressionDivideAmbiguity4.ts(1,17): error TS1005: ')' expected.
|
||||
|
||||
|
||||
==== parserRegularExpressionDivideAmbiguity4.ts (3 errors) ====
|
||||
==== parserRegularExpressionDivideAmbiguity4.ts (2 errors) ====
|
||||
foo(/notregexp);
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'foo'.
|
||||
|
||||
!!! error TS1161: Unterminated regular expression literal.
|
||||
|
||||
!!! error TS1005: ')' expected.
|
||||
!!! error TS1161: Unterminated regular expression literal.
|
||||
@@ -4,4 +4,4 @@
|
||||
foo(/notregexp);
|
||||
|
||||
//// [parserRegularExpressionDivideAmbiguity4.js]
|
||||
foo(/notregexp););
|
||||
foo(/notregexp);
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
=== parserRegularExpressionDivideAmbiguity4.ts ===
|
||||
foo(/notregexp);
|
||||
>foo(/notregexp); : any
|
||||
> : ^^^
|
||||
>foo(/notregexp) : any
|
||||
> : ^^^
|
||||
>foo : any
|
||||
> : ^^^
|
||||
>/notregexp); : RegExp
|
||||
> : ^^^^^^
|
||||
>/notregexp : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
regExpWithOpenBracketInCharClass.ts(4,7): error TS1005: ']' expected.
|
||||
regExpWithOpenBracketInCharClass.ts(4,8): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
|
||||
|
||||
==== regExpWithOpenBracketInCharClass.ts (2 errors) ====
|
||||
const regexes: RegExp[] = [
|
||||
/[[]/, // Valid
|
||||
/[[]/u, // Valid
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
|
||||
!!! error TS1005: ']' expected.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
];
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [tests/cases/compiler/regExpWithOpenBracketInCharClass.ts] ////
|
||||
|
||||
//// [regExpWithOpenBracketInCharClass.ts]
|
||||
const regexes: RegExp[] = [
|
||||
/[[]/, // Valid
|
||||
/[[]/u, // Valid
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
];
|
||||
|
||||
|
||||
//// [regExpWithOpenBracketInCharClass.js]
|
||||
const regexes = [
|
||||
/[[]/, // Valid
|
||||
/[[]/u, // Valid
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
];
|
||||
@@ -0,0 +1,12 @@
|
||||
//// [tests/cases/compiler/regExpWithOpenBracketInCharClass.ts] ////
|
||||
|
||||
=== regExpWithOpenBracketInCharClass.ts ===
|
||||
const regexes: RegExp[] = [
|
||||
>regexes : Symbol(regexes, Decl(regExpWithOpenBracketInCharClass.ts, 0, 5))
|
||||
>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
|
||||
|
||||
/[[]/, // Valid
|
||||
/[[]/u, // Valid
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
];
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
//// [tests/cases/compiler/regExpWithOpenBracketInCharClass.ts] ////
|
||||
|
||||
=== regExpWithOpenBracketInCharClass.ts ===
|
||||
const regexes: RegExp[] = [
|
||||
>regexes : RegExp[]
|
||||
> : ^^^^^^^^
|
||||
>[ /[[]/, // Valid /[[]/u, // Valid /[[]/v, // Well-terminated regex with an incomplete character class] : RegExp[]
|
||||
> : ^^^^^^^^
|
||||
|
||||
/[[]/, // Valid
|
||||
>/[[]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[[]/u, // Valid
|
||||
>/[[]/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
>/[[]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
];
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
regExpWithOpenBracketInCharClass.ts(3,8): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
regExpWithOpenBracketInCharClass.ts(4,7): error TS1005: ']' expected.
|
||||
regExpWithOpenBracketInCharClass.ts(4,8): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
|
||||
|
||||
==== regExpWithOpenBracketInCharClass.ts (3 errors) ====
|
||||
const regexes: RegExp[] = [
|
||||
/[[]/, // Valid
|
||||
/[[]/u, // Valid
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
|
||||
!!! error TS1005: ']' expected.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
];
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [tests/cases/compiler/regExpWithOpenBracketInCharClass.ts] ////
|
||||
|
||||
//// [regExpWithOpenBracketInCharClass.ts]
|
||||
const regexes: RegExp[] = [
|
||||
/[[]/, // Valid
|
||||
/[[]/u, // Valid
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
];
|
||||
|
||||
|
||||
//// [regExpWithOpenBracketInCharClass.js]
|
||||
var regexes = [
|
||||
/[[]/, // Valid
|
||||
/[[]/u, // Valid
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
];
|
||||
@@ -0,0 +1,12 @@
|
||||
//// [tests/cases/compiler/regExpWithOpenBracketInCharClass.ts] ////
|
||||
|
||||
=== regExpWithOpenBracketInCharClass.ts ===
|
||||
const regexes: RegExp[] = [
|
||||
>regexes : Symbol(regexes, Decl(regExpWithOpenBracketInCharClass.ts, 0, 5))
|
||||
>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
/[[]/, // Valid
|
||||
/[[]/u, // Valid
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
];
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
//// [tests/cases/compiler/regExpWithOpenBracketInCharClass.ts] ////
|
||||
|
||||
=== regExpWithOpenBracketInCharClass.ts ===
|
||||
const regexes: RegExp[] = [
|
||||
>regexes : RegExp[]
|
||||
> : ^^^^^^^^
|
||||
>[ /[[]/, // Valid /[[]/u, // Valid /[[]/v, // Well-terminated regex with an incomplete character class] : RegExp[]
|
||||
> : ^^^^^^^^
|
||||
|
||||
/[[]/, // Valid
|
||||
>/[[]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[[]/u, // Valid
|
||||
>/[[]/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
>/[[]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
];
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
regExpWithOpenBracketInCharClass.ts(4,7): error TS1005: ']' expected.
|
||||
|
||||
|
||||
==== regExpWithOpenBracketInCharClass.ts (1 errors) ====
|
||||
const regexes: RegExp[] = [
|
||||
/[[]/, // Valid
|
||||
/[[]/u, // Valid
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
|
||||
!!! error TS1005: ']' expected.
|
||||
];
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [tests/cases/compiler/regExpWithOpenBracketInCharClass.ts] ////
|
||||
|
||||
//// [regExpWithOpenBracketInCharClass.ts]
|
||||
const regexes: RegExp[] = [
|
||||
/[[]/, // Valid
|
||||
/[[]/u, // Valid
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
];
|
||||
|
||||
|
||||
//// [regExpWithOpenBracketInCharClass.js]
|
||||
const regexes = [
|
||||
/[[]/, // Valid
|
||||
/[[]/u, // Valid
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
];
|
||||
@@ -0,0 +1,12 @@
|
||||
//// [tests/cases/compiler/regExpWithOpenBracketInCharClass.ts] ////
|
||||
|
||||
=== regExpWithOpenBracketInCharClass.ts ===
|
||||
const regexes: RegExp[] = [
|
||||
>regexes : Symbol(regexes, Decl(regExpWithOpenBracketInCharClass.ts, 0, 5))
|
||||
>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.regexp.d.ts, --, --) ... and 3 more)
|
||||
|
||||
/[[]/, // Valid
|
||||
/[[]/u, // Valid
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
];
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
//// [tests/cases/compiler/regExpWithOpenBracketInCharClass.ts] ////
|
||||
|
||||
=== regExpWithOpenBracketInCharClass.ts ===
|
||||
const regexes: RegExp[] = [
|
||||
>regexes : RegExp[]
|
||||
> : ^^^^^^^^
|
||||
>[ /[[]/, // Valid /[[]/u, // Valid /[[]/v, // Well-terminated regex with an incomplete character class] : RegExp[]
|
||||
> : ^^^^^^^^
|
||||
|
||||
/[[]/, // Valid
|
||||
>/[[]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[[]/u, // Valid
|
||||
>/[[]/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[[]/v, // Well-terminated regex with an incomplete character class
|
||||
>/[[]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
];
|
||||
|
||||
@@ -0,0 +1,719 @@
|
||||
regularExpressionScanning.ts(3,7): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(3,9): error TS1501: This regular expression flag is only available when targeting 'es2018' or later.
|
||||
regularExpressionScanning.ts(3,10): error TS1502: The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.
|
||||
regularExpressionScanning.ts(3,11): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,12): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,13): error TS1500: Duplicate regular expression flag.
|
||||
regularExpressionScanning.ts(3,14): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,15): error TS1502: The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.
|
||||
regularExpressionScanning.ts(3,16): error TS1501: This regular expression flag is only available when targeting 'es2022' or later.
|
||||
regularExpressionScanning.ts(3,17): error TS1500: Duplicate regular expression flag.
|
||||
regularExpressionScanning.ts(3,18): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,19): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,20): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,21): error TS1500: Duplicate regular expression flag.
|
||||
regularExpressionScanning.ts(3,22): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(5,6): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(5,7): error TS1509: This regular expression flag cannot be toggled within a subpattern.
|
||||
regularExpressionScanning.ts(5,10): error TS1509: This regular expression flag cannot be toggled within a subpattern.
|
||||
regularExpressionScanning.ts(5,11): error TS1500: Duplicate regular expression flag.
|
||||
regularExpressionScanning.ts(7,9): error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
regularExpressionScanning.ts(7,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
regularExpressionScanning.ts(7,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
regularExpressionScanning.ts(7,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'.
|
||||
regularExpressionScanning.ts(7,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'.
|
||||
regularExpressionScanning.ts(7,42): error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
regularExpressionScanning.ts(7,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'.
|
||||
regularExpressionScanning.ts(8,9): error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
regularExpressionScanning.ts(8,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
regularExpressionScanning.ts(8,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
regularExpressionScanning.ts(8,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'.
|
||||
regularExpressionScanning.ts(8,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'.
|
||||
regularExpressionScanning.ts(8,42): error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
regularExpressionScanning.ts(8,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'.
|
||||
regularExpressionScanning.ts(9,5): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(9,14): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(9,29): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(9,45): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(9,57): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(10,15): error TS1532: There is no capturing group named 'absent' in this regular expression.
|
||||
regularExpressionScanning.ts(10,24): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(10,36): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(10,45): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(10,58): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(10,59): error TS1515: Named capturing groups with the same name must be mutually exclusive to each other.
|
||||
regularExpressionScanning.ts(12,31): error TS1507: There is nothing available for repetition.
|
||||
regularExpressionScanning.ts(12,32): error TS1506: Numbers out of order in quantifier.
|
||||
regularExpressionScanning.ts(12,40): error TS1507: There is nothing available for repetition.
|
||||
regularExpressionScanning.ts(12,61): error TS1505: Incomplete quantifier. Digit expected.
|
||||
regularExpressionScanning.ts(14,12): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(14,15): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(14,22): error TS1516: A character class range must not be bounded by another character class.
|
||||
regularExpressionScanning.ts(14,28): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(14,33): error TS1516: A character class range must not be bounded by another character class.
|
||||
regularExpressionScanning.ts(14,36): error TS1516: A character class range must not be bounded by another character class.
|
||||
regularExpressionScanning.ts(15,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,8): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,25): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,28): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(15,37): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,50): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,62): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(16,28): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(16,62): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(17,28): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(17,62): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(17,72): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(18,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,6): error TS1524: Unknown Unicode property name.
|
||||
regularExpressionScanning.ts(18,28): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,31): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(18,32): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(18,33): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,39): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(18,40): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,43): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(18,49): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,52): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(18,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,62): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(18,63): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,66): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(19,6): error TS1524: Unknown Unicode property name.
|
||||
regularExpressionScanning.ts(19,31): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(19,32): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(19,39): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(19,43): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(19,52): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(19,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces.
|
||||
regularExpressionScanning.ts(19,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces.
|
||||
regularExpressionScanning.ts(19,62): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(19,66): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(20,6): error TS1524: Unknown Unicode property name.
|
||||
regularExpressionScanning.ts(20,31): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(20,32): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(20,39): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(20,43): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(20,52): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(20,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces.
|
||||
regularExpressionScanning.ts(20,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces.
|
||||
regularExpressionScanning.ts(20,62): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(20,66): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(20,67): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(21,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,31): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,44): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(23,19): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(23,31): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(23,47): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(23,59): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(25,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(25,23): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(26,3): error TS1512: '\c' must be followed by an ASCII letter.
|
||||
regularExpressionScanning.ts(26,6): error TS1512: '\c' must be followed by an ASCII letter.
|
||||
regularExpressionScanning.ts(26,15): error TS1512: '\c' must be followed by an ASCII letter.
|
||||
regularExpressionScanning.ts(26,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(26,20): error TS1512: '\c' must be followed by an ASCII letter.
|
||||
regularExpressionScanning.ts(26,23): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,3): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,10): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,21): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,24): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,39): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,43): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,3): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,7): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,10): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,14): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,21): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,24): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,39): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(28,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(28,43): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,3): error TS1511: '\q' is only available inside character class.
|
||||
regularExpressionScanning.ts(29,7): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,10): error TS1521: '\q' must be followed by string alternatives enclosed in braces.
|
||||
regularExpressionScanning.ts(29,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,21): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,23): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,38): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,39): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,43): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,46): error TS1005: '}' expected.
|
||||
regularExpressionScanning.ts(29,47): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(31,4): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(31,8): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(31,34): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(31,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(31,55): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(31,63): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(31,76): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(32,4): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(32,8): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(32,19): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,50): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,51): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,55): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(32,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,63): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(32,76): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(33,8): error TS1005: '--' expected.
|
||||
regularExpressionScanning.ts(33,9): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,11): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,12): error TS1005: '--' expected.
|
||||
regularExpressionScanning.ts(33,15): error TS1522: A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,20): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,28): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,40): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,47): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,49): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,50): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,55): error TS1511: '\q' is only available inside character class.
|
||||
regularExpressionScanning.ts(33,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,66): error TS1508: Unexpected '-'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,67): error TS1005: '--' expected.
|
||||
regularExpressionScanning.ts(33,70): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,75): error TS1508: Unexpected '&'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,85): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,87): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(34,56): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(34,67): error TS1005: '&&' expected.
|
||||
regularExpressionScanning.ts(34,77): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(35,83): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(36,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(36,30): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(36,83): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(37,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(37,28): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(37,53): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(37,77): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(38,95): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(39,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(39,34): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(39,95): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(40,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(40,32): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(40,61): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(40,89): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(41,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(41,79): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(41,91): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(42,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(42,89): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(42,101): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
|
||||
|
||||
==== regularExpressionScanning.ts (224 errors) ====
|
||||
const regexes: RegExp[] = [
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es2018' or later.
|
||||
~
|
||||
!!! error TS1502: The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1500: Duplicate regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1502: The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es2022' or later.
|
||||
~
|
||||
!!! error TS1500: Duplicate regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1500: Duplicate regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1509: This regular expression flag cannot be toggled within a subpattern.
|
||||
~
|
||||
!!! error TS1509: This regular expression flag cannot be toggled within a subpattern.
|
||||
~
|
||||
!!! error TS1500: Duplicate regular expression flag.
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
~~
|
||||
!!! error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
~~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'.
|
||||
~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'.
|
||||
~
|
||||
!!! error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
~~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'.
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
~~
|
||||
!!! error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
~~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'.
|
||||
~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'.
|
||||
~
|
||||
!!! error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
~~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'.
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
~~~~~~
|
||||
!!! error TS1532: There is no capturing group named 'absent' in this regular expression.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~
|
||||
!!! error TS1515: Named capturing groups with the same name must be mutually exclusive to each other.
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
~~~~~~~
|
||||
!!! error TS1507: There is nothing available for repetition.
|
||||
~~~~~
|
||||
!!! error TS1506: Numbers out of order in quantifier.
|
||||
~~~~~~~~~
|
||||
!!! error TS1507: There is nothing available for repetition.
|
||||
|
||||
!!! error TS1505: Incomplete quantifier. Digit expected.
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~
|
||||
!!! error TS1516: A character class range must not be bounded by another character class.
|
||||
~~~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~
|
||||
!!! error TS1516: A character class range must not be bounded by another character class.
|
||||
~~
|
||||
!!! error TS1516: A character class range must not be bounded by another character class.
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1524: Unknown Unicode property name.
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1524: Unknown Unicode property name.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~~
|
||||
!!! error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces.
|
||||
~~
|
||||
!!! error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1524: Unknown Unicode property name.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~~
|
||||
!!! error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces.
|
||||
~~
|
||||
!!! error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
~~
|
||||
!!! error TS1512: '\c' must be followed by an ASCII letter.
|
||||
~~
|
||||
!!! error TS1512: '\c' must be followed by an ASCII letter.
|
||||
~~
|
||||
!!! error TS1512: '\c' must be followed by an ASCII letter.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1512: '\c' must be followed by an ASCII letter.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
~~
|
||||
!!! error TS1511: '\q' is only available inside character class.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1521: '\q' must be followed by string alternatives enclosed in braces.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
|
||||
!!! error TS1005: '}' expected.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
|
||||
!!! error TS1005: '--' expected.
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
|
||||
!!! error TS1005: '--' expected.
|
||||
~~
|
||||
!!! error TS1522: A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
~~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
~~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
~~
|
||||
!!! error TS1511: '\q' is only available inside character class.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected '-'. Did you mean to escape it with backslash?
|
||||
|
||||
!!! error TS1005: '--' expected.
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
~
|
||||
!!! error TS1508: Unexpected '&'. Did you mean to escape it with backslash?
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
~~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
|
||||
!!! error TS1005: '&&' expected.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
];
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
//// [tests/cases/compiler/regularExpressionScanning.ts] ////
|
||||
|
||||
//// [regularExpressionScanning.ts]
|
||||
const regexes: RegExp[] = [
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
];
|
||||
|
||||
|
||||
//// [regularExpressionScanning.js]
|
||||
const regexes = [
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
];
|
||||
@@ -0,0 +1,50 @@
|
||||
//// [tests/cases/compiler/regularExpressionScanning.ts] ////
|
||||
|
||||
=== regularExpressionScanning.ts ===
|
||||
const regexes: RegExp[] = [
|
||||
>regexes : Symbol(regexes, Decl(regularExpressionScanning.ts, 0, 5))
|
||||
>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
|
||||
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
];
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
//// [tests/cases/compiler/regularExpressionScanning.ts] ////
|
||||
|
||||
=== regularExpressionScanning.ts ===
|
||||
const regexes: RegExp[] = [
|
||||
>regexes : RegExp[]
|
||||
> : ^^^^^^^^
|
||||
>[ // Flags /foo/visualstudiocode, // Pattern modifiers /(?med-ium:bar)/, // Capturing groups /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/, /(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/, // Quantifiers /{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/, // Character classes /[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v, // Character escapes /\c[\c0\ca\cQ\c\C]\c1\C/, /\c[\c0\ca\cQ\c\C]\c1\C/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v, // Unicode sets notation /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v, /[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v, /[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v, /[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v, /[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v, /[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v, /[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v, /[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v, /[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v, /[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,] : RegExp[]
|
||||
> : ^^^^^^^^
|
||||
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
>/foo/visualstudiocode : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
>/(?med-ium:bar)/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
>/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
>/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
>/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
>/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
>/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
>/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
>/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
>/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
>/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
>/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
>/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
>/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
>/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
>/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
>/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
>/\c[\c0\ca\cQ\c\C]\c1\C/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
>/\c[\c0\ca\cQ\c\C]\c1\C/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
>/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
>/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
>/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
>/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
>/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
>/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
>/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
>/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
>/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
>/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
>/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
>/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
>/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
>/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
>/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
];
|
||||
|
||||
@@ -0,0 +1,740 @@
|
||||
regularExpressionScanning.ts(3,7): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(3,9): error TS1501: This regular expression flag is only available when targeting 'es2018' or later.
|
||||
regularExpressionScanning.ts(3,10): error TS1502: The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.
|
||||
regularExpressionScanning.ts(3,11): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,12): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,13): error TS1500: Duplicate regular expression flag.
|
||||
regularExpressionScanning.ts(3,14): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,15): error TS1502: The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.
|
||||
regularExpressionScanning.ts(3,16): error TS1501: This regular expression flag is only available when targeting 'es2022' or later.
|
||||
regularExpressionScanning.ts(3,17): error TS1500: Duplicate regular expression flag.
|
||||
regularExpressionScanning.ts(3,18): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,19): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,20): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,21): error TS1500: Duplicate regular expression flag.
|
||||
regularExpressionScanning.ts(3,22): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(5,6): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(5,7): error TS1509: This regular expression flag cannot be toggled within a subpattern.
|
||||
regularExpressionScanning.ts(5,10): error TS1509: This regular expression flag cannot be toggled within a subpattern.
|
||||
regularExpressionScanning.ts(5,11): error TS1500: Duplicate regular expression flag.
|
||||
regularExpressionScanning.ts(7,9): error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
regularExpressionScanning.ts(7,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
regularExpressionScanning.ts(7,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
regularExpressionScanning.ts(7,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'.
|
||||
regularExpressionScanning.ts(7,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'.
|
||||
regularExpressionScanning.ts(7,42): error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
regularExpressionScanning.ts(7,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'.
|
||||
regularExpressionScanning.ts(8,9): error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
regularExpressionScanning.ts(8,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
regularExpressionScanning.ts(8,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
regularExpressionScanning.ts(8,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'.
|
||||
regularExpressionScanning.ts(8,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'.
|
||||
regularExpressionScanning.ts(8,42): error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
regularExpressionScanning.ts(8,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'.
|
||||
regularExpressionScanning.ts(8,48): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
regularExpressionScanning.ts(9,5): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(9,14): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(9,29): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(9,45): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(9,57): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(10,15): error TS1532: There is no capturing group named 'absent' in this regular expression.
|
||||
regularExpressionScanning.ts(10,24): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(10,36): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(10,45): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(10,58): error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
regularExpressionScanning.ts(10,59): error TS1515: Named capturing groups with the same name must be mutually exclusive to each other.
|
||||
regularExpressionScanning.ts(12,31): error TS1507: There is nothing available for repetition.
|
||||
regularExpressionScanning.ts(12,32): error TS1506: Numbers out of order in quantifier.
|
||||
regularExpressionScanning.ts(12,40): error TS1507: There is nothing available for repetition.
|
||||
regularExpressionScanning.ts(12,61): error TS1505: Incomplete quantifier. Digit expected.
|
||||
regularExpressionScanning.ts(14,12): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(14,15): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(14,22): error TS1516: A character class range must not be bounded by another character class.
|
||||
regularExpressionScanning.ts(14,28): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(14,33): error TS1516: A character class range must not be bounded by another character class.
|
||||
regularExpressionScanning.ts(14,36): error TS1516: A character class range must not be bounded by another character class.
|
||||
regularExpressionScanning.ts(15,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,8): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,25): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,28): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(15,37): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,50): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,62): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(16,28): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(16,62): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(16,72): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
regularExpressionScanning.ts(17,28): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(17,62): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(17,72): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(18,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,6): error TS1524: Unknown Unicode property name.
|
||||
regularExpressionScanning.ts(18,28): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,31): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(18,32): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(18,33): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,39): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(18,40): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,43): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(18,49): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,52): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(18,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,62): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(18,63): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,66): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(19,6): error TS1524: Unknown Unicode property name.
|
||||
regularExpressionScanning.ts(19,31): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(19,32): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(19,39): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(19,43): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(19,52): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(19,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces.
|
||||
regularExpressionScanning.ts(19,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces.
|
||||
regularExpressionScanning.ts(19,62): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(19,66): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(19,67): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
regularExpressionScanning.ts(20,6): error TS1524: Unknown Unicode property name.
|
||||
regularExpressionScanning.ts(20,31): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(20,32): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(20,39): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(20,43): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(20,52): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(20,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces.
|
||||
regularExpressionScanning.ts(20,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces.
|
||||
regularExpressionScanning.ts(20,62): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(20,66): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(20,67): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(21,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,31): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,44): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,59): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
regularExpressionScanning.ts(23,19): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(23,31): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(23,47): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(23,59): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(25,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(25,23): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(26,3): error TS1512: '\c' must be followed by an ASCII letter.
|
||||
regularExpressionScanning.ts(26,6): error TS1512: '\c' must be followed by an ASCII letter.
|
||||
regularExpressionScanning.ts(26,15): error TS1512: '\c' must be followed by an ASCII letter.
|
||||
regularExpressionScanning.ts(26,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(26,20): error TS1512: '\c' must be followed by an ASCII letter.
|
||||
regularExpressionScanning.ts(26,23): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(26,26): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
regularExpressionScanning.ts(27,3): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,10): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,21): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,24): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,39): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,43): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,3): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,7): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,10): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,14): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,21): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,24): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,39): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(28,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(28,43): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(28,47): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
regularExpressionScanning.ts(29,3): error TS1511: '\q' is only available inside character class.
|
||||
regularExpressionScanning.ts(29,7): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,10): error TS1521: '\q' must be followed by string alternatives enclosed in braces.
|
||||
regularExpressionScanning.ts(29,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,21): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,23): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,38): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,39): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,43): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,46): error TS1005: '}' expected.
|
||||
regularExpressionScanning.ts(29,47): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(31,4): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(31,8): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(31,34): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(31,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(31,55): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(31,63): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(31,76): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(32,4): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(32,8): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(32,19): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,50): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,51): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,55): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(32,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,63): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(32,76): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(32,87): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
regularExpressionScanning.ts(33,8): error TS1005: '--' expected.
|
||||
regularExpressionScanning.ts(33,9): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,11): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,12): error TS1005: '--' expected.
|
||||
regularExpressionScanning.ts(33,15): error TS1522: A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,20): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,28): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,40): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,47): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,49): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,50): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,55): error TS1511: '\q' is only available inside character class.
|
||||
regularExpressionScanning.ts(33,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,66): error TS1508: Unexpected '-'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,67): error TS1005: '--' expected.
|
||||
regularExpressionScanning.ts(33,70): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,75): error TS1508: Unexpected '&'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,85): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,87): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(34,56): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(34,67): error TS1005: '&&' expected.
|
||||
regularExpressionScanning.ts(34,77): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(35,83): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(36,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(36,30): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(36,83): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(37,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(37,28): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(37,53): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(37,77): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(38,95): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(39,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(39,34): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(39,95): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(40,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(40,32): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(40,61): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(40,89): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(41,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(41,79): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(41,91): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
regularExpressionScanning.ts(42,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(42,89): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(42,101): error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
|
||||
|
||||
==== regularExpressionScanning.ts (231 errors) ====
|
||||
const regexes: RegExp[] = [
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es2018' or later.
|
||||
~
|
||||
!!! error TS1502: The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1500: Duplicate regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1502: The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es2022' or later.
|
||||
~
|
||||
!!! error TS1500: Duplicate regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1500: Duplicate regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1509: This regular expression flag cannot be toggled within a subpattern.
|
||||
~
|
||||
!!! error TS1509: This regular expression flag cannot be toggled within a subpattern.
|
||||
~
|
||||
!!! error TS1500: Duplicate regular expression flag.
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
~~
|
||||
!!! error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
~~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'.
|
||||
~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'.
|
||||
~
|
||||
!!! error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
~~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'.
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
~~
|
||||
!!! error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
~~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'.
|
||||
~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'.
|
||||
~
|
||||
!!! error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
~~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
~~~~~~
|
||||
!!! error TS1532: There is no capturing group named 'absent' in this regular expression.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~~~
|
||||
!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
|
||||
~~~
|
||||
!!! error TS1515: Named capturing groups with the same name must be mutually exclusive to each other.
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
~~~~~~~
|
||||
!!! error TS1507: There is nothing available for repetition.
|
||||
~~~~~
|
||||
!!! error TS1506: Numbers out of order in quantifier.
|
||||
~~~~~~~~~
|
||||
!!! error TS1507: There is nothing available for repetition.
|
||||
|
||||
!!! error TS1505: Incomplete quantifier. Digit expected.
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~
|
||||
!!! error TS1516: A character class range must not be bounded by another character class.
|
||||
~~~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~
|
||||
!!! error TS1516: A character class range must not be bounded by another character class.
|
||||
~~
|
||||
!!! error TS1516: A character class range must not be bounded by another character class.
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1524: Unknown Unicode property name.
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1524: Unknown Unicode property name.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~~
|
||||
!!! error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces.
|
||||
~~
|
||||
!!! error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1524: Unknown Unicode property name.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~~
|
||||
!!! error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces.
|
||||
~~
|
||||
!!! error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
~~
|
||||
!!! error TS1512: '\c' must be followed by an ASCII letter.
|
||||
~~
|
||||
!!! error TS1512: '\c' must be followed by an ASCII letter.
|
||||
~~
|
||||
!!! error TS1512: '\c' must be followed by an ASCII letter.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1512: '\c' must be followed by an ASCII letter.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
~~
|
||||
!!! error TS1511: '\q' is only available inside character class.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1521: '\q' must be followed by string alternatives enclosed in braces.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
|
||||
!!! error TS1005: '}' expected.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
|
||||
!!! error TS1005: '--' expected.
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
|
||||
!!! error TS1005: '--' expected.
|
||||
~~
|
||||
!!! error TS1522: A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
~~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
~~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
~~
|
||||
!!! error TS1511: '\q' is only available inside character class.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected '-'. Did you mean to escape it with backslash?
|
||||
|
||||
!!! error TS1005: '--' expected.
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
~
|
||||
!!! error TS1508: Unexpected '&'. Did you mean to escape it with backslash?
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
~~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
|
||||
!!! error TS1005: '&&' expected.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'esnext' or later.
|
||||
];
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
//// [tests/cases/compiler/regularExpressionScanning.ts] ////
|
||||
|
||||
//// [regularExpressionScanning.ts]
|
||||
const regexes: RegExp[] = [
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
];
|
||||
|
||||
|
||||
//// [regularExpressionScanning.js]
|
||||
var regexes = [
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
];
|
||||
@@ -0,0 +1,50 @@
|
||||
//// [tests/cases/compiler/regularExpressionScanning.ts] ////
|
||||
|
||||
=== regularExpressionScanning.ts ===
|
||||
const regexes: RegExp[] = [
|
||||
>regexes : Symbol(regexes, Decl(regularExpressionScanning.ts, 0, 5))
|
||||
>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
];
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
//// [tests/cases/compiler/regularExpressionScanning.ts] ////
|
||||
|
||||
=== regularExpressionScanning.ts ===
|
||||
const regexes: RegExp[] = [
|
||||
>regexes : RegExp[]
|
||||
> : ^^^^^^^^
|
||||
>[ // Flags /foo/visualstudiocode, // Pattern modifiers /(?med-ium:bar)/, // Capturing groups /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/, /(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/, // Quantifiers /{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/, // Character classes /[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v, // Character escapes /\c[\c0\ca\cQ\c\C]\c1\C/, /\c[\c0\ca\cQ\c\C]\c1\C/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v, // Unicode sets notation /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v, /[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v, /[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v, /[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v, /[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v, /[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v, /[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v, /[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v, /[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v, /[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,] : RegExp[]
|
||||
> : ^^^^^^^^
|
||||
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
>/foo/visualstudiocode : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
>/(?med-ium:bar)/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
>/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
>/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
>/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
>/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
>/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
>/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
>/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
>/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
>/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
>/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
>/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
>/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
>/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
>/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
>/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
>/\c[\c0\ca\cQ\c\C]\c1\C/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
>/\c[\c0\ca\cQ\c\C]\c1\C/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
>/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
>/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
>/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
>/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
>/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
>/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
>/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
>/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
>/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
>/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
>/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
>/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
>/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
>/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
>/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
];
|
||||
|
||||
@@ -0,0 +1,641 @@
|
||||
regularExpressionScanning.ts(3,10): error TS1502: The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.
|
||||
regularExpressionScanning.ts(3,11): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,12): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,13): error TS1500: Duplicate regular expression flag.
|
||||
regularExpressionScanning.ts(3,14): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,15): error TS1502: The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.
|
||||
regularExpressionScanning.ts(3,17): error TS1500: Duplicate regular expression flag.
|
||||
regularExpressionScanning.ts(3,18): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,19): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,20): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(3,21): error TS1500: Duplicate regular expression flag.
|
||||
regularExpressionScanning.ts(3,22): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(5,6): error TS1499: Unknown regular expression flag.
|
||||
regularExpressionScanning.ts(5,7): error TS1509: This regular expression flag cannot be toggled within a subpattern.
|
||||
regularExpressionScanning.ts(5,10): error TS1509: This regular expression flag cannot be toggled within a subpattern.
|
||||
regularExpressionScanning.ts(5,11): error TS1500: Duplicate regular expression flag.
|
||||
regularExpressionScanning.ts(7,9): error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
regularExpressionScanning.ts(7,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
regularExpressionScanning.ts(7,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
regularExpressionScanning.ts(7,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'.
|
||||
regularExpressionScanning.ts(7,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'.
|
||||
regularExpressionScanning.ts(7,42): error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
regularExpressionScanning.ts(7,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'.
|
||||
regularExpressionScanning.ts(8,9): error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
regularExpressionScanning.ts(8,24): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
regularExpressionScanning.ts(8,26): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
regularExpressionScanning.ts(8,29): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'.
|
||||
regularExpressionScanning.ts(8,37): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'.
|
||||
regularExpressionScanning.ts(8,42): error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
regularExpressionScanning.ts(8,43): error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'.
|
||||
regularExpressionScanning.ts(10,15): error TS1532: There is no capturing group named 'absent' in this regular expression.
|
||||
regularExpressionScanning.ts(10,59): error TS1515: Named capturing groups with the same name must be mutually exclusive to each other.
|
||||
regularExpressionScanning.ts(12,31): error TS1507: There is nothing available for repetition.
|
||||
regularExpressionScanning.ts(12,32): error TS1506: Numbers out of order in quantifier.
|
||||
regularExpressionScanning.ts(12,40): error TS1507: There is nothing available for repetition.
|
||||
regularExpressionScanning.ts(12,61): error TS1505: Incomplete quantifier. Digit expected.
|
||||
regularExpressionScanning.ts(14,12): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(14,15): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(14,22): error TS1516: A character class range must not be bounded by another character class.
|
||||
regularExpressionScanning.ts(14,28): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(14,33): error TS1516: A character class range must not be bounded by another character class.
|
||||
regularExpressionScanning.ts(14,36): error TS1516: A character class range must not be bounded by another character class.
|
||||
regularExpressionScanning.ts(15,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,8): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,25): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,28): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(15,37): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,50): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(15,62): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(16,28): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(16,62): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(17,28): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(17,62): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionScanning.ts(18,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,6): error TS1524: Unknown Unicode property name.
|
||||
regularExpressionScanning.ts(18,28): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,31): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(18,32): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(18,33): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,39): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(18,40): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,43): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(18,49): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,52): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(18,59): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,62): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(18,63): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(18,66): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(19,6): error TS1524: Unknown Unicode property name.
|
||||
regularExpressionScanning.ts(19,31): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(19,32): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(19,39): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(19,43): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(19,52): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(19,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces.
|
||||
regularExpressionScanning.ts(19,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces.
|
||||
regularExpressionScanning.ts(19,62): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(19,66): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(20,6): error TS1524: Unknown Unicode property name.
|
||||
regularExpressionScanning.ts(20,31): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(20,32): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(20,39): error TS1525: Expected a Unicode property value.
|
||||
regularExpressionScanning.ts(20,43): error TS1523: Expected a Unicode property name.
|
||||
regularExpressionScanning.ts(20,52): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(20,53): error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces.
|
||||
regularExpressionScanning.ts(20,57): error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces.
|
||||
regularExpressionScanning.ts(20,62): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(20,66): error TS1527: Expected a Unicode property name or value.
|
||||
regularExpressionScanning.ts(21,3): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,16): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,31): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,44): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(21,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,6): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,19): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,34): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(22,47): error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(23,19): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(23,31): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(23,47): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(25,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(25,23): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(26,3): error TS1512: '\c' must be followed by an ASCII letter.
|
||||
regularExpressionScanning.ts(26,6): error TS1512: '\c' must be followed by an ASCII letter.
|
||||
regularExpressionScanning.ts(26,15): error TS1512: '\c' must be followed by an ASCII letter.
|
||||
regularExpressionScanning.ts(26,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(26,20): error TS1512: '\c' must be followed by an ASCII letter.
|
||||
regularExpressionScanning.ts(26,23): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,3): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,10): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,21): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,24): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,39): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(27,43): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,3): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,7): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,10): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,14): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,21): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,24): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,39): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(28,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(28,43): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(28,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,3): error TS1511: '\q' is only available inside character class.
|
||||
regularExpressionScanning.ts(29,7): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,10): error TS1521: '\q' must be followed by string alternatives enclosed in braces.
|
||||
regularExpressionScanning.ts(29,17): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,21): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,23): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,38): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,39): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,41): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,42): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,43): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(29,45): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(29,46): error TS1005: '}' expected.
|
||||
regularExpressionScanning.ts(31,4): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(31,8): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(31,34): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(31,42): error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
regularExpressionScanning.ts(31,55): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(31,63): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(31,76): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(32,4): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(32,8): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(32,19): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,50): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,51): error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,55): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(32,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(32,63): error TS1517: Range out of order in character class.
|
||||
regularExpressionScanning.ts(32,76): error TS1535: This character cannot be escaped in a regular expression.
|
||||
regularExpressionScanning.ts(33,8): error TS1005: '--' expected.
|
||||
regularExpressionScanning.ts(33,9): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,11): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,12): error TS1005: '--' expected.
|
||||
regularExpressionScanning.ts(33,15): error TS1522: A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,20): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,28): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,40): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,47): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,49): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(33,50): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,55): error TS1511: '\q' is only available inside character class.
|
||||
regularExpressionScanning.ts(33,57): error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,61): error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,66): error TS1508: Unexpected '-'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,67): error TS1005: '--' expected.
|
||||
regularExpressionScanning.ts(33,70): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(33,75): error TS1508: Unexpected '&'. Did you mean to escape it with backslash?
|
||||
regularExpressionScanning.ts(33,85): error TS1520: Expected a class set oprand.
|
||||
regularExpressionScanning.ts(34,56): error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
regularExpressionScanning.ts(34,67): error TS1005: '&&' expected.
|
||||
regularExpressionScanning.ts(36,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(36,30): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(37,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(37,28): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(37,53): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(39,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(39,34): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(40,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(40,32): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(40,61): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(41,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(41,79): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(42,5): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
regularExpressionScanning.ts(42,89): error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
|
||||
|
||||
==== regularExpressionScanning.ts (198 errors) ====
|
||||
const regexes: RegExp[] = [
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
~
|
||||
!!! error TS1502: The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1500: Duplicate regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1502: The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously.
|
||||
~
|
||||
!!! error TS1500: Duplicate regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1500: Duplicate regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1509: This regular expression flag cannot be toggled within a subpattern.
|
||||
~
|
||||
!!! error TS1509: This regular expression flag cannot be toggled within a subpattern.
|
||||
~
|
||||
!!! error TS1500: Duplicate regular expression flag.
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
~~
|
||||
!!! error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
~~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'.
|
||||
~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'.
|
||||
~
|
||||
!!! error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
~~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'.
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
~~
|
||||
!!! error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x01'.
|
||||
~~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x53'.
|
||||
~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x03'.
|
||||
~
|
||||
!!! error TS1533: A decimal escape must refer to an existent capturing group. There are only 4 capturing groups in this regular expression.
|
||||
~~~~
|
||||
!!! error TS1487: Octal escape sequences are not allowed. Use the syntax '\x05'.
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
~~~~~~
|
||||
!!! error TS1532: There is no capturing group named 'absent' in this regular expression.
|
||||
~~~
|
||||
!!! error TS1515: Named capturing groups with the same name must be mutually exclusive to each other.
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
~~~~~~~
|
||||
!!! error TS1507: There is nothing available for repetition.
|
||||
~~~~~
|
||||
!!! error TS1506: Numbers out of order in quantifier.
|
||||
~~~~~~~~~
|
||||
!!! error TS1507: There is nothing available for repetition.
|
||||
|
||||
!!! error TS1505: Incomplete quantifier. Digit expected.
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~
|
||||
!!! error TS1516: A character class range must not be bounded by another character class.
|
||||
~~~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~
|
||||
!!! error TS1516: A character class range must not be bounded by another character class.
|
||||
~~
|
||||
!!! error TS1516: A character class range must not be bounded by another character class.
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
~~~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1524: Unknown Unicode property name.
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1524: Unknown Unicode property name.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~~
|
||||
!!! error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces.
|
||||
~~
|
||||
!!! error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1524: Unknown Unicode property name.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
|
||||
!!! error TS1525: Expected a Unicode property value.
|
||||
|
||||
!!! error TS1523: Expected a Unicode property name.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
~~
|
||||
!!! error TS1531: '\p' must be followed by a Unicode property value expression enclosed in braces.
|
||||
~~
|
||||
!!! error TS1531: '\P' must be followed by a Unicode property value expression enclosed in braces.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
|
||||
!!! error TS1527: Expected a Unicode property name or value.
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
~~~~~~~~~
|
||||
!!! error TS1528: Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set.
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
~~
|
||||
!!! error TS1512: '\c' must be followed by an ASCII letter.
|
||||
~~
|
||||
!!! error TS1512: '\c' must be followed by an ASCII letter.
|
||||
~~
|
||||
!!! error TS1512: '\c' must be followed by an ASCII letter.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1512: '\c' must be followed by an ASCII letter.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
~~
|
||||
!!! error TS1511: '\q' is only available inside character class.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1521: '\q' must be followed by string alternatives enclosed in braces.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
|
||||
!!! error TS1005: '}' expected.
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~~~~
|
||||
!!! error TS1530: Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected ']'. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
~~~
|
||||
!!! error TS1517: Range out of order in character class.
|
||||
~~
|
||||
!!! error TS1535: This character cannot be escaped in a regular expression.
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
|
||||
!!! error TS1005: '--' expected.
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
|
||||
!!! error TS1005: '--' expected.
|
||||
~~
|
||||
!!! error TS1522: A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?
|
||||
~~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
~~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
~~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
~~
|
||||
!!! error TS1511: '\q' is only available inside character class.
|
||||
~
|
||||
!!! error TS1508: Unexpected '{'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected '}'. Did you mean to escape it with backslash?
|
||||
~
|
||||
!!! error TS1508: Unexpected '-'. Did you mean to escape it with backslash?
|
||||
|
||||
!!! error TS1005: '--' expected.
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
~
|
||||
!!! error TS1508: Unexpected '&'. Did you mean to escape it with backslash?
|
||||
|
||||
!!! error TS1520: Expected a class set oprand.
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
~~
|
||||
!!! error TS1519: Operators must not be mixed within a character class. Wrap it in a nested class instead.
|
||||
|
||||
!!! error TS1005: '&&' expected.
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
~~~~~~~~~
|
||||
!!! error TS1518: Anything that would possibly match more than a single character is invalid inside a negated character class.
|
||||
];
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
//// [tests/cases/compiler/regularExpressionScanning.ts] ////
|
||||
|
||||
//// [regularExpressionScanning.ts]
|
||||
const regexes: RegExp[] = [
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
];
|
||||
|
||||
|
||||
//// [regularExpressionScanning.js]
|
||||
const regexes = [
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
];
|
||||
@@ -0,0 +1,50 @@
|
||||
//// [tests/cases/compiler/regularExpressionScanning.ts] ////
|
||||
|
||||
=== regularExpressionScanning.ts ===
|
||||
const regexes: RegExp[] = [
|
||||
>regexes : Symbol(regexes, Decl(regularExpressionScanning.ts, 0, 5))
|
||||
>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.regexp.d.ts, --, --) ... and 3 more)
|
||||
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
];
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
//// [tests/cases/compiler/regularExpressionScanning.ts] ////
|
||||
|
||||
=== regularExpressionScanning.ts ===
|
||||
const regexes: RegExp[] = [
|
||||
>regexes : RegExp[]
|
||||
> : ^^^^^^^^
|
||||
>[ // Flags /foo/visualstudiocode, // Pattern modifiers /(?med-ium:bar)/, // Capturing groups /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/, /\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u, /(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/, /(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/, // Quantifiers /{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/, // Character classes /[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u, /\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u, /\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u, /\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v, // Character escapes /\c[\c0\ca\cQ\c\C]\c1\C/, /\c[\c0\ca\cQ\c\C]\c1\C/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u, /\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v, // Unicode sets notation /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u, /[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v, /[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v, /[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v, /[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v, /[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v, /[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v, /[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v, /[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v, /[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v, /[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,] : RegExp[]
|
||||
> : ^^^^^^^^
|
||||
|
||||
// Flags
|
||||
/foo/visualstudiocode,
|
||||
>/foo/visualstudiocode : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Pattern modifiers
|
||||
/(?med-ium:bar)/,
|
||||
>/(?med-ium:bar)/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Capturing groups
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/,
|
||||
>/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u,
|
||||
>/\2()(\12)(foo)\1\0[\0\1\01\123](\3\03)\5\005/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/,
|
||||
>/(?<foo>)((?<bar>bar)bar)(?<baz>baz)|(foo(?<foo>foo))(?<baz>)/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/,
|
||||
>/(\k<bar>)\k<absent>(?<foo>foo)|(?<bar>)((?<foo>)|(bar(?<bar>bar)))/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Quantifiers
|
||||
/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/,
|
||||
>/{}{1,2}_{3}.{4,}?(foo){008}${32,16}\b{064,128}.+&*?\???\n{,256}{\\{,/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Character classes
|
||||
/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/,
|
||||
>/[-A-Za-z-z-aZ-A\d_-\d-.-.\r-\n\w-\W]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/,
|
||||
>/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u,
|
||||
>/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v,
|
||||
>/\p{L}\p{gc=L}\p{ASCII}\p{Invalid}[\p{L}\p{gc=L}\P{ASCII}\p{Invalid}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/,
|
||||
>/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u,
|
||||
>/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v,
|
||||
>/\p{InvalidProperty=Value}\p{=}\p{sc=}\P{=foo}[\p{}\p\\\P\P{]\p{/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/,
|
||||
>/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u,
|
||||
>/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v,
|
||||
>/\p{RGI_Emoji}\P{RGI_Emoji}[^\p{RGI_Emoji}\P{RGI_Emoji}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Character escapes
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/,
|
||||
>/\c[\c0\ca\cQ\c\C]\c1\C/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\c[\c0\ca\cQ\c\C]\c1\C/u,
|
||||
>/\c[\c0\ca\cQ\c\C]\c1\C/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/,
|
||||
>/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u,
|
||||
>/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v,
|
||||
>/\q\\\`[\q\\\`[\Q\\\Q{\q{foo|bar|baz]\q{]\q{/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
// Unicode sets notation
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/,
|
||||
>/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/ : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u,
|
||||
>/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v,
|
||||
>/[a--b[--][\d++[]]&&[[&0-9--]&&[\p{L}]--\P{L}-_-]]&&&\q{foo}[0---9][&&q&&&\q{bar}&&]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v,
|
||||
>/[[^\P{Decimal_Number}&&[0-9]]&&\p{L}&&\p{ID_Continue}--\p{ASCII}\p{CWCF}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v,
|
||||
>/[^\p{Emoji}\p{RGI_Emoji}][^\p{Emoji}--\p{RGI_Emoji}][^\p{Emoji}&&\p{RGI_Emoji}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v,
|
||||
>/[^\p{RGI_Emoji}\p{Emoji}][^\p{RGI_Emoji}--\p{Emoji}][^\p{RGI_Emoji}&&\p{Emoji}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v,
|
||||
>/[^\p{RGI_Emoji}\q{foo}][^\p{RGI_Emoji}--\q{foo}][^\p{RGI_Emoji}&&\q{foo}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v,
|
||||
>/[^\p{Emoji}[[\p{RGI_Emoji}]]][^\p{Emoji}--[[\p{RGI_Emoji}]]][^\p{Emoji}&&[[\p{RGI_Emoji}]]]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v,
|
||||
>/[^[[\p{RGI_Emoji}]]\p{Emoji}][^[[\p{RGI_Emoji}]]--\p{Emoji}][^[[\p{RGI_Emoji}]]&&\p{Emoji}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v,
|
||||
>/[^[[\p{RGI_Emoji}]]\q{foo}][^[[\p{RGI_Emoji}]]--\q{foo}][^[[\p{RGI_Emoji}]]&&\q{foo}]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
>/[^\q{foo|bar|baz}--\q{foo}--\q{bar}--\q{baz}][^\p{L}--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v,
|
||||
>/[^[[\q{foo|bar|baz}]]--\q{foo}--\q{bar}--\q{baz}][^[^[^\p{L}]]--\q{foo}--[\q{bar}]--[^[\q{baz}]]]/v : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
];
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
regularExpressionUnicodePropertyValueExpressionSuggestions.ts(1,19): error TS1529: Unknown Unicode property name or value.
|
||||
regularExpressionUnicodePropertyValueExpressionSuggestions.ts(1,28): error TS1524: Unknown Unicode property name.
|
||||
regularExpressionUnicodePropertyValueExpressionSuggestions.ts(1,45): error TS1526: Unknown Unicode property value.
|
||||
regularExpressionUnicodePropertyValueExpressionSuggestions.ts(1,55): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
|
||||
|
||||
==== regularExpressionUnicodePropertyValueExpressionSuggestions.ts (4 errors) ====
|
||||
const regex = /\p{ascii}\p{Sc=Unknown}\p{sc=unknownX}/u;
|
||||
~~~~~
|
||||
!!! error TS1529: Unknown Unicode property name or value.
|
||||
!!! related TS1369 regularExpressionUnicodePropertyValueExpressionSuggestions.ts:1:19: Did you mean 'ASCII'?
|
||||
~~
|
||||
!!! error TS1524: Unknown Unicode property name.
|
||||
!!! related TS1369 regularExpressionUnicodePropertyValueExpressionSuggestions.ts:1:28: Did you mean 'sc'?
|
||||
~~~~~~~~
|
||||
!!! error TS1526: Unknown Unicode property value.
|
||||
!!! related TS1369 regularExpressionUnicodePropertyValueExpressionSuggestions.ts:1:45: Did you mean 'Unknown'?
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
//// [tests/cases/compiler/regularExpressionUnicodePropertyValueExpressionSuggestions.ts] ////
|
||||
|
||||
//// [regularExpressionUnicodePropertyValueExpressionSuggestions.ts]
|
||||
const regex = /\p{ascii}\p{Sc=Unknown}\p{sc=unknownX}/u;
|
||||
|
||||
|
||||
//// [regularExpressionUnicodePropertyValueExpressionSuggestions.js]
|
||||
var regex = /\p{ascii}\p{Sc=Unknown}\p{sc=unknownX}/u;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
//// [tests/cases/compiler/regularExpressionUnicodePropertyValueExpressionSuggestions.ts] ////
|
||||
|
||||
=== regularExpressionUnicodePropertyValueExpressionSuggestions.ts ===
|
||||
const regex = /\p{ascii}\p{Sc=Unknown}\p{sc=unknownX}/u;
|
||||
>regex : Symbol(regex, Decl(regularExpressionUnicodePropertyValueExpressionSuggestions.ts, 0, 5))
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
//// [tests/cases/compiler/regularExpressionUnicodePropertyValueExpressionSuggestions.ts] ////
|
||||
|
||||
=== regularExpressionUnicodePropertyValueExpressionSuggestions.ts ===
|
||||
const regex = /\p{ascii}\p{Sc=Unknown}\p{sc=unknownX}/u;
|
||||
>regex : RegExp
|
||||
> : ^^^^^^
|
||||
>/\p{ascii}\p{Sc=Unknown}\p{sc=unknownX}/u : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
shebangError.ts(2,1): error TS18026: '#!' can only be used at the start of a file.
|
||||
shebangError.ts(2,2): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
shebangError.ts(2,8): error TS1499: Unknown regular expression flag.
|
||||
shebangError.ts(2,10): error TS1499: Unknown regular expression flag.
|
||||
shebangError.ts(2,12): error TS2304: Cannot find name 'env'.
|
||||
shebangError.ts(2,16): error TS1005: ';' expected.
|
||||
shebangError.ts(2,16): error TS2304: Cannot find name 'node'.
|
||||
|
||||
|
||||
==== shebangError.ts (5 errors) ====
|
||||
==== shebangError.ts (7 errors) ====
|
||||
var foo = 'Shebang is only allowed on the first line';
|
||||
#!/usr/bin/env node
|
||||
|
||||
~~
|
||||
!!! error TS18026: '#!' can only be used at the start of a file.
|
||||
~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~
|
||||
!!! error TS1499: Unknown regular expression flag.
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'env'.
|
||||
~~~~
|
||||
|
||||
@@ -3,7 +3,7 @@ templateLiteralEscapeSequence.ts(4,5): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(5,6): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(6,7): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(8,5): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(9,11): error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
|
||||
templateLiteralEscapeSequence.ts(9,5): error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
|
||||
templateLiteralEscapeSequence.ts(10,4): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(11,5): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(13,8): error TS1125: Hexadecimal digit expected.
|
||||
@@ -11,7 +11,7 @@ templateLiteralEscapeSequence.ts(14,9): error TS1125: Hexadecimal digit expected
|
||||
templateLiteralEscapeSequence.ts(15,10): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(16,11): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(18,9): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(19,15): error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
|
||||
templateLiteralEscapeSequence.ts(19,9): error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
|
||||
templateLiteralEscapeSequence.ts(20,8): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(21,9): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(23,4): error TS1125: Hexadecimal digit expected.
|
||||
@@ -19,7 +19,7 @@ templateLiteralEscapeSequence.ts(24,5): error TS1125: Hexadecimal digit expected
|
||||
templateLiteralEscapeSequence.ts(25,6): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(26,7): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(28,5): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(29,11): error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
|
||||
templateLiteralEscapeSequence.ts(29,5): error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
|
||||
templateLiteralEscapeSequence.ts(30,4): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(31,5): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(33,8): error TS1125: Hexadecimal digit expected.
|
||||
@@ -27,7 +27,7 @@ templateLiteralEscapeSequence.ts(34,9): error TS1125: Hexadecimal digit expected
|
||||
templateLiteralEscapeSequence.ts(35,10): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(36,11): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(38,9): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(39,15): error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
|
||||
templateLiteralEscapeSequence.ts(39,9): error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
|
||||
templateLiteralEscapeSequence.ts(40,8): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(41,9): error TS1125: Hexadecimal digit expected.
|
||||
templateLiteralEscapeSequence.ts(85,8): error TS1121: Octal literals are not allowed. Use the syntax '0o0'.
|
||||
@@ -62,7 +62,7 @@ templateLiteralEscapeSequence.ts(94,7): error TS1121: Octal literals are not all
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
`\u{ffffff}`;
|
||||
|
||||
~~~~~~
|
||||
!!! error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
|
||||
`\x`;
|
||||
|
||||
@@ -88,7 +88,7 @@ templateLiteralEscapeSequence.ts(94,7): error TS1121: Octal literals are not all
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
`${0}\u{ffffff}`;
|
||||
|
||||
~~~~~~
|
||||
!!! error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
|
||||
`${0}\x`;
|
||||
|
||||
@@ -114,7 +114,7 @@ templateLiteralEscapeSequence.ts(94,7): error TS1121: Octal literals are not all
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
`\u{ffffff}${0}`;
|
||||
|
||||
~~~~~~
|
||||
!!! error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
|
||||
`\x${0}`;
|
||||
|
||||
@@ -140,7 +140,7 @@ templateLiteralEscapeSequence.ts(94,7): error TS1121: Octal literals are not all
|
||||
|
||||
!!! error TS1125: Hexadecimal digit expected.
|
||||
`${0}\u{ffffff}${0}`;
|
||||
|
||||
~~~~~~
|
||||
!!! error TS1198: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
|
||||
`${0}\x${0}`;
|
||||
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
unicodeExtendedEscapesInRegularExpressions01.ts(1,17): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
|
||||
|
||||
==== unicodeExtendedEscapesInRegularExpressions01.ts (1 errors) ====
|
||||
var x = /\u{0}/gu;
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions01.ts]
|
||||
var x = /\u{0}/gu;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions01.js]
|
||||
var x = /\u{0}/gu;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions01.ts ===
|
||||
var x = /\u{0}/gu;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions01.ts, 0, 3))
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions01.ts ===
|
||||
var x = /\u{0}/gu;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{0}/gu : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions01.ts]
|
||||
var x = /\u{0}/gu;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions01.js]
|
||||
var x = /\u{0}/gu;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions01.ts ===
|
||||
var x = /\u{0}/gu;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions01.ts, 0, 3))
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions01.ts ===
|
||||
var x = /\u{0}/gu;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{0}/gu : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01_ES5.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions01_ES5.ts]
|
||||
var x = /\u{0}/g;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions01_ES5.js]
|
||||
var x = /\u{0}/g;
|
||||
@@ -1,6 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01_ES5.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions01_ES5.ts ===
|
||||
var x = /\u{0}/g;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions01_ES5.ts, 0, 3))
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01_ES5.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions01_ES5.ts ===
|
||||
var x = /\u{0}/g;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{0}/g : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01_ES6.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions01_ES6.ts]
|
||||
var x = /\u{0}/g;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions01_ES6.js]
|
||||
var x = /\u{0}/g;
|
||||
@@ -1,6 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01_ES6.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions01_ES6.ts ===
|
||||
var x = /\u{0}/g;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions01_ES6.ts, 0, 3))
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions01_ES6.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions01_ES6.ts ===
|
||||
var x = /\u{0}/g;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{0}/g : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
unicodeExtendedEscapesInRegularExpressions02.ts(1,18): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
|
||||
|
||||
==== unicodeExtendedEscapesInRegularExpressions02.ts (1 errors) ====
|
||||
var x = /\u{00}/gu;
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions02.ts]
|
||||
var x = /\u{00}/gu;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions02.js]
|
||||
var x = /\u{00}/gu;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions02.ts ===
|
||||
var x = /\u{00}/gu;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions02.ts, 0, 3))
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions02.ts ===
|
||||
var x = /\u{00}/gu;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{00}/gu : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions02.ts]
|
||||
var x = /\u{00}/gu;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions02.js]
|
||||
var x = /\u{00}/gu;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions02.ts ===
|
||||
var x = /\u{00}/gu;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions02.ts, 0, 3))
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions02.ts ===
|
||||
var x = /\u{00}/gu;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{00}/gu : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02_ES5.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions02_ES5.ts]
|
||||
var x = /\u{00}/g;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions02_ES5.js]
|
||||
var x = /\u{00}/g;
|
||||
@@ -1,6 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02_ES5.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions02_ES5.ts ===
|
||||
var x = /\u{00}/g;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions02_ES5.ts, 0, 3))
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02_ES5.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions02_ES5.ts ===
|
||||
var x = /\u{00}/g;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{00}/g : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02_ES6.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions02_ES6.ts]
|
||||
var x = /\u{00}/g;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions02_ES6.js]
|
||||
var x = /\u{00}/g;
|
||||
@@ -1,6 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02_ES6.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions02_ES6.ts ===
|
||||
var x = /\u{00}/g;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions02_ES6.ts, 0, 3))
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions02_ES6.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions02_ES6.ts ===
|
||||
var x = /\u{00}/g;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{00}/g : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
unicodeExtendedEscapesInRegularExpressions03.ts(1,20): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
|
||||
|
||||
==== unicodeExtendedEscapesInRegularExpressions03.ts (1 errors) ====
|
||||
var x = /\u{0000}/gu;
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions03.ts]
|
||||
var x = /\u{0000}/gu;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions03.js]
|
||||
var x = /\u{0000}/gu;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions03.ts ===
|
||||
var x = /\u{0000}/gu;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions03.ts, 0, 3))
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions03.ts ===
|
||||
var x = /\u{0000}/gu;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{0000}/gu : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions03.ts]
|
||||
var x = /\u{0000}/gu;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions03.js]
|
||||
var x = /\u{0000}/gu;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions03.ts ===
|
||||
var x = /\u{0000}/gu;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions03.ts, 0, 3))
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions03.ts ===
|
||||
var x = /\u{0000}/gu;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{0000}/gu : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03_ES5.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions03_ES5.ts]
|
||||
var x = /\u{0000}/g;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions03_ES5.js]
|
||||
var x = /\u{0000}/g;
|
||||
@@ -1,6 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03_ES5.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions03_ES5.ts ===
|
||||
var x = /\u{0000}/g;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions03_ES5.ts, 0, 3))
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03_ES5.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions03_ES5.ts ===
|
||||
var x = /\u{0000}/g;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{0000}/g : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03_ES6.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions03_ES6.ts]
|
||||
var x = /\u{0000}/g;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions03_ES6.js]
|
||||
var x = /\u{0000}/g;
|
||||
@@ -1,6 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03_ES6.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions03_ES6.ts ===
|
||||
var x = /\u{0000}/g;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions03_ES6.ts, 0, 3))
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions03_ES6.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions03_ES6.ts ===
|
||||
var x = /\u{0000}/g;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{0000}/g : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
unicodeExtendedEscapesInRegularExpressions04.ts(1,24): error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
|
||||
|
||||
==== unicodeExtendedEscapesInRegularExpressions04.ts (1 errors) ====
|
||||
var x = /\u{00000000}/gu;
|
||||
~
|
||||
!!! error TS1501: This regular expression flag is only available when targeting 'es6' or later.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions04.ts]
|
||||
var x = /\u{00000000}/gu;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions04.js]
|
||||
var x = /\u{00000000}/gu;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions04.ts ===
|
||||
var x = /\u{00000000}/gu;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions04.ts, 0, 3))
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions04.ts ===
|
||||
var x = /\u{00000000}/gu;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{00000000}/gu : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions04.ts]
|
||||
var x = /\u{00000000}/gu;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions04.js]
|
||||
var x = /\u{00000000}/gu;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions04.ts ===
|
||||
var x = /\u{00000000}/gu;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions04.ts, 0, 3))
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions04.ts ===
|
||||
var x = /\u{00000000}/gu;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{00000000}/gu : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04_ES5.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions04_ES5.ts]
|
||||
var x = /\u{00000000}/g;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions04_ES5.js]
|
||||
var x = /\u{00000000}/g;
|
||||
@@ -1,6 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04_ES5.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions04_ES5.ts ===
|
||||
var x = /\u{00000000}/g;
|
||||
>x : Symbol(x, Decl(unicodeExtendedEscapesInRegularExpressions04_ES5.ts, 0, 3))
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04_ES5.ts] ////
|
||||
|
||||
=== unicodeExtendedEscapesInRegularExpressions04_ES5.ts ===
|
||||
var x = /\u{00000000}/g;
|
||||
>x : RegExp
|
||||
> : ^^^^^^
|
||||
>/\u{00000000}/g : RegExp
|
||||
> : ^^^^^^
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
//// [tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInRegularExpressions04_ES6.ts] ////
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions04_ES6.ts]
|
||||
var x = /\u{00000000}/g;
|
||||
|
||||
|
||||
//// [unicodeExtendedEscapesInRegularExpressions04_ES6.js]
|
||||
var x = /\u{00000000}/g;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user