Add snapshot of release-1.0.3 sources

This commit is contained in:
Mohamed Hegazy
2014-07-12 15:32:26 -07:00
parent 99ec3a9688
commit 79727ee12f
13130 changed files with 2079574 additions and 0 deletions
+707
View File
@@ -0,0 +1,707 @@
/// <reference path='..\..\src\Services\es5compat.ts' />
///<reference path='..\..\src\compiler\syntax\references.ts' />
///<reference path='..\..\src\compiler\syntax\emitter.ts' />
///<reference path='..\..\src\compiler\syntax\prettyPrinter.ts' />
///<reference path='Test262.ts' />
///<reference path='incremental\IncrementalParserTests.ts' />
///<reference path='..\..\src\compiler\core\environment.ts' />
///<reference path='..\..\src\harness\diff.ts' />
///<reference path='..\..\src\compiler\syntaxTreeToAstVisitor.ts' />
var timer = new TypeScript.Timer();
var specificFile: string =
// "ExportAssignment5.ts";
undefined;
var generate = false;
var htmlReport = new Diff.HtmlBaselineReport("fidelity-report.html");
htmlReport.reset();
class Program {
runAllTests(verify: boolean): void {
TypeScript.Environment.standardOut.WriteLine("");
if (generate) {
TypeScript.Environment.standardOut.WriteLine("!!!!!!!!!! WARNING - GENERATING !!!!!!!!!");
TypeScript.Environment.standardOut.WriteLine("");
}
// TypeScript.Environment.standardOut.WriteLine("Testing against fuzz.");
// this.runTests("C:\\temp\\fuzz",
// fileName => this.runParser(fileName, LanguageVersion.EcmaScript5, /*verify:*/ false, /*generateBaselines:*/ generate), 2000);
if (true) {
// return;
}
//TypeScript.Environment.standardOut.WriteLine("Testing Monoco.");
//this.runTests(TypeScript.Environment.currentDirectory() + "c:\\temp\\monoco",
// fileName => this.runParser(fileName, TypeScript.LanguageVersion.EcmaScript5, false, /*generateBaselines:*/ generate, /*allowErrors:*/ false));
if (specificFile === undefined) {
TypeScript.Environment.standardOut.WriteLine("Testing Incremental 2.");
TypeScript.IncrementalParserTests.runAllTests();
}
TypeScript.Environment.standardOut.WriteLine("Testing scanner ES3.");
this.runTests(TypeScript.Environment.currentDirectory() + "\\tests\\Fidelity\\scanner\\ecmascript3",
fileName => this.runScanner(fileName, TypeScript.LanguageVersion.EcmaScript3, verify, /*generateBaselines:*/ generate));
TypeScript.Environment.standardOut.WriteLine("Testing scanner ES5.");
this.runTests(TypeScript.Environment.currentDirectory() + "\\tests\\Fidelity\\scanner\\ecmascript5",
fileName => this.runScanner(fileName, TypeScript.LanguageVersion.EcmaScript5, verify, /*generateBaselines:*/ generate));
TypeScript.Environment.standardOut.WriteLine("Testing parser ES5.");
this.runTests(TypeScript.Environment.currentDirectory() + "\\tests\\Fidelity\\parser\\ecmascript5",
fileName => this.runParser(fileName, TypeScript.LanguageVersion.EcmaScript5, verify, /*generateBaselines:*/ generate));
TypeScript.Environment.standardOut.WriteLine("Testing parser ES3.");
this.runTests(TypeScript.Environment.currentDirectory() + "\\tests\\Fidelity\\parser\\ecmascript3",
fileName => this.runParser(fileName, TypeScript.LanguageVersion.EcmaScript3, verify, /*generateBaselines:*/ generate));
if (specificFile === undefined) {
this.testIncrementalSpeed(TypeScript.Environment.currentDirectory() + "\\src\\compiler\\Syntax\\SyntaxNodes.generated.ts");
}
TypeScript.Environment.standardOut.WriteLine("Testing emitter 1.");
this.runTests(TypeScript.Environment.currentDirectory() + "\\tests\\Fidelity\\emitter\\ecmascript5",
fileName => this.runEmitter(fileName, TypeScript.LanguageVersion.EcmaScript5, verify, /*generateBaselines:*/ generate, /*justText:*/ false));
TypeScript.Environment.standardOut.WriteLine("Testing against 262.");
this.runTests(TypeScript.Environment.currentDirectory() + "\\tests\\Fidelity\\test262",
fileName => this.runParser(fileName, TypeScript.LanguageVersion.EcmaScript5, /*verify:*/ true, /*generateBaselines:*/ generate));
TypeScript.Environment.standardOut.WriteLine("Testing pretty printer.");
this.runTests(TypeScript.Environment.currentDirectory() + "\\tests\\Fidelity\\prettyPrinter\\ecmascript5",
fileName => this.runPrettyPrinter(fileName, TypeScript.LanguageVersion.EcmaScript5, verify, /*generateBaselines:*/ generate));
TypeScript.Environment.standardOut.WriteLine("Testing findToken.");
this.runTests(TypeScript.Environment.currentDirectory() + "\\tests\\Fidelity\\findToken\\ecmascript5",
fileName => this.runFindToken(fileName, TypeScript.LanguageVersion.EcmaScript5, verify, /*generateBaselines:*/ generate));
TypeScript.Environment.standardOut.WriteLine("Testing trivia.");
this.runTests(TypeScript.Environment.currentDirectory() + "\\tests\\Fidelity\\trivia\\ecmascript5",
fileName => this.runTrivia(fileName, TypeScript.LanguageVersion.EcmaScript5, verify, /*generateBaselines:*/ generate));
TypeScript.Environment.standardOut.WriteLine("Testing Incremental 1.");
this.runTests(TypeScript.Environment.currentDirectory() + "\\tests\\Fidelity\\parser\\ecmascript5",
fileName => this.runIncremental(fileName, TypeScript.LanguageVersion.EcmaScript5));
TypeScript.Environment.standardOut.WriteLine("Testing emitter 2.");
this.runTests(TypeScript.Environment.currentDirectory() + "\\tests\\Fidelity\\emitter2\\ecmascript5",
fileName => this.runEmitter(fileName, TypeScript.LanguageVersion.EcmaScript5, verify, /*generateBaselines:*/ generate, /*justText:*/ true));
}
private static reusedElements(oldNode: TypeScript.SourceUnitSyntax, newNode: TypeScript.SourceUnitSyntax, key: any): { originalElements: number; reusedElements: number; } {
var allOldElements = TypeScript.SyntaxElementsCollector.collectElements(oldNode);
var allNewElements = TypeScript.SyntaxElementsCollector.collectElements(newNode);
for (var i = 0; i < allOldElements.length; i++) {
var oldElement: TypeScript.IIndexable<any> = <any>allOldElements[i];
oldElement[key] = key;
}
var reused = 0;
for (var j = 0; j < allNewElements.length; j++) {
var newElement: TypeScript.IIndexable<any> = <any>allNewElements[j];
if (newElement[key] === key) {
reused++;
}
}
return { originalElements: allOldElements.length, reusedElements: reused };
}
private testIncrementalSpeed(fileName: string): void {
var repeat = 500;
TypeScript.Environment.standardOut.WriteLine("Incremental Perf - Changed Text.");
this.testIncrementalSpeedChange(fileName, repeat);
TypeScript.Environment.standardOut.WriteLine("");
TypeScript.Environment.standardOut.WriteLine("Incremental Perf - No Changed Text.");
this.testIncrementalSpeedNoChange(fileName, repeat);
}
private testIncrementalSpeedNoChange(fileName: string, repeat: number): void {
if (specificFile !== undefined) {
return;
}
var contents = TypeScript.Environment.readFile(fileName, /*codepage*/ null).contents;
// TypeScript.Environment.standardOut.WriteLine(fileName);
var text = TypeScript.TextFactory.createText(contents);
var tree = TypeScript.Parser.parse(fileName, text, TypeScript.isDTSFile(fileName), new TypeScript.ParseOptions(TypeScript.LanguageVersion.EcmaScript5, true));
var originalTree = tree;
var ast = TypeScript.SyntaxTreeToAstVisitor.visit(tree, fileName, TypeScript.ImmutableCompilationSettings.defaultSettings(), /*incrementalAST:*/ true);
var totalIncrementalTime = 0;
var totalIncrementalASTTime = 0;
var timer = new TypeScript.Timer();
for (var i = 0; i < repeat; i++) {
var changeLength = i * 2;
timer.start();
var tree2 = TypeScript.Parser.incrementalParse(tree, new TypeScript.TextChangeRange( new TypeScript.TextSpan((text.length() / 2) - i, changeLength), changeLength), text);
timer.end();
totalIncrementalTime += timer.time;
TypeScript.Debug.assert(tree.structuralEquals(tree2));
timer.start();
var ast2 = TypeScript.SyntaxTreeToAstVisitor.visit(tree2, fileName, TypeScript.ImmutableCompilationSettings.defaultSettings(), /*incrementalAST:*/ true);
timer.end();
totalIncrementalASTTime += timer.time;
TypeScript.Debug.assert(ast.structuralEquals(ast2, true));
tree = tree2;
ast = ast2;
}
var rateBytesPerMillisecond = (contents.length * repeat) / totalIncrementalTime;
var rateBytesPerSecond = rateBytesPerMillisecond * 1000;
var rateMBPerSecond = rateBytesPerSecond / (1024 * 1024);
// TypeScript.Environment.standardOut.WriteLine("Incremental time: " + totalIncrementalTime);
TypeScript.Environment.standardOut.WriteLine("Incremental rate: " + rateMBPerSecond + " MB/s");
rateBytesPerMillisecond = (contents.length * repeat) / totalIncrementalASTTime;
rateBytesPerSecond = rateBytesPerMillisecond * 1000;
rateMBPerSecond = rateBytesPerSecond / (1024 * 1024);
// TypeScript.Environment.standardOut.WriteLine("Incremental AST time: " + totalIncrementalASTTime);
TypeScript.Environment.standardOut.WriteLine("Incremental AST rate: " + rateMBPerSecond + " MB/s");
var allOldElements = TypeScript.SyntaxElementsCollector.collectElements(originalTree.sourceUnit());
var allNewElements = TypeScript.SyntaxElementsCollector.collectElements(tree.sourceUnit());
var reuse = TypeScript.ArrayUtilities.where(allNewElements,
v => TypeScript.ArrayUtilities.contains(allOldElements, v)).length;
TypeScript.Environment.standardOut.WriteLine("Reuse: " + reuse / allNewElements.length);
}
private testIncrementalSpeedChange(fileName: string, repeat: number): void {
if (specificFile !== undefined) {
return;
}
var contents = TypeScript.Environment.readFile(fileName, /*codepage*/ null).contents;
// TypeScript.Environment.standardOut.WriteLine(fileName);
var text = TypeScript.TextFactory.createText(contents);
var tree = TypeScript.Parser.parse(fileName, text, TypeScript.isDTSFile(fileName), new TypeScript.ParseOptions(TypeScript.LanguageVersion.EcmaScript5, true));
var originalTree = tree;
var ast = TypeScript.SyntaxTreeToAstVisitor.visit(tree, fileName, TypeScript.ImmutableCompilationSettings.defaultSettings(), /*incrementalAST:*/ true);
var totalIncrementalTime = 0;
var totalIncrementalASTTime = 0;
var timer = new TypeScript.Timer();
for (var i = 0; i < repeat; i++) {
var changeLength = i * 2;
var changeSpan = new TypeScript.TextSpan((text.length() / 2) - i, changeLength);
contents = text.toString();
var contentsToReplace = contents.substr(changeSpan.start(), changeSpan.length());
var first = true;
var updatedText = contentsToReplace.replace(/[^a-zA-Z0-9][a-z]+[^a-zA-Z0-9]/, (sub) => {
if (first && TypeScript.SyntaxFacts.getTokenKind(sub.substr(1, sub.length - 2)) === TypeScript.SyntaxKind.None) {
first = false;
return sub.substr(0, sub.length - 1) + "a" + sub.substr(sub.length - 1);
}
return sub;
});
text = TypeScript.TextFactory.createText(
contents.substr(0, changeSpan.start()) +
updatedText +
contents.substr(changeSpan.end()));
var changeRange = new TypeScript.TextChangeRange(changeSpan, updatedText.length);
timer.start();
var tree2 = TypeScript.Parser.incrementalParse(tree, changeRange, text);
timer.end();
totalIncrementalTime += timer.time;
timer.start();
var ast2 = TypeScript.SyntaxTreeToAstVisitor.visit(tree2, fileName, TypeScript.ImmutableCompilationSettings.defaultSettings(), /*incrementalAST:*/ true);
timer.end();
totalIncrementalASTTime += timer.time;
tree = tree2;
ast = ast2;
}
var rateBytesPerMillisecond = (contents.length * repeat) / totalIncrementalTime;
var rateBytesPerSecond = rateBytesPerMillisecond * 1000;
var rateMBPerSecond = rateBytesPerSecond / (1024 * 1024);
// TypeScript.Environment.standardOut.WriteLine("Incremental time: " + totalIncrementalTime);
TypeScript.Environment.standardOut.WriteLine("Incremental rate: " + rateMBPerSecond + " MB/s");
rateBytesPerMillisecond = (contents.length * repeat) / totalIncrementalASTTime;
rateBytesPerSecond = rateBytesPerMillisecond * 1000;
rateMBPerSecond = rateBytesPerSecond / (1024 * 1024);
// TypeScript.Environment.standardOut.WriteLine("Incremental AST time: " + totalIncrementalASTTime);
TypeScript.Environment.standardOut.WriteLine("Incremental AST rate: " + rateMBPerSecond + " MB/s");
var allOldElements = TypeScript.SyntaxElementsCollector.collectElements(originalTree.sourceUnit());
var allNewElements = TypeScript.SyntaxElementsCollector.collectElements(tree.sourceUnit());
var reuse = TypeScript.ArrayUtilities.where(allNewElements,
v => TypeScript.ArrayUtilities.contains(allOldElements, v)).length;
TypeScript.Environment.standardOut.WriteLine("Reuse: " + reuse / allNewElements.length);
}
private handleException(fileName: string, e: Error): void {
TypeScript.Environment.standardOut.WriteLine("");
if ((<string>e.message).indexOf(fileName) < 0) {
TypeScript.Environment.standardOut.WriteLine("Exception: " + fileName + ": " + e.message);
}
else {
TypeScript.Environment.standardOut.WriteLine(e.message);
}
}
private runTests(
path: string,
action: (fileName: string) => void) {
var testFiles = TypeScript.Environment.listFiles(path, null, { recursive: true });
var indexNum = 0;
testFiles.forEach(fileName => {
if (specificFile !== undefined && fileName.indexOf(specificFile) < 0) {
return;
}
// TypeScript.Environment.standardOut.WriteLine(fileName);
try {
action(fileName);
}
catch (e) {
this.handleException(fileName, e);
}
});
}
private checkResult(fileName: string, result: any, verify: boolean, generateBaseline: boolean, justText: boolean): void {
var actualResult: string;
var expectedFile = fileName + ".expected";
var actualFile = fileName + ".actual";
if (generateBaseline) {
actualResult = justText ? result : JSON.stringify(result, null, 4);
expectedFile = fileName + ".expected";
// TypeScript.Environment.standardOut.WriteLine("Generating baseline for: " + fileName);
TypeScript.Environment.writeFile(expectedFile, actualResult, /*writeByteOrderMark:*/ false);
if (TypeScript.Environment.fileExists(actualFile)) {
TypeScript.Environment.deleteFile(actualFile);
}
}
else if (verify) {
actualResult = justText ? result : JSON.stringify(result, null, 4);
var expectedResult: string = null;
if (!TypeScript.Environment.fileExists(expectedFile)) {
TypeScript.Environment.writeFile(expectedFile, "", false);
}
else {
expectedResult = TypeScript.Environment.readFile(expectedFile, /*codepage*/ null).contents;
}
if (expectedResult !== actualResult) {
TypeScript.Environment.standardOut.WriteLine(" ! Fail: " + actualFile);
TypeScript.Environment.writeFile(actualFile, actualResult, /*writeByteOrderMark:*/ false);
if (!generate) {
var includeUnchangedRegions = expectedResult.length < 10240 && actualResult.length < 10240;
htmlReport.addDifference("", expectedFile, actualFile, expectedResult, actualResult, includeUnchangedRegions);
}
}
else {
if (TypeScript.Environment.fileExists(actualFile)) {
TypeScript.Environment.deleteFile(actualFile);
}
}
}
}
runEmitter(fileName: string,
languageVersion: TypeScript.LanguageVersion,
verify: boolean,
generateBaseline: boolean,
justText: boolean): void {
if (true) {
// return;
}
if (!TypeScript.StringUtilities.endsWith(fileName, ".ts") && !TypeScript.StringUtilities.endsWith(fileName, ".js")) {
return;
}
if (fileName.indexOf("RealSource") >= 0) {
return;
}
var contents = TypeScript.Environment.readFile(fileName, /*codepage*/ null).contents;
// TypeScript.Environment.standardOut.WriteLine(fileName);
totalSize += contents.length;
var text = TypeScript.TextFactory.createText(contents);
var tree = TypeScript.Parser.parse(fileName, text, TypeScript.isDTSFile(fileName), new TypeScript.ParseOptions(languageVersion, true));
var emitted = TypeScript.Emitter1.emit(<TypeScript.SourceUnitSyntax>tree.sourceUnit());
var result = justText
? <any>emitted.fullText()
: { fullText: emitted.fullText().split("\r\n"), sourceUnit: emitted };
this.checkResult(fileName, result, verify, generateBaseline, justText);
}
runPrettyPrinter(fileName: string,
languageVersion: TypeScript.LanguageVersion,
verify: boolean,
generateBaseline: boolean): void {
if (!TypeScript.StringUtilities.endsWith(fileName, ".ts") && !TypeScript.StringUtilities.endsWith(fileName, ".js")) {
return;
}
if (fileName.indexOf("RealSource") >= 0) {
return;
}
var contents = TypeScript.Environment.readFile(fileName, /*codepage*/ null).contents;
// TypeScript.Environment.standardOut.WriteLine(fileName);
totalSize += contents.length;
var text = TypeScript.TextFactory.createText(contents);
var tree = TypeScript.Parser.parse(fileName, text, TypeScript.isDTSFile(fileName), new TypeScript.ParseOptions(languageVersion, true));
var result = TypeScript.PrettyPrinter.prettyPrint(tree.sourceUnit());
this.checkResult(fileName, result, verify, generateBaseline, true);
totalTime += timer.time;
}
runParser(fileName: string,
languageVersion: TypeScript.LanguageVersion,
verify: boolean,
generateBaseline: boolean,
allowErrors = true): void {
if (!TypeScript.StringUtilities.endsWith(fileName, ".ts") && !TypeScript.StringUtilities.endsWith(fileName, ".js")) {
return;
}
if (fileName.indexOf("RealSource") >= 0) {
return;
}
var contents = TypeScript.Environment.readFile(fileName, /*codepage*/ null).contents;
// TypeScript.Environment.standardOut.WriteLine(fileName);
totalSize += contents.length;
var text = TypeScript.TextFactory.createText(contents);
timer.start();
var tree = TypeScript.Parser.parse(fileName, text, TypeScript.isDTSFile(fileName), new TypeScript.ParseOptions(languageVersion, true));
timer.end();
if (!allowErrors) {
var diagnostics = tree.diagnostics();
if (diagnostics.length > 0) {
TypeScript.Environment.standardOut.WriteLine(fileName);
TypeScript.Environment.standardOut.WriteLine("\t" + diagnostics[0].message());
}
}
if (verify) {
TypeScript.Debug.assert(tree.sourceUnit().fullWidth() === contents.length);
TypeScript.SyntaxTreeToAstVisitor.visit(tree, "", TypeScript.ImmutableCompilationSettings.defaultSettings(), /*incrementalAST:*/ true);
this.checkResult(fileName, tree, verify, generateBaseline, /*justText:*/ false);
}
totalTime += timer.time;
}
runIncremental(fileName: string,
languageVersion: TypeScript.LanguageVersion): void {
if (!TypeScript.StringUtilities.endsWith(fileName, ".ts") && !TypeScript.StringUtilities.endsWith(fileName, ".js")) {
return;
}
if (fileName.indexOf("RealSource") >= 0) {
return;
}
var contents = TypeScript.Environment.readFile(fileName, /*codepage*/ null).contents;
// TypeScript.Environment.standardOut.WriteLine(fileName);
var text = TypeScript.TextFactory.createText(contents);
var tree1 = TypeScript.Parser.parse(fileName, text, TypeScript.isDTSFile(fileName), new TypeScript.ParseOptions(languageVersion, true));
var tree2 = TypeScript.Parser.incrementalParse(
new TypeScript.SyntaxTree(TypeScript.Syntax.emptySourceUnit(), TypeScript.isDTSFile(fileName), [], fileName, null, tree1.parseOptions()),
new TypeScript.TextChangeRange(new TypeScript.TextSpan(0, 0), text.length()),
text);
TypeScript.Debug.assert(tree1.structuralEquals(tree2));
}
runFindToken(fileName: string,
languageVersion: TypeScript.LanguageVersion, verify: boolean, generateBaseline: boolean): void {
if (!TypeScript.StringUtilities.endsWith(fileName, ".ts") && !TypeScript.StringUtilities.endsWith(fileName, ".js")) {
return;
}
if (fileName.indexOf("RealSource") >= 0) {
return;
}
var contents = TypeScript.Environment.readFile(fileName, /*codepage*/ null).contents;
// TypeScript.Environment.standardOut.WriteLine(fileName);
var text = TypeScript.TextFactory.createText(contents);
var tree = TypeScript.Parser.parse(fileName, text, TypeScript.isDTSFile(fileName), new TypeScript.ParseOptions(languageVersion, true));
var sourceUnit = tree.sourceUnit();
TypeScript.Debug.assert(tree.sourceUnit().fullWidth() === contents.length);
var tokens: TypeScript.IIndexable<any>= {};
var tokensOnLeft: TypeScript.IIndexable<any> = {};
var leftToRight: TypeScript.ISyntaxToken[] = [];
var rightToLeft: TypeScript.ISyntaxToken[] = [];
for (var i = 0; i <= contents.length; i++) {
var token = sourceUnit.findToken(i).token();
var left = sourceUnit.findTokenOnLeft(i);
var tokenOnLeft = left === null ? null : left.token();
TypeScript.Debug.assert(token.isToken());
if (i === contents.length) {
TypeScript.Debug.assert(token.kind() === TypeScript.SyntaxKind.EndOfFileToken);
}
else {
TypeScript.Debug.assert(token.width() > 0 || token.kind() === TypeScript.SyntaxKind.EndOfFileToken);
TypeScript.Debug.assert(token.fullWidth() > 0);
}
tokens[i] = token;
tokensOnLeft[i] = tokenOnLeft;
}
var positionedToken = sourceUnit.findToken(0);
while (positionedToken !== null) {
leftToRight.push(positionedToken.token());
positionedToken = positionedToken.nextToken();
}
positionedToken = sourceUnit.findToken(contents.length);
while (positionedToken !== null) {
rightToLeft.push(positionedToken.token());
positionedToken = positionedToken.previousToken();
}
var result = {
tokens: tokens,
tokensOnLeft: tokensOnLeft,
leftToRight: leftToRight,
rightToLeft: rightToLeft,
};
this.checkResult(fileName, result, verify, generateBaseline, /*justText:*/ false);
}
runTrivia(fileName: string,
languageVersion: TypeScript.LanguageVersion, verify: boolean, generateBaseline: boolean): void {
if (!TypeScript.StringUtilities.endsWith(fileName, ".ts")) {
return;
}
var contents = TypeScript.Environment.readFile(fileName, /*codepage*/ null).contents;
var text = TypeScript.TextFactory.createText(contents);
var scanner = new TypeScript.Scanner(fileName, text, languageVersion);
var tokens: TypeScript.ISyntaxToken[] = [];
var textArray: string[] = [];
var diagnostics: TypeScript.Diagnostic[] = [];
while (true) {
var token = scanner.scan(diagnostics, /*allowRegularExpression:*/ false);
tokens.push(token);
if (token.tokenKind === TypeScript.SyntaxKind.EndOfFileToken) {
break;
}
}
this.checkResult(fileName, tokens, verify, generateBaseline, false);
}
runScanner(fileName: string, languageVersion: TypeScript.LanguageVersion, verify: boolean, generateBaseline: boolean): void {
if (!TypeScript.StringUtilities.endsWith(fileName, ".ts")) {
return;
}
var contents = TypeScript.Environment.readFile(fileName, /*codepage*/ null).contents;
var text = TypeScript.TextFactory.createText(contents);
var scanner = new TypeScript.Scanner(fileName, text, languageVersion);
var tokens: TypeScript.ISyntaxToken[] = [];
var textArray: string[] = [];
var diagnostics: TypeScript.Diagnostic[] = [];
while (true) {
var token = scanner.scan(diagnostics, /*allowRegularExpression:*/ false);
tokens.push(token);
if (token.tokenKind === TypeScript.SyntaxKind.EndOfFileToken) {
break;
}
}
if (verify) {
var tokenText = TypeScript.ArrayUtilities.select(tokens, t => t.fullText()).join("");
if (tokenText !== contents) {
throw new Error("Token invariant broken!");
}
}
var result = diagnostics.length === 0 ? <any>tokens : { diagnostics: diagnostics, tokens: tokens };
this.checkResult(fileName, result, verify, generateBaseline, false);
}
parseArguments(): void {
TypeScript.Environment.standardOut.WriteLine("Testing input files.");
for (var index in TypeScript.Environment.arguments) {
var fileName: string = TypeScript.Environment.arguments[index];
if (specificFile !== undefined && fileName.indexOf(specificFile) < 0) {
continue;
}
this.runParser(fileName, TypeScript.LanguageVersion.EcmaScript5, /*verify:*/ false, /*generate:*/ false, /*allowErrors:*/ false);
}
}
run262(): void {
var path = "C:\\temp\\test262\\suite";
var testFiles = TypeScript.Environment.listFiles(path, null, { recursive: true });
var testCount = 0;
var failCount = 0;
var skippedTests:string[] = [];
for (var index in testFiles) {
var fileName: string = testFiles[index];
if (specificFile !== undefined && fileName.indexOf(specificFile) < 0) {
continue;
}
// All 262 files are utf8. But they dont' have a BOM. Force them to be read in
// as UTF8.
var contents = TypeScript.Environment.readFile(fileName, /*codepage*/ null).contents;
var isNegative = contents.indexOf("@negative") >= 0
testCount++;
try {
var stringText = TypeScript.TextFactory.createText(contents);
var tree = TypeScript.Parser.parse(fileName, stringText, TypeScript.isDTSFile(fileName), new TypeScript.ParseOptions(TypeScript.LanguageVersion.EcmaScript5, true));
if (isNegative) {
var nameOnly = fileName.substr(fileName.lastIndexOf("\\") + 1);
var canParseSuccessfully = negative262ExpectedResults[nameOnly];
if (canParseSuccessfully) {
// We expected to parse this successfully. Report an error if we didn't.
if (tree.diagnostics() && tree.diagnostics().length > 0) {
TypeScript.Environment.standardOut.WriteLine("Negative test. Unexpected failure: " + fileName);
failCount++;
}
}
else {
// We expected to fail on this. Report an error if we don't.
if (tree.diagnostics() === null || tree.diagnostics().length === 0) {
TypeScript.Environment.standardOut.WriteLine("Negative test. Unexpected success: " + fileName);
failCount++;
}
}
}
else {
// Not a negative test. We can't have any errors or skipped tokens.
if (tree.diagnostics() && tree.diagnostics().length > 0) {
TypeScript.Environment.standardOut.WriteLine("Unexpected failure: " + fileName);
failCount++;
}
}
}
catch (e) {
failCount++;
this.handleException(fileName, e);
}
}
TypeScript.Environment.standardOut.WriteLine("");
TypeScript.Environment.standardOut.WriteLine("Test 262 results:");
TypeScript.Environment.standardOut.WriteLine("Test Count: " + testCount);
TypeScript.Environment.standardOut.WriteLine("Skip Count: " + skippedTests.length);
TypeScript.Environment.standardOut.WriteLine("Fail Count: " + failCount);
for (var i = 0; i < skippedTests.length; i++) {
TypeScript.Environment.standardOut.WriteLine(skippedTests[i]);
}
}
}
var diagnostics: TypeScript.IIndexable<any> = {};
for (var d in TypeScript.LocalizedDiagnosticMessages) {
if (TypeScript.LocalizedDiagnosticMessages.hasOwnProperty(d)) {
var info: TypeScript.DiagnosticInfo = TypeScript.LocalizedDiagnosticMessages[d];
diagnostics[info.message] = { category: TypeScript.DiagnosticCategory[info.category], code: info.code };
}
}
var whatever = JSON.stringify(diagnostics, null, 4);
var totalTime = 0;
var totalSize = 0;
var program = new Program();
// New parser.
totalTime = 0;
totalSize = 0;
program.runAllTests(true);
var count = 1;
//for (var i = 0; i < count; i++) {
// program.parseArguments();
//}
TypeScript.Environment.standardOut.WriteLine("Total time: " + (totalTime / count));
TypeScript.Environment.standardOut.WriteLine("Total size: " + (totalSize / count));
+472
View File
@@ -0,0 +1,472 @@
var negative262ExpectedResults: TypeScript.IIndexable<boolean> = {
'Sbp_12.5_A9_T3.js': false,
'Sbp_12.6.1_A13_T3.js': false,
'Sbp_12.6.2_A13_T3.js': false,
'Sbp_12.6.4_A13_T3.js': false,
'Sbp_7.8.4_A6.1_T4.js': false,
'Sbp_7.8.4_A6.2_T1.js': false,
'Sbp_7.8.4_A6.2_T2.js': false,
'Sbp_A1_T1.js': true,
'Sbp_A2_T1.js': true,
'Sbp_A2_T2.js': true,
'Sbp_A3_T1.js': true,
'Sbp_A3_T2.js': true,
'Sbp_A4_T1.js': true,
'Sbp_A4_T2.js': true,
'Sbp_A5_T1.js': true,
'Sbp_A5_T2.js': true,
'S7.2_A5_T1.js': false,
'S7.2_A5_T2.js': false,
'S7.2_A5_T3.js': false,
'S7.2_A5_T4.js': false,
'S7.2_A5_T5.js': false,
'S7.3_A2.1_T1.js': true,
'S7.3_A2.1_T2.js': false,
'S7.3_A2.2_T1.js': true,
'S7.3_A2.2_T2.js': false,
'S7.3_A2.3.js': true,
'S7.3_A2.4.js': true,
'S7.3_A3.1_T1.js': true,
'S7.3_A3.1_T2.js': true,
'S7.3_A3.1_T3.js': false,
'S7.3_A3.2_T1.js': true,
'S7.3_A3.2_T2.js': true,
'S7.3_A3.2_T3.js': false,
'S7.3_A3.3_T1.js': true,
'S7.3_A3.3_T2.js': true,
'S7.3_A3.4_T1.js': true,
'S7.3_A3.4_T2.js': true,
'S7.3_A6_T1.js': false,
'S7.3_A6_T2.js': false,
'S7.3_A6_T3.js': false,
'S7.3_A6_T4.js': false,
'S7.4_A2_T2.js': false,
'S7.4_A3.js': false,
'S7.4_A4_T1.js': false,
'S7.4_A4_T4.js': false,
'S7.6.1.1_A1.1.js': false,
'S7.6.1.1_A1.10.js': false,
'S7.6.1.1_A1.11.js': false,
'S7.6.1.1_A1.12.js': false,
'S7.6.1.1_A1.13.js': false,
'S7.6.1.1_A1.14.js': false,
'S7.6.1.1_A1.15.js': false,
'S7.6.1.1_A1.16.js': false,
'S7.6.1.1_A1.17.js': false,
'S7.6.1.1_A1.18.js': true,
'S7.6.1.1_A1.19.js': false,
'S7.6.1.1_A1.2.js': false,
'S7.6.1.1_A1.20.js': false,
'S7.6.1.1_A1.21.js': false,
'S7.6.1.1_A1.22.js': false,
'S7.6.1.1_A1.23.js': false,
'S7.6.1.1_A1.24.js': false,
'S7.6.1.1_A1.25.js': false,
'S7.6.1.1_A1.3.js': false,
'S7.6.1.1_A1.4.js': false,
'S7.6.1.1_A1.5.js': false,
'S7.6.1.1_A1.6.js': false,
'S7.6.1.1_A1.7.js': false,
'S7.6.1.1_A1.8.js': false,
'S7.6.1.1_A1.9.js': false,
'S7.6.1.2_A1.10.js': false,
'S7.6.1.2_A1.11.js': false,
'S7.6.1.2_A1.15.js': false,
'S7.6.1.2_A1.16.js': false,
'S7.6.1.2_A1.18.js': false,
'S7.6.1.2_A1.21.js': false,
'S7.6.1.2_A1.22.js': false,
'S7.6.1.2_A1.23.js': false,
'S7.6.1.2_A1.24.js': false,
'S7.6.1.2_A1.26.js': false,
'S7.6.1.2_A1.27.js': false,
'S7.6.1.2_A1.5.js': false,
'S7.6.1.2_A1.6.js': false,
'S7.6.1.2_A1.7.js': false,
'S7.6.1.2_A1.9.js': false,
'7.6.1.2-1gs.js': false,
'S7.6.1_A1.1.js': true,
'S7.6.1_A1.2.js': true,
'S7.6.1_A1.3.js': true,
'S7.7_A2_T1.js': false,
'S7.7_A2_T10.js': false,
'S7.7_A2_T2.js': false,
'S7.7_A2_T3.js': false,
'S7.7_A2_T4.js': false,
'S7.7_A2_T5.js': false,
'S7.7_A2_T6.js': false,
'S7.7_A2_T7.js': false,
'S7.7_A2_T8.js': false,
'S7.7_A2_T9.js': false,
'7.8.3-1gs.js': true,
'7.8.3-2gs.js': true,
'7.8.3-3gs.js': true,
'S7.8.3_A4.1_T1.js': true,
'S7.8.3_A4.1_T2.js': true,
'S7.8.3_A4.1_T3.js': true,
'S7.8.3_A4.1_T4.js': true,
'S7.8.3_A4.1_T5.js': true,
'S7.8.3_A4.1_T6.js': true,
'S7.8.3_A4.1_T7.js': true,
'S7.8.3_A4.1_T8.js': true,
'S7.8.3_A6.1_T1.js': false,
'S7.8.3_A6.1_T2.js': false,
'S7.8.3_A6.2_T1.js': false,
'S7.8.3_A6.2_T2.js': false,
'7.8.4-1gs.js': true,
'S7.8.4_A1.1_T1.js': false,
'S7.8.4_A1.1_T2.js': false,
'S7.8.4_A1.2_T1.js': false,
'S7.8.4_A1.2_T2.js': false,
'S7.8.4_A3.1_T1.js': false,
'S7.8.4_A3.1_T2.js': false,
'S7.8.4_A3.2_T1.js': false,
'S7.8.4_A3.2_T2.js': false,
'S7.8.4_A4.3_T1.js': true,
'S7.8.4_A4.3_T2.js': true,
'S7.8.4_A7.1_T4.js': false,
'S7.8.4_A7.2_T1.js': false,
'S7.8.4_A7.2_T2.js': false,
'S7.8.4_A7.2_T3.js': false,
'S7.8.4_A7.2_T4.js': false,
'S7.8.4_A7.2_T5.js': false,
'S7.8.4_A7.2_T6.js': false,
'7.8.5-1gs.js': false,
'S7.8.5_A1.2_T1.js': false,
'S7.8.5_A1.2_T2.js': false,
'S7.8.5_A1.2_T3.js': false,
'S7.8.5_A1.2_T4.js': false,
'S7.8.5_A1.3_T1.js': false,
'S7.8.5_A1.3_T3.js': false,
'S7.8.5_A1.5_T1.js': false,
'S7.8.5_A1.5_T3.js': false,
'S7.8.5_A2.2_T1.js': false,
'S7.8.5_A2.2_T2.js': false,
'S7.8.5_A2.3_T1.js': false,
'S7.8.5_A2.3_T3.js': false,
'S7.8.5_A2.5_T1.js': false,
'S7.8.5_A2.5_T3.js': false,
'S7.9.2_A1_T1.js': false,
'S7.9.2_A1_T3.js': false,
'S7.9.2_A1_T6.js': false,
'S7.9_A10_T2.js': false,
'S7.9_A10_T4.js': false,
'S7.9_A10_T6.js': false,
'S7.9_A10_T8.js': false,
'S7.9_A11_T4.js': false,
'S7.9_A11_T8.js': false,
'S7.9_A4.js': false,
'S7.9_A5.1_T1.js': false,
'S7.9_A5.3_T1.js': false,
'S7.9_A5.7_T1.js': true,
'S7.9_A6.2_T1.js': false,
'S7.9_A6.2_T10.js': false,
'S7.9_A6.2_T2.js': false,
'S7.9_A6.2_T3.js': false,
'S7.9_A6.2_T4.js': false,
'S7.9_A6.2_T5.js': false,
'S7.9_A6.2_T6.js': false,
'S7.9_A6.2_T7.js': false,
'S7.9_A6.2_T8.js': false,
'S7.9_A6.2_T9.js': false,
'S7.9_A6.3_T1.js': false,
'S7.9_A6.3_T2.js': false,
'S7.9_A6.3_T3.js': false,
'S7.9_A6.3_T4.js': false,
'S7.9_A6.3_T5.js': false,
'S7.9_A6.3_T6.js': false,
'S7.9_A6.3_T7.js': false,
'S7.9_A6.4_T1.js': false,
'S7.9_A6.4_T2.js': false,
'S7.9_A7_T7.js': true,
'S7.9_A9_T6.js': false,
'S7.9_A9_T7.js': false,
'S7.9_A9_T8.js': false,
'S8.2_A2.js': false,
'S8.3_A2.1.js': true,
'S8.3_A2.2.js': true,
'S8.4_A13_T1.js': false,
'S8.4_A13_T2.js': false,
'S8.4_A13_T3.js': false,
'S8.4_A14_T1.js': false,
'S8.4_A14_T2.js': false,
'S8.4_A14_T3.js': false,
'S8.4_A7.1.js': true,
'S8.4_A7.2.js': true,
'S8.4_A7.3.js': true,
'S8.4_A7.4.js': true,
'S8.6.2_A7.js': true,
'8.7.2-3-a-1gs.js': true,
'8.7.2-3-a-2gs.js': true,
'S8.7.2_A1_T1.js': true,
'S8.7.2_A1_T2.js': true,
'10.1.1-2gs.js': false,
'10.1.1-5gs.js': false,
'10.1.1-8gs.js': false,
'10.4.2.1-1gs.js': true,
'10.5-1gs.js': true,
'10.6-2gs.js': true,
'S11.1.1_A1.js': true,
'11.1.5-1gs.js': true,
'11.1.5-2gs.js': true,
'11.13.1-4-28gs.js': true,
'11.13.1-4-29gs.js': true,
'S11.13.1_A2.1_T3.js': true,
'11.13.2-6-1gs.js': true,
'S11.13.2_A2.2_T1.js': true,
'S11.13.2_A2.2_T10.js': true,
'S11.13.2_A2.2_T11.js': true,
'S11.13.2_A2.2_T2.js': true,
'S11.13.2_A2.2_T3.js': true,
'S11.13.2_A2.2_T4.js': true,
'S11.13.2_A2.2_T5.js': true,
'S11.13.2_A2.2_T6.js': true,
'S11.13.2_A2.2_T7.js': true,
'S11.13.2_A2.2_T8.js': true,
'S11.13.2_A2.2_T9.js': true,
'S11.2.4_A1.3_T1.js': false,
'11.3.1-2-1gs.js': true,
'S11.3.1_A1.1_T1.js': true,
'S11.3.1_A1.1_T2.js': true,
'S11.3.1_A1.1_T3.js': true,
'S11.3.1_A1.1_T4.js': true,
'S11.3.1_A2.1_T3.js': true,
'S11.3.2_A1.1_T1.js': true,
'S11.3.2_A1.1_T2.js': true,
'S11.3.2_A1.1_T3.js': true,
'S11.3.2_A1.1_T4.js': true,
'S11.3.2_A2.1_T3.js': true,
'11.4.1-5-a-5gs.js': true,
'S11.4.2_A2_T2.js': true,
'S11.4.4_A2.1_T3.js': true,
'11.4.5-2-2gs.js': true,
'S11.4.5_A2.1_T3.js': true,
'S12.1_A4_T1.js': false,
'S12.1_A4_T2.js': false,
'12.10.1-11gs.js': true,
'S12.11_A2_T1.js': true,
'S12.11_A3_T1.js': false,
'S12.11_A3_T2.js': false,
'S12.11_A3_T3.js': false,
'S12.11_A3_T4.js': false,
'S12.11_A3_T5.js': false,
'S12.13_A1.js': true,
'12.14.1-1gs.js': true,
'S12.14_A16_T1.js': false,
'S12.14_A16_T10.js': false,
'S12.14_A16_T11.js': false,
'S12.14_A16_T12.js': false,
'S12.14_A16_T13.js': false,
'S12.14_A16_T14.js': false,
'S12.14_A16_T15.js': false,
'S12.14_A16_T2.js': false,
'S12.14_A16_T3.js': false,
'S12.14_A16_T4.js': false,
'S12.14_A16_T5.js': false,
'S12.14_A16_T6.js': false,
'S12.14_A16_T7.js': false,
'S12.14_A16_T8.js': false,
'S12.14_A16_T9.js': false,
'12.2.1-1gs.js': true,
'12.2.1-4gs.js': true,
'S12.2_A8_T1.js': false,
'S12.2_A8_T2.js': false,
'S12.2_A8_T3.js': false,
'S12.2_A8_T4.js': false,
'S12.2_A8_T5.js': false,
'S12.2_A8_T6.js': false,
'S12.2_A8_T7.js': false,
'S12.2_A8_T8.js': false,
'S12.4_A1.js': false,
'S12.5_A11.js': false,
'S12.5_A2.js': true,
'S12.5_A6_T1.js': false,
'S12.5_A6_T2.js': false,
'S12.5_A8.js': false,
'S12.6.1_A12.js': false,
'S12.6.1_A15.js': false,
'S12.6.1_A6_T1.js': false,
'S12.6.1_A6_T2.js': false,
'S12.6.1_A6_T3.js': false,
'S12.6.1_A6_T4.js': false,
'S12.6.1_A6_T5.js': false,
'S12.6.1_A6_T6.js': false,
'S12.6.2_A15.js': false,
'S12.6.2_A6_T1.js': false,
'S12.6.2_A6_T2.js': false,
'S12.6.2_A6_T3.js': false,
'S12.6.2_A6_T4.js': false,
'S12.6.2_A6_T5.js': false,
'S12.6.2_A6_T6.js': false,
'S12.6.3_A11.1_T3.js': true,
'S12.6.3_A11_T3.js': true,
'S12.6.3_A12.1_T3.js': true,
'S12.6.3_A12_T3.js': true,
'S12.6.3_A4.1.js': false,
'S12.6.3_A4_T1.js': false,
'S12.6.3_A4_T2.js': false,
'S12.6.3_A7.1_T1.js': false,
'S12.6.3_A7.1_T2.js': false,
'S12.6.3_A7_T1.js': false,
'S12.6.3_A7_T2.js': false,
'S12.6.3_A8.1_T1.js': false,
'S12.6.3_A8.1_T2.js': false,
'S12.6.3_A8.1_T3.js': false,
'S12.6.3_A8_T1.js': false,
'S12.6.3_A8_T2.js': false,
'S12.6.3_A8_T3.js': false,
'S12.6.4_A15.js': false,
'S12.7_A1_T1.js': true,
'S12.7_A1_T2.js': true,
'S12.7_A1_T3.js': true,
'S12.7_A1_T4.js': true,
'S12.7_A5_T1.js': true,
'S12.7_A5_T2.js': true,
'S12.7_A5_T3.js': true,
'S12.7_A6.js': true,
'S12.7_A8_T1.js': true,
'S12.7_A8_T2.js': true,
'S12.8_A1_T1.js': true,
'S12.8_A1_T2.js': true,
'S12.8_A1_T3.js': true,
'S12.8_A1_T4.js': true,
'S12.8_A5_T1.js': true,
'S12.8_A5_T2.js': true,
'S12.8_A5_T3.js': true,
'S12.8_A6.js': true,
'S12.8_A8_T1.js': true,
'S12.8_A8_T2.js': true,
'S12.9_A1_T1.js': true,
'S12.9_A1_T10.js': true,
'S12.9_A1_T2.js': true,
'S12.9_A1_T3.js': true,
'S12.9_A1_T4.js': true,
'S12.9_A1_T5.js': true,
'S12.9_A1_T6.js': true,
'S12.9_A1_T7.js': true,
'S12.9_A1_T8.js': true,
'S12.9_A1_T9.js': true,
'13.0_4-17gs.js': true,
'13.0_4-5gs.js': true,
'S13_A7_T3.js': false,
'13.1-13gs.js': true,
'13.1-1gs.js': true,
'13.1-4gs.js': true,
'13.1-5gs.js': true,
'13.1-8gs.js': true,
'13.2-19-b-3gs.js': true,
'14.1-4gs.js': true,
'14.1-5gs.js': true,
'S15.1.2.1_A2_T2.js': true,
'S15.1_A1_T1.js': true,
'S15.1_A1_T2.js': true,
'S15.1_A2_T1.js': true,
'S15.2.4.3_A12.js': true,
'S15.2.4.3_A13.js': true,
'S15.2.4.4_A12.js': true,
'S15.2.4.4_A13.js': true,
'S15.2.4.4_A14.js': true,
'S15.2.4.4_A15.js': true,
'S15.2.4.5_A12.js': true,
'S15.2.4.5_A13.js': true,
'S15.2.4.6_A12.js': true,
'S15.2.4.6_A13.js': true,
'S15.2.4.7_A12.js': true,
'S15.2.4.7_A13.js': true,
'15.3.2.1-10-4gs.js': true,
'15.3.2.1-10-6gs.js': true,
'S15.3.4.2_A12.js': true,
'S15.3.4.2_A13.js': true,
'S15.3.4.2_A14.js': true,
'S15.3.4.2_A15.js': true,
'S15.3.4.2_A16.js': true,
'S15.3.4.3_A13.js': true,
'S15.3.4.3_A14.js': true,
'S15.3.4.3_A15.js': true,
'S15.3.4.4_A13.js': true,
'S15.3.4.4_A14.js': true,
'S15.3.4.4_A15.js': true,
'S15.3.4.5_A1.js': true,
'S15.3.4.5_A13.js': true,
'S15.3.4.5_A14.js': true,
'S15.3.4.5_A15.js': true,
'S15.3.4.5_A2.js': true,
'15.3.5.4_2-10gs.js': true,
'15.3.5.4_2-11gs.js': true,
'15.3.5.4_2-13gs.js': true,
'15.3.5.4_2-15gs.js': true,
'15.3.5.4_2-16gs.js': true,
'15.3.5.4_2-17gs.js': true,
'15.3.5.4_2-18gs.js': true,
'15.3.5.4_2-19gs.js': true,
'15.3.5.4_2-1gs.js': true,
'15.3.5.4_2-20gs.js': true,
'15.3.5.4_2-21gs.js': true,
'15.3.5.4_2-22gs.js': true,
'15.3.5.4_2-23gs.js': true,
'15.3.5.4_2-24gs.js': true,
'15.3.5.4_2-25gs.js': true,
'15.3.5.4_2-26gs.js': true,
'15.3.5.4_2-27gs.js': true,
'15.3.5.4_2-28gs.js': true,
'15.3.5.4_2-29gs.js': true,
'15.3.5.4_2-2gs.js': true,
'15.3.5.4_2-30gs.js': true,
'15.3.5.4_2-31gs.js': true,
'15.3.5.4_2-32gs.js': true,
'15.3.5.4_2-33gs.js': true,
'15.3.5.4_2-34gs.js': true,
'15.3.5.4_2-35gs.js': true,
'15.3.5.4_2-36gs.js': true,
'15.3.5.4_2-37gs.js': true,
'15.3.5.4_2-38gs.js': true,
'15.3.5.4_2-39gs.js': true,
'15.3.5.4_2-3gs.js': true,
'15.3.5.4_2-40gs.js': true,
'15.3.5.4_2-41gs.js': true,
'15.3.5.4_2-42gs.js': true,
'15.3.5.4_2-43gs.js': true,
'15.3.5.4_2-44gs.js': true,
'15.3.5.4_2-45gs.js': true,
'15.3.5.4_2-46gs.js': true,
'15.3.5.4_2-47gs.js': true,
'15.3.5.4_2-48gs.js': true,
'15.3.5.4_2-49gs.js': true,
'15.3.5.4_2-4gs.js': true,
'15.3.5.4_2-50gs.js': true,
'15.3.5.4_2-51gs.js': true,
'15.3.5.4_2-52gs.js': true,
'15.3.5.4_2-53gs.js': true,
'15.3.5.4_2-54gs.js': true,
'15.3.5.4_2-55gs.js': true,
'15.3.5.4_2-56gs.js': true,
'15.3.5.4_2-57gs.js': true,
'15.3.5.4_2-58gs.js': true,
'15.3.5.4_2-59gs.js': true,
'15.3.5.4_2-5gs.js': true,
'15.3.5.4_2-60gs.js': true,
'15.3.5.4_2-61gs.js': true,
'15.3.5.4_2-62gs.js': true,
'15.3.5.4_2-63gs.js': true,
'15.3.5.4_2-64gs.js': true,
'15.3.5.4_2-65gs.js': true,
'15.3.5.4_2-66gs.js': true,
'15.3.5.4_2-67gs.js': true,
'15.3.5.4_2-68gs.js': true,
'15.3.5.4_2-69gs.js': true,
'15.3.5.4_2-6gs.js': true,
'15.3.5.4_2-70gs.js': true,
'15.3.5.4_2-71gs.js': true,
'15.3.5.4_2-72gs.js': true,
'15.3.5.4_2-73gs.js': true,
'15.3.5.4_2-74gs.js': true,
'15.3.5.4_2-7gs.js': true,
'15.3.5.4_2-8gs.js': true,
'15.3.5.4_2-94gs.js': true,
'15.3.5.4_2-95gs.js': true,
'15.3.5.4_2-96gs.js': true,
'15.3.5.4_2-97gs.js': true,
'15.3.5.4_2-9gs.js': true,
'15.3.5-1gs.js': true,
'15.3.5-2gs.js': true,
};
@@ -0,0 +1,5 @@
var a1 = [
1, /* item 1 */
2, /* item 2 */
3 /* item 3 */
]
@@ -0,0 +1,242 @@
{
"fullText": [
"var a1 = [",
" 1, /* item 1 */",
" 2, /* item 2 */",
" 3 /* item 3 */",
"]",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 78,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "VariableStatement",
"fullWidth": 78,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 78,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 4,
"text": "var",
"value": "var",
"valueText": "var",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 74,
"propertyName": {
"kind": "IdentifierName",
"width": 2,
"fullWidth": 3,
"text": "a1",
"value": "a1",
"valueText": "a1",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"equalsValueClause": {
"kind": "EqualsValueClause",
"fullWidth": 71,
"equalsToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 2,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"value": {
"kind": "ArrayLiteralExpression",
"fullWidth": 69,
"openBracketToken": {
"kind": "OpenBracketToken",
"width": 1,
"fullWidth": 3,
"text": "[",
"value": "[",
"valueText": "[",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expressions": [
{
"kind": "NumericLiteral",
"width": 1,
"fullWidth": 5,
"text": "1",
"value": 1,
"valueText": "1",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
{
"kind": "CommaToken",
"width": 1,
"fullWidth": 16,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"hasTrailingComment": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "MultiLineCommentTrivia",
"text": "/* item 1 */"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
{
"kind": "NumericLiteral",
"width": 1,
"fullWidth": 5,
"text": "2",
"value": 2,
"valueText": "2",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
{
"kind": "CommaToken",
"width": 1,
"fullWidth": 16,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"hasTrailingComment": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "MultiLineCommentTrivia",
"text": "/* item 2 */"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
{
"kind": "NumericLiteral",
"width": 1,
"fullWidth": 21,
"text": "3",
"value": 3,
"valueText": "3",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingComment": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "MultiLineCommentTrivia",
"text": "/* item 3 */"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
],
"closeBracketToken": {
"kind": "CloseBracketToken",
"width": 1,
"fullWidth": 3,
"text": "]",
"value": "]",
"valueText": "]",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 0,
"text": ""
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1 @@
var v30 = [1, 2], v31, v32, v33 = [0], v34 = {'a': true}, v35;
@@ -0,0 +1,401 @@
{
"fullText": [
"var v30 = [1, 2], v31, v32, v33 = [0], v34 = {'a': true}, v35;"
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 62,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "VariableStatement",
"fullWidth": 62,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 61,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 4,
"text": "var",
"value": "var",
"valueText": "var",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 12,
"propertyName": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 4,
"text": "v30",
"value": "v30",
"valueText": "v30",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"equalsValueClause": {
"kind": "EqualsValueClause",
"fullWidth": 8,
"equalsToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 2,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"value": {
"kind": "ArrayLiteralExpression",
"fullWidth": 6,
"openBracketToken": {
"kind": "OpenBracketToken",
"width": 1,
"text": "[",
"value": "[",
"valueText": "["
},
"expressions": [
{
"kind": "NumericLiteral",
"width": 1,
"text": "1",
"value": 1,
"valueText": "1"
},
{
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
{
"kind": "NumericLiteral",
"width": 1,
"text": "2",
"value": 2,
"valueText": "2"
}
],
"closeBracketToken": {
"kind": "CloseBracketToken",
"width": 1,
"text": "]",
"value": "]",
"valueText": "]"
}
}
}
},
{
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
{
"kind": "VariableDeclarator",
"fullWidth": 3,
"propertyName": {
"kind": "IdentifierName",
"width": 3,
"text": "v31",
"value": "v31",
"valueText": "v31"
}
},
{
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
{
"kind": "VariableDeclarator",
"fullWidth": 3,
"propertyName": {
"kind": "IdentifierName",
"width": 3,
"text": "v32",
"value": "v32",
"valueText": "v32"
}
},
{
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
{
"kind": "VariableDeclarator",
"fullWidth": 9,
"propertyName": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 4,
"text": "v33",
"value": "v33",
"valueText": "v33",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"equalsValueClause": {
"kind": "EqualsValueClause",
"fullWidth": 5,
"equalsToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 2,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"value": {
"kind": "ArrayLiteralExpression",
"fullWidth": 3,
"openBracketToken": {
"kind": "OpenBracketToken",
"width": 1,
"text": "[",
"value": "[",
"valueText": "["
},
"expressions": [
{
"kind": "NumericLiteral",
"width": 1,
"text": "0",
"value": 0,
"valueText": "0"
}
],
"closeBracketToken": {
"kind": "CloseBracketToken",
"width": 1,
"text": "]",
"value": "]",
"valueText": "]"
}
}
}
},
{
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
{
"kind": "VariableDeclarator",
"fullWidth": 17,
"propertyName": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 4,
"text": "v34",
"value": "v34",
"valueText": "v34",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"equalsValueClause": {
"kind": "EqualsValueClause",
"fullWidth": 13,
"equalsToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 2,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"value": {
"kind": "ObjectLiteralExpression",
"fullWidth": 11,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [
{
"kind": "SimplePropertyAssignment",
"fullWidth": 9,
"propertyName": {
"kind": "StringLiteral",
"width": 3,
"text": "'a'",
"value": "a",
"valueText": "a"
},
"colonToken": {
"kind": "ColonToken",
"width": 1,
"fullWidth": 2,
"text": ":",
"value": ":",
"valueText": ":",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "TrueKeyword",
"width": 4,
"text": "true",
"value": true,
"valueText": "true"
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
}
},
{
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
{
"kind": "VariableDeclarator",
"fullWidth": 3,
"propertyName": {
"kind": "IdentifierName",
"width": 3,
"text": "v35",
"value": "v35",
"valueText": "v35"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"text": ";",
"value": ";",
"valueText": ";"
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,5 @@
a => 1;
module M {
a => 1;
}
@@ -0,0 +1,697 @@
{
"fullText": [
"(function(a) {",
" return 1;",
"});",
"",
"var M;",
"(function(M) {",
" (function(a) {",
" return 1;",
" });",
"})(M||(M={}));",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 126,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "ExpressionStatement",
"fullWidth": 36,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 33,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 31,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 19,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 15,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 11,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "NumericLiteral",
"width": 1,
"text": "1",
"value": 1,
"valueText": "1"
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 80,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 77,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 66,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 64,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 52,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 48,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 45,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 5,
"text": "(",
"value": "(",
"valueText": "(",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 39,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 27,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 19,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 15,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "NumericLiteral",
"width": 1,
"text": "1",
"value": 1,
"valueText": "1"
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 5,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "LogicalOrExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "BarBarToken",
"width": 2,
"text": "||",
"value": "||",
"valueText": "||"
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"text": "=",
"value": "=",
"valueText": "="
},
"right": {
"kind": "ObjectLiteralExpression",
"fullWidth": 2,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,11 @@
a =>
// Comment1
// Comment2
foo().bar().baz();
module M {
a =>
// Comment1
// Comment2
foo().bar().baz();
}
@@ -0,0 +1,993 @@
{
"fullText": [
"(function(a) {",
" return",
" // Comment1",
" // Comment2",
" foo().bar().baz();",
"});",
"",
"var M;",
"(function(M) {",
" (function(a) {",
" return",
" // Comment1",
" // Comment2",
" foo().bar().baz();",
" });",
"})(M||(M={}));",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 276,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "ExpressionStatement",
"fullWidth": 99,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 96,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 94,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 82,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 78,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 12,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 63,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 61,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 57,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 55,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 51,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 49,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"hasLeadingComment": true,
"hasLeadingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment1"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment2"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 167,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 164,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 153,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 151,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 139,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 135,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 132,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 5,
"text": "(",
"value": "(",
"valueText": "(",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 126,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 114,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 106,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 16,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 87,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 85,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 81,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 79,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 75,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 73,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"hasLeadingComment": true,
"hasLeadingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment1"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment2"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 5,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "LogicalOrExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "BarBarToken",
"width": 2,
"text": "||",
"value": "||",
"valueText": "||"
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"text": "=",
"value": "=",
"valueText": "="
},
"right": {
"kind": "ObjectLiteralExpression",
"fullWidth": 2,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,15 @@
a =>
/* Comment1
* Comment2. Next line is empty
*/
foo().bar().baz();
module M {
a =>
/* Comment1
* Comment2. Next line is empty.
*/
foo().bar().baz();
}
@@ -0,0 +1,981 @@
{
"fullText": [
"(function(a) {",
" return",
" /* Comment1",
" * Comment2. Next line is empty",
"",
" */ ",
" foo().bar().baz();",
"});",
"",
"var M;",
"(function(M) {",
" (function(a) {",
" return",
" /* Comment1",
" * Comment2. Next line is empty.",
"",
" */ ",
" foo().bar().baz();",
" });",
"})(M||(M={}));",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 351,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "ExpressionStatement",
"fullWidth": 140,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 137,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 135,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 123,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 119,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 12,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 104,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 102,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 98,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 96,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 92,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 90,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"hasLeadingComment": true,
"hasLeadingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "MultiLineCommentTrivia",
"text": "/* Comment1\r\n * Comment2. Next line is empty\r\n\r\n */"
},
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 201,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 198,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 187,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 185,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 173,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 169,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 166,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 5,
"text": "(",
"value": "(",
"valueText": "(",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 160,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 148,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 140,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 16,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 121,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 119,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 115,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 113,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 109,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 107,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"hasLeadingComment": true,
"hasLeadingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "MultiLineCommentTrivia",
"text": "/* Comment1\r\n * Comment2. Next line is empty.\r\n\r\n */"
},
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 5,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "LogicalOrExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "BarBarToken",
"width": 2,
"text": "||",
"value": "||",
"valueText": "||"
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"text": "=",
"value": "=",
"valueText": "="
},
"right": {
"kind": "ObjectLiteralExpression",
"fullWidth": 2,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,9 @@
a =>
foo().bar()
.baz();
module M {
a =>
foo().bar()
.baz();
}
@@ -0,0 +1,973 @@
{
"fullText": [
"(function(a) {",
" return",
" foo().bar()",
" .baz();",
"});",
"",
"var M;",
"(function(M) {",
" (function(a) {",
" return",
" foo().bar()",
" .baz();",
" });",
"})(M||(M={}));",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 198,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "ExpressionStatement",
"fullWidth": 68,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 65,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 63,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 51,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 47,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 12,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 32,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 30,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 17,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 13,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 7,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 4,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"fullWidth": 10,
"text": ".",
"value": ".",
"valueText": ".",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 120,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 117,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 106,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 104,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 92,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 88,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 85,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 5,
"text": "(",
"value": "(",
"valueText": "(",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 79,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 67,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 59,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 16,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 40,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 38,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 21,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 17,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 13,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 11,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 4,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"fullWidth": 14,
"text": ".",
"value": ".",
"valueText": ".",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 5,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "LogicalOrExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "BarBarToken",
"width": 2,
"text": "||",
"value": "||",
"valueText": "||"
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"text": "=",
"value": "=",
"valueText": "="
},
"right": {
"kind": "ObjectLiteralExpression",
"fullWidth": 2,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,7 @@
a => foo().bar()
.baz();
module M {
a => foo().bar()
.baz();
}
@@ -0,0 +1,947 @@
{
"fullText": [
"(function(a) {",
" return foo().bar()",
" .baz();",
"});",
"",
"var M;",
"(function(M) {",
" (function(a) {",
" return foo().bar()",
" .baz();",
" });",
"})(M||(M={}));",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 198,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "ExpressionStatement",
"fullWidth": 70,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 67,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 65,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 53,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 49,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 11,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 35,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 33,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 13,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 9,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 5,
"expression": {
"kind": "IdentifierName",
"width": 3,
"text": "foo",
"value": "foo",
"valueText": "foo"
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 4,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"fullWidth": 17,
"text": ".",
"value": ".",
"valueText": ".",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 118,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 115,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 104,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 102,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 90,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 86,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 83,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 5,
"text": "(",
"value": "(",
"valueText": "(",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 77,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 65,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 57,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 15,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 39,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 37,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 13,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 9,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 5,
"expression": {
"kind": "IdentifierName",
"width": 3,
"text": "foo",
"value": "foo",
"valueText": "foo"
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 4,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"fullWidth": 21,
"text": ".",
"value": ".",
"valueText": ".",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 5,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "LogicalOrExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "BarBarToken",
"width": 2,
"text": "||",
"value": "||",
"valueText": "||"
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"text": "=",
"value": "=",
"valueText": "="
},
"right": {
"kind": "ObjectLiteralExpression",
"fullWidth": 2,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,7 @@
a => foo().bar()
.baz();
module M {
a => foo().bar()
.baz();
}
@@ -0,0 +1,947 @@
{
"fullText": [
"(function(a) {",
" return foo().bar()",
" .baz();",
"});",
"",
"var M;",
"(function(M) {",
" (function(a) {",
" return foo().bar()",
" .baz();",
" });",
"})(M||(M={}));",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 186,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "ExpressionStatement",
"fullWidth": 64,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 61,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 59,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 47,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 43,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 11,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 29,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 27,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 13,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 9,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 5,
"expression": {
"kind": "IdentifierName",
"width": 3,
"text": "foo",
"value": "foo",
"valueText": "foo"
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 4,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"fullWidth": 11,
"text": ".",
"value": ".",
"valueText": ".",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 112,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 109,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 98,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 96,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 84,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 80,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 77,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 5,
"text": "(",
"value": "(",
"valueText": "(",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 71,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 59,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 51,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 15,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 33,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 31,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 13,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 9,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 5,
"expression": {
"kind": "IdentifierName",
"width": 3,
"text": "foo",
"value": "foo",
"valueText": "foo"
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 4,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"fullWidth": 15,
"text": ".",
"value": ".",
"valueText": ".",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 5,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "LogicalOrExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "BarBarToken",
"width": 2,
"text": "||",
"value": "||",
"valueText": "||"
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"text": "=",
"value": "=",
"valueText": "="
},
"right": {
"kind": "ObjectLiteralExpression",
"fullWidth": 2,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,7 @@
longname => foo().bar()
.baz();
module M {
longname => foo().bar()
.baz();
}
@@ -0,0 +1,947 @@
{
"fullText": [
"(function(longname) {",
" return foo().bar()",
" .baz();",
"});",
"",
"var M;",
"(function(M) {",
" (function(longname) {",
" return foo().bar()",
" .baz();",
" });",
"})(M||(M={}));",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 196,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "ExpressionStatement",
"fullWidth": 69,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 66,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 64,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 8,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 8,
"text": "longname",
"value": "longname",
"valueText": "longname"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 45,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 41,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 11,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 27,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 25,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 13,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 9,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 5,
"expression": {
"kind": "IdentifierName",
"width": 3,
"text": "foo",
"value": "foo",
"valueText": "foo"
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 4,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"fullWidth": 9,
"text": ".",
"value": ".",
"valueText": ".",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 117,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 114,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 103,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 101,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 89,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 85,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 82,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 5,
"text": "(",
"value": "(",
"valueText": "(",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 76,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 8,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 8,
"text": "longname",
"value": "longname",
"valueText": "longname"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 57,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 49,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 15,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 31,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 29,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 13,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 9,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 5,
"expression": {
"kind": "IdentifierName",
"width": 3,
"text": "foo",
"value": "foo",
"valueText": "foo"
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 4,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"fullWidth": 13,
"text": ".",
"value": ".",
"valueText": ".",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 5,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "LogicalOrExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "BarBarToken",
"width": 2,
"text": "||",
"value": "||",
"valueText": "||"
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"text": "=",
"value": "=",
"valueText": "="
},
"right": {
"kind": "ObjectLiteralExpression",
"fullWidth": 2,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,9 @@
a =>
foo().bar()
.baz();
module M {
a =>
foo().bar()
.baz();
}
@@ -0,0 +1,973 @@
{
"fullText": [
"(function(a) {",
" return",
" foo().bar()",
" .baz();",
"});",
"",
"var M;",
"(function(M) {",
" (function(a) {",
" return",
" foo().bar()",
" .baz();",
" });",
"})(M||(M={}));",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 214,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "ExpressionStatement",
"fullWidth": 76,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 73,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 71,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 59,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 55,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 12,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 40,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 38,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 21,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 17,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 13,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 11,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 4,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"fullWidth": 14,
"text": ".",
"value": ".",
"valueText": ".",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 128,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 125,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 114,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 112,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 100,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 96,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 93,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 5,
"text": "(",
"value": "(",
"valueText": "(",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 87,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 75,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 67,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 16,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 48,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 46,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 25,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 21,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 17,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 15,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 4,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"fullWidth": 18,
"text": ".",
"value": ".",
"valueText": ".",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 5,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "LogicalOrExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "BarBarToken",
"width": 2,
"text": "||",
"value": "||",
"valueText": "||"
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"text": "=",
"value": "=",
"valueText": "="
},
"right": {
"kind": "ObjectLiteralExpression",
"fullWidth": 2,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,9 @@
longname =>
foo().bar()
.baz();
module M {
longname =>
foo().bar()
.baz();
}
@@ -0,0 +1,973 @@
{
"fullText": [
"(function(longname) {",
" return",
" foo().bar()",
" .baz();",
"});",
"",
"var M;",
"(function(M) {",
" (function(longname) {",
" return",
" foo().bar()",
" .baz();",
" });",
"})(M||(M={}));",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 228,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "ExpressionStatement",
"fullWidth": 83,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 80,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 78,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 8,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 8,
"text": "longname",
"value": "longname",
"valueText": "longname"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 59,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 55,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 12,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 40,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 38,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 21,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 17,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 13,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 11,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 4,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"fullWidth": 14,
"text": ".",
"value": ".",
"valueText": ".",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 135,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 132,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 121,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 119,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 107,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 103,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 100,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 5,
"text": "(",
"value": "(",
"valueText": "(",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 94,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 8,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 8,
"text": "longname",
"value": "longname",
"valueText": "longname"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 75,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 67,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 16,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 48,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 46,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 25,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 21,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 17,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 15,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 4,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"fullWidth": 18,
"text": ".",
"value": ".",
"valueText": ".",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 5,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "LogicalOrExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "BarBarToken",
"width": 2,
"text": "||",
"value": "||",
"valueText": "||"
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"text": "=",
"value": "=",
"valueText": "="
},
"right": {
"kind": "ObjectLiteralExpression",
"fullWidth": 2,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,9 @@
a =>
// Comment1
foo().bar().baz();
module M {
a =>
// Comment1
foo().bar().baz();
}
@@ -0,0 +1,967 @@
{
"fullText": [
"(function(a) {",
" return",
" // Comment1",
" foo().bar().baz();",
"});",
"",
"var M;",
"(function(M) {",
" (function(a) {",
" return",
" // Comment1",
" foo().bar().baz();",
" });",
"})(M||(M={}));",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 226,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "ExpressionStatement",
"fullWidth": 82,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 79,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 77,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 65,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 61,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 12,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 46,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 44,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 40,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 38,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 34,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 32,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"hasLeadingComment": true,
"hasLeadingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment1"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 134,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 131,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 120,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 118,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 106,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 102,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 99,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 5,
"text": "(",
"value": "(",
"valueText": "(",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 93,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 81,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 73,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 16,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 54,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 52,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 48,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 46,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 42,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 40,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"hasLeadingComment": true,
"hasLeadingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment1"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 5,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "LogicalOrExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "BarBarToken",
"width": 2,
"text": "||",
"value": "||",
"valueText": "||"
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"text": "=",
"value": "=",
"valueText": "="
},
"right": {
"kind": "ObjectLiteralExpression",
"fullWidth": 2,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,11 @@
a =>
// Comment1
// Comment2
foo().bar().baz();
module M {
a =>
// Comment1
// Comment2
foo().bar().baz();
}
@@ -0,0 +1,993 @@
{
"fullText": [
"(function(a) {",
" return",
" // Comment1",
" // Comment2",
" foo().bar().baz();",
"});",
"",
"var M;",
"(function(M) {",
" (function(a) {",
" return",
" // Comment1",
" // Comment2",
" foo().bar().baz();",
" });",
"})(M||(M={}));",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 272,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "ExpressionStatement",
"fullWidth": 103,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 100,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 98,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 86,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 82,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 12,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 67,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 65,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 61,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 59,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 55,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 53,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"hasLeadingComment": true,
"hasLeadingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment1"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment2"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 159,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 156,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 145,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 143,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 131,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 127,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 124,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 5,
"text": "(",
"value": "(",
"valueText": "(",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 118,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 106,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 98,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 16,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 79,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 77,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 73,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 71,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 67,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 65,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"hasLeadingComment": true,
"hasLeadingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment1"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment2"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 5,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "LogicalOrExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "BarBarToken",
"width": 2,
"text": "||",
"value": "||",
"valueText": "||"
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"text": "=",
"value": "=",
"valueText": "="
},
"right": {
"kind": "ObjectLiteralExpression",
"fullWidth": 2,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,11 @@
a =>
// Comment1
// Comment2
foo().bar().baz();
module M {
a =>
// Comment1
// Comment2
foo().bar().baz();
}
@@ -0,0 +1,993 @@
{
"fullText": [
"(function(a) {",
" return",
" // Comment1",
" // Comment2",
" foo().bar().baz();",
"});",
"",
"var M;",
"(function(M) {",
" (function(a) {",
" return",
" // Comment1",
" // Comment2",
" foo().bar().baz();",
" });",
"})(M||(M={}));",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 276,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "ExpressionStatement",
"fullWidth": 99,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 96,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 94,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 82,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 78,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 12,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 63,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 61,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 57,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 55,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 51,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 49,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"hasLeadingComment": true,
"hasLeadingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment1"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment2"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 167,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 164,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 153,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 151,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 139,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 135,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 132,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 5,
"text": "(",
"value": "(",
"valueText": "(",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 126,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 1,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 114,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 106,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 16,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"expression": {
"kind": "InvocationExpression",
"fullWidth": 87,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 85,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 81,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 79,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 75,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 73,
"text": "foo",
"value": "foo",
"valueText": "foo",
"hasLeadingTrivia": true,
"hasLeadingComment": true,
"hasLeadingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment1"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "SingleLineCommentTrivia",
"text": "// Comment2"
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "bar",
"value": "bar",
"valueText": "bar"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "baz",
"value": "baz",
"valueText": "baz"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 2,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 5,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "LogicalOrExpression",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "BarBarToken",
"width": 2,
"text": "||",
"value": "||",
"valueText": "||"
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 4,
"isIncrementallyUnusable": true,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "M",
"value": "M",
"valueText": "M"
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"text": "=",
"value": "=",
"valueText": "="
},
"right": {
"kind": "ObjectLiteralExpression",
"fullWidth": 2,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"text": "{",
"value": "{",
"valueText": "{"
},
"propertyAssignments": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,4 @@
function f() {
return
1 + 2;
}
@@ -0,0 +1,220 @@
{
"fullText": [
"function f() {",
" return",
" 1 + 2;",
"}",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 43,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "FunctionDeclaration",
"fullWidth": 43,
"isIncrementallyUnusable": true,
"modifiers": [],
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"fullWidth": 9,
"text": "function",
"value": "function",
"valueText": "function",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "f",
"value": "f",
"valueText": "f"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 3,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 3,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 30,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 12,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 12,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 0,
"text": ""
}
},
{
"kind": "ExpressionStatement",
"fullWidth": 12,
"expression": {
"kind": "AddExpression",
"fullWidth": 9,
"left": {
"kind": "NumericLiteral",
"width": 1,
"fullWidth": 6,
"text": "1",
"value": 1,
"valueText": "1",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"operatorToken": {
"kind": "PlusToken",
"width": 1,
"fullWidth": 2,
"text": "+",
"value": "+",
"valueText": "+",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"right": {
"kind": "NumericLiteral",
"width": 1,
"text": "2",
"value": 2,
"valueText": "2"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 3,
"text": "}",
"value": "}",
"valueText": "}",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,5 @@
function foo() {
{
console.log("foo");
}
}
@@ -0,0 +1,254 @@
{
"fullText": [
"function foo() {",
" {",
" console.log(\"foo\");",
" }",
"}",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 64,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "FunctionDeclaration",
"fullWidth": 64,
"modifiers": [],
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"fullWidth": 9,
"text": "function",
"value": "function",
"valueText": "function",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"identifier": {
"kind": "IdentifierName",
"width": 3,
"text": "foo",
"value": "foo",
"valueText": "foo"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 3,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 3,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 49,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "Block",
"fullWidth": 43,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 7,
"text": "{",
"value": "{",
"valueText": "{",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 29,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 26,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 19,
"expression": {
"kind": "IdentifierName",
"width": 7,
"fullWidth": 15,
"text": "console",
"value": "console",
"valueText": "console",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 3,
"text": "log",
"value": "log",
"valueText": "log"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 7,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "StringLiteral",
"width": 5,
"text": "\"foo\"",
"value": "foo",
"valueText": "foo"
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 7,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 3,
"text": "}",
"value": "}",
"valueText": "}",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,4 @@
var v = <number>foo;
var x =
<string>bar;
@@ -0,0 +1,210 @@
{
"fullText": [
"var v = foo;",
"",
"var x =",
" bar;"
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 33,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "VariableStatement",
"fullWidth": 14,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 4,
"text": "var",
"value": "var",
"valueText": "var",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 7,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"fullWidth": 2,
"text": "v",
"value": "v",
"valueText": "v",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"equalsValueClause": {
"kind": "EqualsValueClause",
"fullWidth": 5,
"isIncrementallyUnusable": true,
"equalsToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 2,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"value": {
"kind": "IdentifierName",
"width": 3,
"text": "foo",
"value": "foo",
"valueText": "foo"
}
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 19,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 18,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 6,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 12,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"fullWidth": 2,
"text": "x",
"value": "x",
"valueText": "x",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"equalsValueClause": {
"kind": "EqualsValueClause",
"fullWidth": 10,
"isIncrementallyUnusable": true,
"equalsToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 3,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"value": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 7,
"text": "bar",
"value": "bar",
"valueText": "bar",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"text": ";",
"value": ";",
"valueText": ";"
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,7 @@
class C {
}
module A.B.C {
class D {
}
}
@@ -0,0 +1,13 @@
class C {
private foo(x = 1) {
var v = a => { return 2; };
}
}
module A.B {
class D {
private foo(x = 1) {
var v = a => { return 2; };
}
}
}
@@ -0,0 +1,12 @@
export class C {
}
module M {
export class C {
}
}
module M1.M2.M3 {
export class C {
}
}
@@ -0,0 +1,17 @@
class C {
constructor() {
a = 1;
v = foo().bar()
.baz();
}
}
module A.B {
class D {
constructor() {
a = 1;
v = foo().bar()
.baz();
}
}
}
@@ -0,0 +1,13 @@
class C {
constructor(p = 1, q, r = 2) {
a = 1;
}
}
module A.B {
class D {
constructor(p = 1, q, r = 2) {
a = 1;
}
}
}
@@ -0,0 +1,19 @@
// Class 1
class C {
// Constructor1
constructor(p = 1, q, r = 2) {
// Statement2
a = 1;
}
}
module A.B {
// Class 2
class D {
// Constructor 2
constructor(p = 1, q, r = 2) {
// Statement 2
a = 1;
}
}
}
@@ -0,0 +1,13 @@
class C {
constructor(p = 1, public q, private r = 2) {
a = 1;
}
}
module A.B {
class D {
constructor(p = 1, public q, private r = 2) {
a = 1;
}
}
}
@@ -0,0 +1,19 @@
class C {
x = 1;
public y;
static z = "";
constructor(p = 1, public q, private r = 2) {
a = 1;
}
}
module A.B {
class D {
x = 1;
private y;
static z = "";
constructor(p = 1, public q, private r = 2) {
a = 1;
}
}
}
@@ -0,0 +1,21 @@
class C {
// Comment1
private foo() {
}
/* Comment2 */
private static bar() {
}
}
module A.B {
class D {
// Comment3
private foo() {
}
/* Comment4 */
private static bar() {
}
}
}
@@ -0,0 +1,29 @@
class C {
// C.x
x = 1;
// C.y
public y;
/* C.z */
static z = "";
constructor(p = 1, public q, private r = 2) {
a = 1;
}
}
module A.B {
class D {
// D.x
x = 1;
// D.y
private y;
/* D.z */
static z = "";
constructor(p = 1, public q, private r = 2) {
a = 1;
}
}
}
@@ -0,0 +1,11 @@
class C {
private foo(x = 1, y, z = "") {
}
}
module A.B {
class D {
private foo(x = 1, y, z = "") {
}
}
}
@@ -0,0 +1,614 @@
{
"fullText": [
"var C = (function(_super) {",
" __extends(C, _super);",
" function C() {",
" _super.apply(this, arguments);",
" }",
" return C;",
"})(D);",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 146,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "VariableStatement",
"fullWidth": 146,
"isIncrementallyUnusable": true,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 143,
"isIncrementallyUnusable": true,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 4,
"text": "var",
"value": "var",
"valueText": "var",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 139,
"isIncrementallyUnusable": true,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"fullWidth": 2,
"text": "C",
"value": "C",
"valueText": "C",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"equalsValueClause": {
"kind": "EqualsValueClause",
"fullWidth": 137,
"isIncrementallyUnusable": true,
"equalsToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 2,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"value": {
"kind": "InvocationExpression",
"fullWidth": 135,
"isIncrementallyUnusable": true,
"expression": {
"kind": "ParenthesizedExpression",
"fullWidth": 132,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 130,
"isIncrementallyUnusable": true,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 9,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 6,
"isIncrementallyUnusable": true,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 6,
"text": "_super",
"value": "_super",
"valueText": "_super"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 113,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 27,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 24,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 9,
"fullWidth": 13,
"text": "__extends",
"value": "__extends",
"valueText": "__extends",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 11,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "IdentifierName",
"width": 1,
"text": "C",
"value": "C",
"valueText": "C"
},
{
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
{
"kind": "IdentifierName",
"width": 6,
"text": "_super",
"value": "_super",
"valueText": "_super"
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "FunctionDeclaration",
"fullWidth": 67,
"isIncrementallyUnusable": true,
"modifiers": [],
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"fullWidth": 13,
"text": "function",
"value": "function",
"valueText": "function",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"identifier": {
"kind": "IdentifierName",
"width": 1,
"text": "C",
"value": "C",
"valueText": "C"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 3,
"isIncrementallyUnusable": true,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 3,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 50,
"isIncrementallyUnusable": true,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 40,
"isIncrementallyUnusable": true,
"expression": {
"kind": "InvocationExpression",
"fullWidth": 37,
"isIncrementallyUnusable": true,
"expression": {
"kind": "MemberAccessExpression",
"fullWidth": 20,
"isIncrementallyUnusable": true,
"expression": {
"kind": "IdentifierName",
"width": 6,
"fullWidth": 14,
"text": "_super",
"value": "_super",
"valueText": "_super",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 5,
"text": "apply",
"value": "apply",
"valueText": "apply"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 17,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "ThisKeyword",
"width": 4,
"text": "this",
"value": "this",
"valueText": "this"
},
{
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
{
"kind": "IdentifierName",
"width": 9,
"text": "arguments",
"value": "arguments",
"valueText": "arguments"
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 7,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
},
{
"kind": "ReturnStatement",
"fullWidth": 15,
"isIncrementallyUnusable": true,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 11,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "IdentifierName",
"width": 1,
"text": "C",
"value": "C",
"valueText": "C"
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 3,
"isIncrementallyUnusable": true,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"arguments": [
{
"kind": "IdentifierName",
"width": 1,
"text": "D",
"value": "D",
"valueText": "D"
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,19 @@
class C extends D {
}
module M {
class C extends D {
}
}
module M1 {
module M2 {
class C extends D {
}
}
}
module M3.M4 {
class C extends D {
}
}
@@ -0,0 +1,5 @@
var v1 = ((1, 2, 3), 4, 5, (6, 7));
function f1() {
var a = 1;
return a, v1, a;
}
@@ -0,0 +1,610 @@
{
"fullText": [
"var v1 = ((1, 2, 3), 4, 5, (6, 7));",
"function f1() {",
" var a = 1;",
" return a, v1, a;",
"}",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 95,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "VariableStatement",
"fullWidth": 37,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 34,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 4,
"text": "var",
"value": "var",
"valueText": "var",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 30,
"propertyName": {
"kind": "IdentifierName",
"width": 2,
"fullWidth": 3,
"text": "v1",
"value": "v1",
"valueText": "v1",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"equalsValueClause": {
"kind": "EqualsValueClause",
"fullWidth": 27,
"equalsToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 2,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"value": {
"kind": "ParenthesizedExpression",
"fullWidth": 25,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "CommaExpression",
"fullWidth": 23,
"left": {
"kind": "CommaExpression",
"fullWidth": 15,
"left": {
"kind": "CommaExpression",
"fullWidth": 12,
"left": {
"kind": "ParenthesizedExpression",
"fullWidth": 9,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "CommaExpression",
"fullWidth": 7,
"left": {
"kind": "CommaExpression",
"fullWidth": 4,
"left": {
"kind": "NumericLiteral",
"width": 1,
"text": "1",
"value": 1,
"valueText": "1"
},
"operatorToken": {
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"right": {
"kind": "NumericLiteral",
"width": 1,
"text": "2",
"value": 2,
"valueText": "2"
}
},
"operatorToken": {
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"right": {
"kind": "NumericLiteral",
"width": 1,
"text": "3",
"value": 3,
"valueText": "3"
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
},
"operatorToken": {
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"right": {
"kind": "NumericLiteral",
"width": 1,
"text": "4",
"value": 4,
"valueText": "4"
}
},
"operatorToken": {
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"right": {
"kind": "NumericLiteral",
"width": 1,
"text": "5",
"value": 5,
"valueText": "5"
}
},
"operatorToken": {
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"right": {
"kind": "ParenthesizedExpression",
"fullWidth": 6,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"expression": {
"kind": "CommaExpression",
"fullWidth": 4,
"left": {
"kind": "NumericLiteral",
"width": 1,
"text": "6",
"value": 6,
"valueText": "6"
},
"operatorToken": {
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"right": {
"kind": "NumericLiteral",
"width": 1,
"text": "7",
"value": 7,
"valueText": "7"
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "FunctionDeclaration",
"fullWidth": 58,
"modifiers": [],
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"fullWidth": 9,
"text": "function",
"value": "function",
"valueText": "function",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"identifier": {
"kind": "IdentifierName",
"width": 2,
"text": "f1",
"value": "f1",
"valueText": "f1"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 3,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 3,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 44,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "VariableStatement",
"fullWidth": 16,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 13,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 8,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 5,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"fullWidth": 2,
"text": "a",
"value": "a",
"valueText": "a",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"equalsValueClause": {
"kind": "EqualsValueClause",
"fullWidth": 3,
"equalsToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 2,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"value": {
"kind": "NumericLiteral",
"width": 1,
"text": "1",
"value": 1,
"valueText": "1"
}
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "ReturnStatement",
"fullWidth": 22,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 11,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "CommaExpression",
"fullWidth": 8,
"left": {
"kind": "CommaExpression",
"fullWidth": 5,
"left": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
},
"operatorToken": {
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"right": {
"kind": "IdentifierName",
"width": 2,
"text": "v1",
"value": "v1",
"valueText": "v1"
}
},
"operatorToken": {
"kind": "CommaToken",
"width": 1,
"fullWidth": 2,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"right": {
"kind": "IdentifierName",
"width": 1,
"text": "a",
"value": "a",
"valueText": "a"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 3,
"text": "}",
"value": "}",
"valueText": "}",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,18 @@
var Person = makeClass(
/**
@scope Person
*/
{
/**
This is just another way to define a constructor.
@constructs
@param {string} name The name of the person.
*/
initialize: function(name) {
this.name = name;
},
say: function(message) {
return this.name + " says: " + message;
}
}
);
@@ -0,0 +1,767 @@
{
"fullText": [
"var Person = makeClass( ",
" /** ",
" @scope Person ",
" */ ",
" { ",
" /** ",
" This is just another way to define a constructor. ",
" @constructs ",
" @param {string} name The name of the person. ",
" */ ",
" initialize: function(name) { ",
" this.name = name; ",
" }, ",
" say: function(message) { ",
" return this.name + \" says: \" + message; ",
" } ",
" } ",
");"
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 422,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "VariableStatement",
"fullWidth": 422,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 421,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 4,
"text": "var",
"value": "var",
"valueText": "var",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 417,
"propertyName": {
"kind": "IdentifierName",
"width": 6,
"fullWidth": 7,
"text": "Person",
"value": "Person",
"valueText": "Person",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"equalsValueClause": {
"kind": "EqualsValueClause",
"fullWidth": 410,
"equalsToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 2,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"value": {
"kind": "InvocationExpression",
"fullWidth": 408,
"expression": {
"kind": "IdentifierName",
"width": 9,
"text": "makeClass",
"value": "makeClass",
"valueText": "makeClass"
},
"argumentList": {
"kind": "ArgumentList",
"fullWidth": 399,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 4,
"text": "(",
"value": "(",
"valueText": "(",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"arguments": [
{
"kind": "ObjectLiteralExpression",
"fullWidth": 394,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 45,
"text": "{",
"value": "{",
"valueText": "{",
"hasLeadingTrivia": true,
"hasLeadingComment": true,
"hasLeadingNewLine": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "MultiLineCommentTrivia",
"text": "/** \r\n @scope Person \r\n */"
},
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"propertyAssignments": [
{
"kind": "SimplePropertyAssignment",
"fullWidth": 240,
"propertyName": {
"kind": "IdentifierName",
"width": 10,
"fullWidth": 180,
"text": "initialize",
"value": "initialize",
"valueText": "initialize",
"hasLeadingTrivia": true,
"hasLeadingComment": true,
"hasLeadingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "MultiLineCommentTrivia",
"text": "/** \r\n This is just another way to define a constructor. \r\n @constructs \r\n @param {string} name The name of the person. \r\n */"
},
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
},
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"colonToken": {
"kind": "ColonToken",
"width": 1,
"fullWidth": 2,
"text": ":",
"value": ":",
"valueText": ":",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 58,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 7,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 7,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 4,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 4,
"text": "name",
"value": "name",
"valueText": "name"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 43,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 4,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ExpressionStatement",
"fullWidth": 31,
"expression": {
"kind": "AssignmentExpression",
"fullWidth": 27,
"left": {
"kind": "MemberAccessExpression",
"fullWidth": 21,
"expression": {
"kind": "ThisKeyword",
"width": 4,
"fullWidth": 15,
"text": "this",
"value": "this",
"valueText": "this",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 4,
"fullWidth": 5,
"text": "name",
"value": "name",
"valueText": "name",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
},
"operatorToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 2,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"right": {
"kind": "IdentifierName",
"width": 4,
"text": "name",
"value": "name",
"valueText": "name"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 4,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 8,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
}
},
{
"kind": "CommaToken",
"width": 1,
"fullWidth": 4,
"text": ",",
"value": ",",
"valueText": ",",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
{
"kind": "SimplePropertyAssignment",
"fullWidth": 98,
"propertyName": {
"kind": "IdentifierName",
"width": 3,
"fullWidth": 10,
"text": "say",
"value": "say",
"valueText": "say",
"hasLeadingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"colonToken": {
"kind": "ColonToken",
"width": 1,
"fullWidth": 2,
"text": ":",
"value": ":",
"valueText": ":",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "FunctionExpression",
"fullWidth": 86,
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 10,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 10,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [
{
"kind": "Parameter",
"fullWidth": 7,
"modifiers": [],
"identifier": {
"kind": "IdentifierName",
"width": 7,
"text": "message",
"value": "message",
"valueText": "message"
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 68,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 4,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "ReturnStatement",
"fullWidth": 53,
"returnKeyword": {
"kind": "ReturnKeyword",
"width": 6,
"fullWidth": 18,
"text": "return",
"value": "return",
"valueText": "return",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"expression": {
"kind": "AddExpression",
"fullWidth": 31,
"left": {
"kind": "AddExpression",
"fullWidth": 22,
"left": {
"kind": "MemberAccessExpression",
"fullWidth": 10,
"expression": {
"kind": "ThisKeyword",
"width": 4,
"text": "this",
"value": "this",
"valueText": "this"
},
"dotToken": {
"kind": "DotToken",
"width": 1,
"text": ".",
"value": ".",
"valueText": "."
},
"name": {
"kind": "IdentifierName",
"width": 4,
"fullWidth": 5,
"text": "name",
"value": "name",
"valueText": "name",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
},
"operatorToken": {
"kind": "PlusToken",
"width": 1,
"fullWidth": 2,
"text": "+",
"value": "+",
"valueText": "+",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"right": {
"kind": "StringLiteral",
"width": 9,
"fullWidth": 10,
"text": "\" says: \"",
"value": " says: ",
"valueText": " says: ",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
},
"operatorToken": {
"kind": "PlusToken",
"width": 1,
"fullWidth": 2,
"text": "+",
"value": "+",
"valueText": "+",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"right": {
"kind": "IdentifierName",
"width": 7,
"text": "message",
"value": "message",
"valueText": "message"
}
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 4,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 11,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 7,
"text": "}",
"value": "}",
"valueText": "}",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"text": ")",
"value": ")",
"valueText": ")"
}
}
}
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"text": ";",
"value": ";",
"valueText": ";"
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,2 @@
function(/** nothing */) {
}
@@ -0,0 +1,114 @@
{
"fullText": [
"function(/** nothing */) {",
"}",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 31,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "FunctionDeclaration",
"fullWidth": 31,
"isIncrementallyUnusable": true,
"modifiers": [],
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"text": "function",
"value": "function",
"valueText": "function"
},
"identifier": {
"kind": "IdentifierName",
"width": 0,
"text": ""
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 17,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 17,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"fullWidth": 15,
"text": "(",
"value": "(",
"valueText": "(",
"hasTrailingTrivia": true,
"hasTrailingComment": true,
"trailingTrivia": [
{
"kind": "MultiLineCommentTrivia",
"text": "/** nothing */"
}
]
},
"parameters": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 6,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 3,
"text": "}",
"value": "}",
"valueText": "}",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,15 @@
class Parser {
constructor(text: IText,
stringTable: StringTable = null,
oldTree?: SyntaxTree = null) {
}
}
module M1.M2 {
class Parser {
constructor(text: IText,
stringTable: StringTable = null,
oldTree?: SyntaxTree = null) {
}
}
}
@@ -0,0 +1,13 @@
class A extends B {
constructor() {
super();
}
}
module M1.M2 {
class A extends B {
constructor() {
super();
}
}
}
@@ -0,0 +1,13 @@
class A extends B {
constructor() {
super(1);
}
}
module M1.M2 {
class A extends B {
constructor() {
super(1);
}
}
}
@@ -0,0 +1,13 @@
class A extends B {
constructor() {
super(1, "");
}
}
module M1.M2 {
class A extends B {
constructor() {
super(1, "");
}
}
}
@@ -0,0 +1,21 @@
class A extends B {
public j = 2;
constructor(public i = 1) {
// Comment
super(1, "");
return;
}
}
module M1.M2 {
class A extends B {
public j = 2;
constructor(public i = 1) {
// Comment
super(1, "");
return;
}
}
}
@@ -0,0 +1,23 @@
class C {
private x = 0;
}
module M {
class C {
private x = 0;
}
}
module M1.M2 {
class C {
private x = 0;
}
}
module M1 {
module M2 {
class C {
private x = 0;
}
}
}
@@ -0,0 +1,3 @@
do {
var a = 1;
} while (false)
@@ -0,0 +1,221 @@
{
"fullText": [
"do {",
" var a = 1;",
"} while (false)",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 39,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "DoStatement",
"fullWidth": 39,
"isIncrementallyUnusable": true,
"doKeyword": {
"kind": "DoKeyword",
"width": 2,
"fullWidth": 3,
"text": "do",
"value": "do",
"valueText": "do",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"statement": {
"kind": "Block",
"fullWidth": 21,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [
{
"kind": "VariableStatement",
"fullWidth": 16,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 13,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 8,
"text": "var",
"value": "var",
"valueText": "var",
"hasLeadingTrivia": true,
"hasTrailingTrivia": true,
"leadingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
],
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 5,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"fullWidth": 2,
"text": "a",
"value": "a",
"valueText": "a",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"equalsValueClause": {
"kind": "EqualsValueClause",
"fullWidth": 3,
"equalsToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 2,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"value": {
"kind": "NumericLiteral",
"width": 1,
"text": "1",
"value": 1,
"valueText": "1"
}
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"fullWidth": 2,
"text": "}",
"value": "}",
"valueText": "}",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
},
"whileKeyword": {
"kind": "WhileKeyword",
"width": 5,
"fullWidth": 6,
"text": "while",
"value": "while",
"valueText": "while",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"condition": {
"kind": "FalseKeyword",
"width": 5,
"text": "false",
"value": false,
"valueText": "false"
},
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 3,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 0,
"text": ""
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,3 @@
; ;
var a = 1;
;
@@ -0,0 +1,170 @@
{
"fullText": [
"; ;",
"var a = 1;",
"; ",
""
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 21,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "EmptyStatement",
"fullWidth": 2,
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 2,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
},
{
"kind": "EmptyStatement",
"fullWidth": 3,
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "VariableStatement",
"fullWidth": 12,
"modifiers": [],
"variableDeclaration": {
"kind": "VariableDeclaration",
"fullWidth": 9,
"varKeyword": {
"kind": "VarKeyword",
"width": 3,
"fullWidth": 4,
"text": "var",
"value": "var",
"valueText": "var",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"variableDeclarators": [
{
"kind": "VariableDeclarator",
"fullWidth": 5,
"propertyName": {
"kind": "IdentifierName",
"width": 1,
"fullWidth": 2,
"text": "a",
"value": "a",
"valueText": "a",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"equalsValueClause": {
"kind": "EqualsValueClause",
"fullWidth": 3,
"equalsToken": {
"kind": "EqualsToken",
"width": 1,
"fullWidth": 2,
"text": "=",
"value": "=",
"valueText": "=",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"value": {
"kind": "NumericLiteral",
"width": 1,
"text": "1",
"value": 1,
"valueText": "1"
}
}
}
]
},
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 3,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
},
{
"kind": "EmptyStatement",
"fullWidth": 4,
"semicolonToken": {
"kind": "SemicolonToken",
"width": 1,
"fullWidth": 4,
"text": ";",
"value": ";",
"valueText": ";",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
},
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}
@@ -0,0 +1,7 @@
enum A {
}
module M.N {
enum A {
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,11 @@
enum A {
A1,
A2
}
module M.N {
enum A {
A1,
A2
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,17 @@
enum A {
A1,
A2 = 2,
A3,
A4 = 1 << 1,
A5
}
module M.N {
enum A {
A1,
A2 = 2,
A3,
A4 = 1 << 1,
A5
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,27 @@
enum A {
// A1
A1,
/* A1 */
A2 = 2,
A3,
A4 = 1 << 1,
// A5
A5
}
module M.N {
enum A {
// A1
A1,
/* A1 */
A2 = 2,
A3,
A4 = 1 << 1,
// A5
A5
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,30 @@
enum E1 {
A
}
enum E2 {
A,
B
}
enum E3 {
A = 1
}
enum E3 {
A = 1,
B
}
enum E4 {
"A A"
}
enum E5 {
"A A" = 1
}
enum E6 {
"A A" = 1,
B
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,31 @@
module M {
enum E1 {
A
}
enum E3 {
A = 1
}
}
module M {
module N {
enum E1 {
A
}
enum E3 {
A = 1
}
}
}
module M.N.O {
enum E1 {
A
}
enum E3 {
A = 1
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,33 @@
module M1 {
var v1, v2;
export var v3, v4;
class C1 {
}
export class C2 {
}
function f1() {
}
export function f2() {
}
module M2 {
}
export module M3 {
}
}
module M1.M2.M3 {
var v1, v2;
export var v3, v4;
class C1 {
}
export class C2 {
}
function f1() {
}
export function f2() {
}
module M4 {
}
export module M5 {
}
}
@@ -0,0 +1,2 @@
function foo() {
}
@@ -0,0 +1,104 @@
{
"fullText": [
"function foo() {",
"}"
],
"sourceUnit": {
"kind": "SourceUnit",
"fullWidth": 19,
"isIncrementallyUnusable": true,
"moduleElements": [
{
"kind": "FunctionDeclaration",
"fullWidth": 19,
"modifiers": [],
"functionKeyword": {
"kind": "FunctionKeyword",
"width": 8,
"fullWidth": 9,
"text": "function",
"value": "function",
"valueText": "function",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
},
"identifier": {
"kind": "IdentifierName",
"width": 3,
"text": "foo",
"value": "foo",
"valueText": "foo"
},
"callSignature": {
"kind": "CallSignature",
"fullWidth": 3,
"parameterList": {
"kind": "ParameterList",
"fullWidth": 3,
"openParenToken": {
"kind": "OpenParenToken",
"width": 1,
"text": "(",
"value": "(",
"valueText": "("
},
"parameters": [],
"closeParenToken": {
"kind": "CloseParenToken",
"width": 1,
"fullWidth": 2,
"text": ")",
"value": ")",
"valueText": ")",
"hasTrailingTrivia": true,
"trailingTrivia": [
{
"kind": "WhitespaceTrivia",
"text": " "
}
]
}
}
},
"block": {
"kind": "Block",
"fullWidth": 4,
"openBraceToken": {
"kind": "OpenBraceToken",
"width": 1,
"fullWidth": 3,
"text": "{",
"value": "{",
"valueText": "{",
"hasTrailingTrivia": true,
"hasTrailingNewLine": true,
"trailingTrivia": [
{
"kind": "NewLineTrivia",
"text": "\r\n"
}
]
},
"statements": [],
"closeBraceToken": {
"kind": "CloseBraceToken",
"width": 1,
"text": "}",
"value": "}",
"valueText": "}"
}
}
}
],
"endOfFileToken": {
"kind": "EndOfFileToken",
"width": 0,
"text": ""
}
}
}

Some files were not shown because too many files have changed in this diff Show More