Recovered deleted, renumbered existing, reworded some.

This commit is contained in:
Daniel Rosenwasser 2014-08-07 15:44:21 -07:00
parent d7e3447909
commit 122b78612c
16 changed files with 88 additions and 63 deletions

View File

@ -5,6 +5,7 @@ module ts {
Unknown_compiler_option_0: { code: 6001, category: DiagnosticCategory.Error, key: "Unknown compiler option '{0}'." },
File_0_not_found: { code: 6002, category: DiagnosticCategory.Error, key: "File '{0}' not found." },
File_0_must_have_extension_ts_or_d_ts: { code: 6003, category: DiagnosticCategory.Error, key: "File '{0}' must have extension '.ts' or '.d.ts'." },
Unterminated_string_literal: { code: 1002, category: DiagnosticCategory.Error, key: "Unterminated string literal." },
Identifier_expected: { code: 1003, category: DiagnosticCategory.Error, key: "Identifier expected." },
_0_expected: { code: 1005, category: DiagnosticCategory.Error, key: "'{0}' expected." },
Trailing_comma_not_allowed: { code: 1009, category: DiagnosticCategory.Error, key: "Trailing comma not allowed." },
@ -21,10 +22,16 @@ module ts {
An_index_signature_must_have_a_type_annotation: { code: 1021, category: DiagnosticCategory.Error, key: "An index signature must have a type annotation." },
An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: DiagnosticCategory.Error, key: "An index signature parameter must have a type annotation." },
An_index_signature_parameter_type_must_be_string_or_number: { code: 1023, category: DiagnosticCategory.Error, key: "An index signature parameter type must be 'string' or 'number'." },
A_class_or_interface_declaration_can_only_have_one_extends_clause: { code: 1024, category: DiagnosticCategory.Error, key: "A class or interface declaration can only have one 'extends' clause." },
An_extends_clause_must_precede_am_implements_clause: { code: 1025, category: DiagnosticCategory.Error, key: "An 'extends' clause must precede am 'implements' clause." },
A_class_can_only_extend_a_single_class: { code: 1026, category: DiagnosticCategory.Error, key: "A class can only extend a single class." },
A_class_declaration_can_only_have_one_implements_clause: { code: 1027, category: DiagnosticCategory.Error, key: "A class declaration can only have one 'implements' clause." },
Accessibility_modifier_already_seen: { code: 1028, category: DiagnosticCategory.Error, key: "Accessibility modifier already seen." },
_0_modifier_must_precede_1_modifier: { code: 1029, category: DiagnosticCategory.Error, key: "'{0}' modifier must precede '{1}' modifier." },
_0_modifier_already_seen: { code: 1030, category: DiagnosticCategory.Error, key: "'{0}' modifier already seen." },
_0_modifier_cannot_appear_on_a_class_element: { code: 1031, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a class element." },
An_interface_declaration_cannot_have_an_implements_clause: { code: 1032, category: DiagnosticCategory.Error, key: "An interface declaration cannot have an 'implements' clause." },
super_must_be_followed_by_an_argument_list_or_member_access: { code: 1034, category: DiagnosticCategory.Error, key: "'super' must be followed by an argument list or member access." },
Only_ambient_modules_can_use_quoted_names: { code: 1035, category: DiagnosticCategory.Error, key: "Only ambient modules can use quoted names." },
Statements_are_not_allowed_in_ambient_contexts: { code: 1036, category: DiagnosticCategory.Error, key: "Statements are not allowed in ambient contexts." },
A_function_implementation_cannot_be_declared_in_an_ambient_context: { code: 1037, category: DiagnosticCategory.Error, key: "A function implementation cannot be declared in an ambient context." },
@ -46,6 +53,7 @@ module ts {
Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: DiagnosticCategory.Error, key: "Ambient enum elements can only have integer literal initializers." },
Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: DiagnosticCategory.Error, key: "Unexpected token. A constructor, method, accessor, or property was expected." },
A_declare_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used with an import declaration." },
Invalid_reference_comment: { code: 1084, category: DiagnosticCategory.Error, key: "Invalid reference comment." },
Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: DiagnosticCategory.Error, key: "Octal literals are not available when targeting ECMAScript 5 and higher." },
An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: DiagnosticCategory.Error, key: "An accessor cannot be declared in an ambient context." },
_0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a constructor declaration." },
@ -209,7 +217,7 @@ module ts {
The_current_host_does_not_support_the_0_option: { code: 5001, category: DiagnosticCategory.Error, key: "The current host does not support the '{0}' option." },
Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: DiagnosticCategory.Error, key: "Cannot find the common subdirectory path for the input files." },
Cannot_read_file_0_Colon_1: { code: 5012, category: DiagnosticCategory.Error, key: "Cannot read file '{0}': {1}" },
Unsupported_file_encoding: { code: 5013, category: DiagnosticCategory.NoPrefix, key: "Unsupported file encoding." },
Unsupported_file_encoding: { code: 5013, category: DiagnosticCategory.Error, key: "Unsupported file encoding." },
Could_not_write_file_0_Colon_1: { code: 5033, category: DiagnosticCategory.Error, key: "Could not write file '{0}': {1}" },
Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option: { code: 5038, category: DiagnosticCategory.Error, key: "Option mapRoot cannot be specified without specifying sourcemap option." },
Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: { code: 5039, category: DiagnosticCategory.Error, key: "Option sourceRoot cannot be specified without specifying sourcemap option." },
@ -264,7 +272,6 @@ module ts {
Digit_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Digit expected." },
Hexadecimal_digit_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Hexadecimal digit expected." },
Unexpected_end_of_text: { code: -9999999, category: DiagnosticCategory.Error, key: "Unexpected end of text." },
Unterminated_string_constant: { code: -9999999, category: DiagnosticCategory.Error, key: "Unterminated string constant." },
Invalid_character: { code: -9999999, category: DiagnosticCategory.Error, key: "Invalid character." },
Declaration_or_statement_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Declaration or statement expected." },
Statement_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Statement expected." },
@ -280,13 +287,11 @@ module ts {
Type_parameter_declaration_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Type parameter declaration expected." },
Type_argument_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Type argument expected." },
String_literal_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "String literal expected." },
super_must_be_followed_by_argument_list_or_member_access: { code: -9999999, category: DiagnosticCategory.Error, key: "'super' must be followed by argument list or member access." },
Line_break_not_permitted_here: { code: -9999999, category: DiagnosticCategory.Error, key: "Line break not permitted here." },
catch_or_finally_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "'catch' or 'finally' expected." },
Block_or_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Block or ';' expected." },
Modifiers_not_permitted_on_index_signature_members: { code: -9999999, category: DiagnosticCategory.Error, key: "Modifiers not permitted on index signature members." },
Declaration_expected: { code: -9999999, category: DiagnosticCategory.Error, key: "Declaration expected." },
Invalid_reference_comment: { code: -9999999, category: DiagnosticCategory.Error, key: "Invalid reference comment." },
File_0_is_not_an_external_module: { code: -9999999, category: DiagnosticCategory.Error, key: "File '{0}' is not an external module." },
Excessive_stack_depth_comparing_types_0_and_1: { code: -9999999, category: DiagnosticCategory.Error, key: "Excessive stack depth comparing types '{0}' and '{1}'." },
Type_0_is_not_assignable_to_type_1_Colon: { code: -9999999, category: DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}':" },

