From 6be13a90b5d3e4afdc25e57db62c5830a435b689 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 2 Mar 2015 12:07:09 -0800 Subject: [PATCH] Fixed error message. --- src/compiler/diagnosticInformationMap.generated.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- src/compiler/scanner.ts | 2 +- .../unicodeExtendedEscapesInStrings21_ES5.errors.txt | 4 ++-- .../unicodeExtendedEscapesInStrings21_ES6.errors.txt | 4 ++-- .../unicodeExtendedEscapesInStrings22_ES5.errors.txt | 4 ++-- .../unicodeExtendedEscapesInStrings22_ES6.errors.txt | 4 ++-- .../unicodeExtendedEscapesInStrings24_ES5.errors.txt | 4 ++-- .../unicodeExtendedEscapesInStrings24_ES6.errors.txt | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 2fd980ffffa0f..74874ce1cc69f 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -156,7 +156,7 @@ module ts { Catch_clause_variable_cannot_have_a_type_annotation: { code: 1196, category: DiagnosticCategory.Error, key: "Catch clause variable cannot have a type annotation." }, Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: DiagnosticCategory.Error, key: "Catch clause variable cannot have an initializer." }, An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: DiagnosticCategory.Error, key: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." }, - expected: { code: 1199, category: DiagnosticCategory.Error, key: "'}' expected." }, + Unterminated_Unicode_escape_sequence: { code: 1199, category: DiagnosticCategory.Error, key: "Unterminated Unicode escape sequence." }, Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." }, Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 87632e4089d61..f308c37f69450 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -615,7 +615,7 @@ "category": "Error", "code": 1198 }, - "'}' expected.": { + "Unterminated Unicode escape sequence.": { "category": "Error", "code": 1199 }, diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 1f050a0ec5be8..9bb66f10f4182 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -848,7 +848,7 @@ module ts { pos++; } else { - error(Diagnostics.expected); // '}' expected. + error(Diagnostics.Unterminated_Unicode_escape_sequence); isInvalidExtendedEscape = true; } diff --git a/tests/baselines/reference/unicodeExtendedEscapesInStrings21_ES5.errors.txt b/tests/baselines/reference/unicodeExtendedEscapesInStrings21_ES5.errors.txt index 9264e7209295d..d722dc8ed067d 100644 --- a/tests/baselines/reference/unicodeExtendedEscapesInStrings21_ES5.errors.txt +++ b/tests/baselines/reference/unicodeExtendedEscapesInStrings21_ES5.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings21_ES5.ts(2,15): error TS1199: '}' expected. +tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings21_ES5.ts(2,15): error TS1199: Unterminated Unicode escape sequence. ==== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings21_ES5.ts (1 errors) ==== var x = "\u{67"; -!!! error TS1199: '}' expected. +!!! error TS1199: Unterminated Unicode escape sequence. \ No newline at end of file diff --git a/tests/baselines/reference/unicodeExtendedEscapesInStrings21_ES6.errors.txt b/tests/baselines/reference/unicodeExtendedEscapesInStrings21_ES6.errors.txt index 09ad97f6b9382..48353fb19e319 100644 --- a/tests/baselines/reference/unicodeExtendedEscapesInStrings21_ES6.errors.txt +++ b/tests/baselines/reference/unicodeExtendedEscapesInStrings21_ES6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings21_ES6.ts(2,15): error TS1199: '}' expected. +tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings21_ES6.ts(2,15): error TS1199: Unterminated Unicode escape sequence. ==== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings21_ES6.ts (1 errors) ==== var x = "\u{67"; -!!! error TS1199: '}' expected. +!!! error TS1199: Unterminated Unicode escape sequence. \ No newline at end of file diff --git a/tests/baselines/reference/unicodeExtendedEscapesInStrings22_ES5.errors.txt b/tests/baselines/reference/unicodeExtendedEscapesInStrings22_ES5.errors.txt index 4e27d76ddca8e..1b24e491ad714 100644 --- a/tests/baselines/reference/unicodeExtendedEscapesInStrings22_ES5.errors.txt +++ b/tests/baselines/reference/unicodeExtendedEscapesInStrings22_ES5.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings22_ES5.ts(2,27): error TS1199: '}' expected. +tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings22_ES5.ts(2,27): error TS1199: Unterminated Unicode escape sequence. ==== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings22_ES5.ts (1 errors) ==== var x = "\u{00000000000067"; -!!! error TS1199: '}' expected. +!!! error TS1199: Unterminated Unicode escape sequence. \ No newline at end of file diff --git a/tests/baselines/reference/unicodeExtendedEscapesInStrings22_ES6.errors.txt b/tests/baselines/reference/unicodeExtendedEscapesInStrings22_ES6.errors.txt index 647833b6379d1..9627d4aadbcb3 100644 --- a/tests/baselines/reference/unicodeExtendedEscapesInStrings22_ES6.errors.txt +++ b/tests/baselines/reference/unicodeExtendedEscapesInStrings22_ES6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings22_ES6.ts(2,27): error TS1199: '}' expected. +tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings22_ES6.ts(2,27): error TS1199: Unterminated Unicode escape sequence. ==== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings22_ES6.ts (1 errors) ==== var x = "\u{00000000000067"; -!!! error TS1199: '}' expected. +!!! error TS1199: Unterminated Unicode escape sequence. \ No newline at end of file diff --git a/tests/baselines/reference/unicodeExtendedEscapesInStrings24_ES5.errors.txt b/tests/baselines/reference/unicodeExtendedEscapesInStrings24_ES5.errors.txt index 1a6683b9fb9aa..ef70987871437 100644 --- a/tests/baselines/reference/unicodeExtendedEscapesInStrings24_ES5.errors.txt +++ b/tests/baselines/reference/unicodeExtendedEscapesInStrings24_ES5.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings24_ES5.ts(2,27): error TS1199: '}' expected. +tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings24_ES5.ts(2,27): error TS1199: Unterminated Unicode escape sequence. ==== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings24_ES5.ts (1 errors) ==== var x = "\u{00000000000067 -!!! error TS1199: '}' expected. +!!! error TS1199: Unterminated Unicode escape sequence. \ No newline at end of file diff --git a/tests/baselines/reference/unicodeExtendedEscapesInStrings24_ES6.errors.txt b/tests/baselines/reference/unicodeExtendedEscapesInStrings24_ES6.errors.txt index 88d49f47aab64..8ddc365aa9405 100644 --- a/tests/baselines/reference/unicodeExtendedEscapesInStrings24_ES6.errors.txt +++ b/tests/baselines/reference/unicodeExtendedEscapesInStrings24_ES6.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings24_ES6.ts(2,27): error TS1199: '}' expected. +tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings24_ES6.ts(2,27): error TS1199: Unterminated Unicode escape sequence. ==== tests/cases/conformance/es6/unicodeExtendedEscapes/unicodeExtendedEscapesInStrings24_ES6.ts (1 errors) ==== var x = "\u{00000000000067 -!!! error TS1199: '}' expected. +!!! error TS1199: Unterminated Unicode escape sequence. \ No newline at end of file