Fix merge issues

This commit is contained in:
Jason Freeman 2014-11-25 12:03:55 -08:00
parent f6266fc99e
commit d43ed2f10e
5 changed files with 24 additions and 53 deletions

View file

@ -1272,17 +1272,21 @@ module ts {
function parseContextualModifier(t: SyntaxKind): boolean { function parseContextualModifier(t: SyntaxKind): boolean {
return token === t && tryParse(() => { return token === t && tryParse(() => {
nextToken(); nextToken();
return token === SyntaxKind.OpenBracketToken || isLiteralPropertyName(); return canFollowModifier();
}); });
} }
function parseAnyContextualModifier(): boolean { function parseAnyContextualModifier(): boolean {
return isModifier(token) && tryParse(() => { return isModifier(token) && tryParse(() => {
nextToken(); nextToken();
return token === SyntaxKind.OpenBracketToken || isLiteralPropertyName(); return canFollowModifier();
}); });
} }
function canFollowModifier(): boolean {
return token === SyntaxKind.OpenBracketToken || token === SyntaxKind.AsteriskToken || isLiteralPropertyName();
}
// True if positioned at the start of a list element // True if positioned at the start of a list element
function isListElement(kind: ParsingContext, inErrorRecovery: boolean): boolean { function isListElement(kind: ParsingContext, inErrorRecovery: boolean): boolean {
switch (kind) { switch (kind) {

View file

@ -1,16 +1,7 @@
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts(1,11): error TS1136: Property assignment expected. tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts(1,11): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts(1,18): error TS1005: ',' expected.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts(1,24): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'.
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts (4 errors) ==== ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts (1 errors) ====
var v = { [yield]: foo } var v = { [yield]: foo }
~ ~~~~~~~
!!! error TS1136: Property assignment expected. !!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
~
!!! error TS1005: ',' expected.
~
!!! error TS1128: Declaration or statement expected.
~~~~~
!!! error TS2304: Cannot find name 'yield'.

View file

@ -1,15 +1,9 @@
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts(2,13): error TS1136: Property assignment expected. tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts(2,13): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts(2,20): error TS1005: ',' expected.
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts(3,1): error TS1128: Declaration or statement expected.
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts (3 errors) ==== ==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts (1 errors) ====
function * foo() { function * foo() {
var v = { [yield]: foo } var v = { [yield]: foo }
~ ~~~~~~~
!!! error TS1136: Property assignment expected. !!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
~ }
!!! error TS1005: ',' expected.
}
~
!!! error TS1128: Declaration or statement expected.

View file

@ -1,16 +1,7 @@
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts(1,12): error TS1003: Identifier expected. tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts(1,12): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts(1,22): error TS1005: ',' expected.
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts(1,26): error TS1128: Declaration or statement expected.
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts(1,13): error TS2304: Cannot find name 'foo'.
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts (4 errors) ==== ==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts (1 errors) ====
var v = { *[foo()]() { } } var v = { *[foo()]() { } }
~ ~~~~~~~
!!! error TS1003: Identifier expected. !!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
~
!!! error TS1005: ',' expected.
~
!!! error TS1128: Declaration or statement expected.
~~~
!!! error TS2304: Cannot find name 'foo'.

View file

@ -1,18 +1,9 @@
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(2,5): error TS1003: Identifier expected. tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(2,5): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(2,10): error TS1005: ';' expected.
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(2,13): error TS1005: '=>' expected.
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(3,1): error TS1128: Declaration or statement expected.
==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts (4 errors) ==== ==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts (1 errors) ====
class C { class C {
*[foo]() { } *[foo]() { }
~ ~~~~~
!!! error TS1003: Identifier expected. !!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
~ }
!!! error TS1005: ';' expected.
~
!!! error TS1005: '=>' expected.
}
~
!!! error TS1128: Declaration or statement expected.