mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add es6 target
This commit is contained in:
@@ -186,7 +186,7 @@ module TypeScript.Scanner {
|
||||
var lastTokenInfo = { leadingTriviaWidth: -1, width: -1 };
|
||||
var lastTokenInfoTokenID: number = -1;
|
||||
|
||||
var triviaScanner = createScannerInternal(ts.ScriptTarget.ES5, SimpleText.fromString(""), () => { });
|
||||
var triviaScanner = createScannerInternal(ts.ScriptTarget.Latest, SimpleText.fromString(""), () => { });
|
||||
|
||||
interface IScannerToken extends ISyntaxToken {
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ module TypeScript {
|
||||
if (languageVersion === ts.ScriptTarget.ES3) {
|
||||
return Unicode.lookupInUnicodeMap(code, Unicode.unicodeES3IdentifierStart);
|
||||
}
|
||||
else if (languageVersion === ts.ScriptTarget.ES5) {
|
||||
else if (languageVersion >= ts.ScriptTarget.ES5) {
|
||||
return Unicode.lookupInUnicodeMap(code, Unicode.unicodeES5IdentifierStart);
|
||||
}
|
||||
else {
|
||||
@@ -96,7 +96,7 @@ module TypeScript {
|
||||
if (languageVersion === ts.ScriptTarget.ES3) {
|
||||
return Unicode.lookupInUnicodeMap(code, Unicode.unicodeES3IdentifierPart);
|
||||
}
|
||||
else if (languageVersion === ts.ScriptTarget.ES5) {
|
||||
else if (languageVersion >= ts.ScriptTarget.ES5) {
|
||||
return Unicode.lookupInUnicodeMap(code, Unicode.unicodeES5IdentifierPart);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user