View File

@ -12,6 +12,10 @@
"code": 6003
},
"Unterminated string literal.": {
"category": "Error",
"code": 1002
},
"Identifier expected.": {
"category": "Error",
"code": 1003
@ -76,6 +80,22 @@
"category": "Error",
"code": 1023
},
"A class or interface declaration can only have one 'extends' clause.": {
"category": "Error",
"code": 1024
},
"An 'extends' clause must precede am 'implements' clause.": {
"category": "Error",
"code": 1025
},
"A class can only extend a single class.": {
"category": "Error",
"code": 1026
},
"A class declaration can only have one 'implements' clause.": {
"category": "Error",
"code": 1027
},
"Accessibility modifier already seen.": {
"category": "Error",
"code": 1028
@ -92,6 +112,14 @@
"category": "Error",
"code": 1031
},
"An interface declaration cannot have an 'implements' clause.": {
"category": "Error",
"code": 1032
},
"'super' must be followed by an argument list or member access.": {
"category": "Error",
"code": 1034
},
"Only ambient modules can use quoted names.": {
"category": "Error",
"code": 1035
@ -176,6 +204,10 @@
"category": "Error",
"code": 1079
},
"Invalid reference comment.": {
"category": "Error",
"code": 1084
},
"Octal literals are not available when targeting ECMAScript 5 and higher.": {
"category": "Error",
"code": 1085
@ -831,7 +863,7 @@
"code": 5012
},
"Unsupported file encoding.": {
"category": "NoPrefix",
"category": "Error",
"code": 5013
},
"Could not write file '{0}': {1}": {
@ -1051,10 +1083,6 @@
"category": "Error",
"code": -9999999
},
"Unterminated string constant.": {
"category": "Error",
"code": -9999999
},
"Invalid character.": {
"category": "Error",
"code": -9999999
@ -1115,10 +1143,6 @@
"category": "Error",
"code": -9999999
},
"'super' must be followed by argument list or member access.": {
"category": "Error",
"code": -9999999
},
"Line break not permitted here.": {
"category": "Error",
"code": -9999999
@ -1139,10 +1163,6 @@
"category": "Error",
"code": -9999999
},
"Invalid reference comment.": {
"category": "Error",
"code": -9999999
},
"File '{0}' is not an external module.": {
"category": "Error",
"code": -9999999

View File

@ -1944,7 +1944,7 @@ module ts {
primaryExpression.kind === SyntaxKind.SuperKeyword && token !== SyntaxKind.OpenParenToken && token !== SyntaxKind.DotToken;
if (illegalUsageOfSuperKeyword) {
error(Diagnostics.super_must_be_followed_by_argument_list_or_member_access);
error(Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access);
}
var expr = parseCallAndAccess(primaryExpression, /* inNewExpression */ false);

View File

@ -515,7 +515,7 @@ module ts {
}
if (isLineBreak(ch)) {
result += text.substring(start, pos);
error(Diagnostics.Unterminated_string_constant);
error(Diagnostics.Unterminated_string_literal);
break;
}
pos++;

View File

@ -76,19 +76,19 @@
class Derived extends C {
constructor() { super(); super = value; }
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! Invalid left-hand side of assignment expression.
foo() { super = value }
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! Invalid left-hand side of assignment expression.
static sfoo() { super = value; }
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! Invalid left-hand side of assignment expression.
}

View File

@ -137,12 +137,12 @@
super();
super *= value;
~~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
super += value;
~~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! Invalid left-hand side of assignment expression.
}
@ -150,12 +150,12 @@
foo() {
super *= value;
~~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
super += value;
~~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! Invalid left-hand side of assignment expression.
}
@ -163,12 +163,12 @@
static sfoo() {
super *= value;
~~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
super += value;
~~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! Invalid left-hand side of assignment expression.
}

View File

@ -72,7 +72,7 @@
constructor() {
super<string>();
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
super();
}
}

View File

@ -3,7 +3,7 @@
M() {
super<T>(0);
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' can only be referenced in a derived class.
}

View File

@ -10,7 +10,7 @@
"
"Should error because of newline.
!!! Unterminated string constant.
!!! Unterminated string literal.
"Should error because of end of file.
!!! Unexpected end of text.

View File

@ -2,46 +2,46 @@
// Srtings missing line terminator
var es1 = "line 1
!!! Unterminated string constant.
!!! Unterminated string literal.
";
!!! Unterminated string constant.
!!! Unterminated string literal.
var es2 = 'line 1
!!! Unterminated string constant.
!!! Unterminated string literal.
';
!!! Unterminated string constant.
!!! Unterminated string literal.
// Space after backslash
var es3 = 'line 1\
!!! Unterminated string constant.
!!! Unterminated string literal.
';
!!! Unterminated string constant.
!!! Unterminated string literal.
var es4 = 'line 1\
!!! Unterminated string constant.
!!! Unterminated string literal.
';
!!! Unterminated string constant.
!!! Unterminated string literal.
// Unterminated strings
var es5 = "unterminated
!!! Unterminated string constant.
!!! Unterminated string literal.
var es6 = 'unterminated
!!! Unterminated string constant.
!!! Unterminated string literal.
// wrong terminator
var es7 = "unterminated '
!!! Unterminated string constant.
!!! Unterminated string literal.
var es8 = 'unterminated "
!!! Unterminated string constant.
!!! Unterminated string literal.
// wrong unicode sequences
var es9 = "\u00";

View File

@ -7,21 +7,21 @@
class Q extends P {
xx = super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
static yy = super; // error for static initializer accessing super
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class
// Super is not allowed in constructor args
constructor(public z = super, zz = super, zzz = () => super) {
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' cannot be referenced in constructor arguments.
~~~~~
@ -33,7 +33,7 @@
foo(zz = super) {
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
super.x();
super.y(); // error
~
@ -42,7 +42,7 @@
static bar(zz = super) {
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
super.x(); // error
~
!!! Property 'x' does not exist on type 'typeof P'.

View File

@ -3,17 +3,17 @@
// super in a non class context
var x = super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' can only be referenced in a derived class.
var y = () => super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' can only be referenced in a derived class.
var z = () => () => () => super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' can only be referenced in a derived class.
}
@ -47,7 +47,7 @@
// super call in a lambda in a function expression in a constructor
(function() { return () => super; })();
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class
}
@ -65,7 +65,7 @@
// super call in a lambda in a function expression in a constructor
(function() { return () => super; })();
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~
!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class
}
@ -73,12 +73,12 @@
// super in static functions
var s = super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
var x = () => super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
var y = () => () => () => super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
}
}

View File

@ -65,12 +65,12 @@
// super in a nested lambda in a constructor
var x = () => () => super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
}
sayHello(): void {
// super in a nested lambda in a method
var x = () => () => super;
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
}
}

View File

@ -7,7 +7,7 @@
constructor() {
super<T>();
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~~~~~~
!!! Supplied parameters do not match any signature of call target.
}

View File

@ -7,7 +7,7 @@
constructor(x) {
super<T>(x);
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
~~~~~~~~~~~
!!! Supplied parameters do not match any signature of call target.
}

View File

@ -8,7 +8,7 @@
constructor() {
super<T>();
~
!!! 'super' must be followed by argument list or member access.
!!! 'super' must be followed by an argument list or member access.
}
bar() {
super.bar<T>(null);