From e0f738429fc41851f4a8043f99ac37454eab50f2 Mon Sep 17 00:00:00 2001 From: Dick van den Brink Date: Thu, 7 Aug 2014 21:08:38 +0200 Subject: [PATCH] Added missing semicolons --- src/compiler/core.ts | 2 +- src/compiler/tc.ts | 4 ++-- src/compiler/types.ts | 4 ++-- src/harness/compilerRunner.ts | 4 ++-- src/harness/exec.ts | 2 +- src/harness/fourslash.ts | 4 ++-- src/harness/harness.ts | 10 +++++----- src/harness/harnessLanguageService.ts | 4 ++-- src/harness/runner.ts | 2 +- src/services/braceMatcher.ts | 4 ++-- src/services/compiler/hashTable.ts | 2 +- src/services/compiler/optionsParser.ts | 2 +- src/services/compiler/precompile.ts | 2 +- src/services/compiler/sourceMapping.ts | 4 ++-- src/services/compiler/typescript.ts | 10 +++++----- src/services/findReferenceHelpers.ts | 2 +- src/services/formatting/formattingManager.ts | 2 +- src/services/formatting/ruleDescriptor.ts | 2 +- 18 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 58cf33c6fda..8f6ac1ddfc8 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -174,7 +174,7 @@ module ts { var result: Map = {}; forEach(array, value => { - result[makeKey(value)] = value + result[makeKey(value)] = value; }); return result; diff --git a/src/compiler/tc.ts b/src/compiler/tc.ts index 706fe3c5968..054b76c55b2 100644 --- a/src/compiler/tc.ts +++ b/src/compiler/tc.ts @@ -362,8 +362,8 @@ module ts { var output = ""; // We want to align our "syntax" and "examples" commands to a certain margin. - var syntaxLength = getDiagnosticText(Diagnostics.Syntax_Colon_0, "").length - var examplesLength = getDiagnosticText(Diagnostics.Examples_Colon_0, "").length + var syntaxLength = getDiagnosticText(Diagnostics.Syntax_Colon_0, "").length; + var examplesLength = getDiagnosticText(Diagnostics.Examples_Colon_0, "").length; var marginLength = Math.max(syntaxLength, examplesLength); // Build up the syntactic skeleton. diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 2c9284052d5..5cb80687d80 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -635,8 +635,8 @@ module ts { export interface SymbolAccessiblityResult { accessibility: SymbolAccessibility; - errorSymbolName?: string // Optional symbol name that results in error - errorModuleName?: string // If the symbol is not visibile from module, module's name + errorSymbolName?: string; // Optional symbol name that results in error + errorModuleName?: string; // If the symbol is not visibile from module, module's name } export interface EmitResolver { diff --git a/src/harness/compilerRunner.ts b/src/harness/compilerRunner.ts index e08981142e0..9dce321a275 100644 --- a/src/harness/compilerRunner.ts +++ b/src/harness/compilerRunner.ts @@ -365,7 +365,7 @@ class CompilerBaselineRunner extends RunnerBase { walker.results.forEach(result => { var formattedLine = result.identifierName + " : " + result.type; if (!typeMap[file.unitName]) { - typeMap[file.unitName] = {} + typeMap[file.unitName] = {}; } var typeInfo = [formattedLine]; @@ -386,7 +386,7 @@ class CompilerBaselineRunner extends RunnerBase { walker.results.forEach(result => { var formattedLine = result.identifierName + " : " + result.type; if (!typeMap[file.unitName]) { - typeMap[file.unitName] = {} + typeMap[file.unitName] = {}; } else { typeLines.push('No type information for this code.'); } diff --git a/src/harness/exec.ts b/src/harness/exec.ts index 702a8079fed..6ed538b1d40 100644 --- a/src/harness/exec.ts +++ b/src/harness/exec.ts @@ -32,7 +32,7 @@ class WindowsScriptHostExec implements IExec { var process = shell.Exec(fileName + ' ' + cmdLineArgs.join(' ')); } catch(e) { result.stderr = e.message; - result.exitCode = 1 + result.exitCode = 1; handleResult(result); return; } diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 6cba438e31c..6692059c806 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -466,7 +466,7 @@ module FourSlash { this.assertItemInCompletionList(members.entries, symbol, type, docComment, fullSymbolName, kind); } else { - throw new Error("Expected a member list, but none was provided") + throw new Error("Expected a member list, but none was provided"); } } @@ -2040,7 +2040,7 @@ module FourSlash { globalOptions: opts, files: files, ranges: ranges - } + }; } enum State { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 7abfbd4f196..841c3b47aa4 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -107,7 +107,7 @@ module Utils { } else { return cache[key] = f.apply(this, arguments); } - }) + }); } } @@ -555,7 +555,7 @@ module Harness { getCanonicalFileName: ts.getCanonicalFileName, useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, getNewLine: ()=> sys.newLine - } + }; } export class HarnessCompiler { @@ -1018,7 +1018,7 @@ module Harness { } } - var fileCache: { [idx: string]: boolean } = {} + var fileCache: { [idx: string]: boolean } = {}; function generateActual(actualFilename: string, generateContent: () => string): string { // For now this is written using TypeScript, because sys is not available when running old test cases. // But we need to move to sys once we have @@ -1083,8 +1083,8 @@ module Harness { var lineEndingSensitive = opts && opts.LineEndingSensitive; if (!lineEndingSensitive) { - expected = expected.replace(/\r\n?/g, '\n') - actual = actual.replace(/\r\n?/g, '\n') + expected = expected.replace(/\r\n?/g, '\n'); + actual = actual.replace(/\r\n?/g, '\n'); } return { expected: expected, actual: actual }; diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 4ca56bb299a..65f02582d63 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -91,7 +91,7 @@ module Harness.LanguageService { } class CancellationToken { - public static None: CancellationToken = new CancellationToken(null) + public static None: CancellationToken = new CancellationToken(null); constructor(private cancellationToken: ts.CancellationToken) { } @@ -283,7 +283,7 @@ module Harness.LanguageService { /** Parse a file on disk given its fileName */ public parseFile(fileName: string) { - var sourceText = TypeScript.ScriptSnapshot.fromString(Harness.IO.readFile(fileName)) + var sourceText = TypeScript.ScriptSnapshot.fromString(Harness.IO.readFile(fileName)); return this.parseSourceText(fileName, sourceText); } diff --git a/src/harness/runner.ts b/src/harness/runner.ts index 9f1ae0e90a9..4e3cdc8815c 100644 --- a/src/harness/runner.ts +++ b/src/harness/runner.ts @@ -41,7 +41,7 @@ var mytestconfig = 'mytest.config'; var testconfig = 'test.config'; var testConfigFile = Harness.IO.fileExists(mytestconfig) ? Harness.IO.readFile(mytestconfig) : - (Harness.IO.fileExists(testconfig) ? Harness.IO.readFile(testconfig) : '') + (Harness.IO.fileExists(testconfig) ? Harness.IO.readFile(testconfig) : ''); if (testConfigFile !== '') { // TODO: not sure why this is crashing mocha diff --git a/src/services/braceMatcher.ts b/src/services/braceMatcher.ts index 0cb336d4dc2..96550dab2e7 100644 --- a/src/services/braceMatcher.ts +++ b/src/services/braceMatcher.ts @@ -36,7 +36,7 @@ module TypeScript.Services { if (start(currentToken) === position) { var closingBraceKind = BraceMatcher.getMatchingCloseBraceTokenKind(currentToken); if (closingBraceKind !== null) { - var parentElement = currentToken.parent + var parentElement = currentToken.parent; var currentPosition = fullStart(currentToken.parent); for (var i = 0, n = childCount(parentElement); i < n; i++) { var element = childAt(parentElement, i); @@ -87,7 +87,7 @@ module TypeScript.Services { var element = positionedElement !== null && positionedElement; switch (element.kind()) { case TypeScript.SyntaxKind.OpenBraceToken: - return TypeScript.SyntaxKind.CloseBraceToken + return TypeScript.SyntaxKind.CloseBraceToken; case TypeScript.SyntaxKind.OpenParenToken: return TypeScript.SyntaxKind.CloseParenToken; case TypeScript.SyntaxKind.OpenBracketToken: diff --git a/src/services/compiler/hashTable.ts b/src/services/compiler/hashTable.ts index 89c7551a571..10e3941afa3 100644 --- a/src/services/compiler/hashTable.ts +++ b/src/services/compiler/hashTable.ts @@ -16,7 +16,7 @@ /// module TypeScript { - var proto = "__proto__" + var proto = "__proto__"; class BlockIntrinsics { public prototype: T = undefined; diff --git a/src/services/compiler/optionsParser.ts b/src/services/compiler/optionsParser.ts index 10d9ddac84e..6c2a15813d5 100644 --- a/src/services/compiler/optionsParser.ts +++ b/src/services/compiler/optionsParser.ts @@ -155,7 +155,7 @@ module TypeScript { config.name = name; config.short = short; - config.flag = true + config.flag = true; this.options.push(config); } diff --git a/src/services/compiler/precompile.ts b/src/services/compiler/precompile.ts index a45ea5134a1..b806645c7af 100644 --- a/src/services/compiler/precompile.ts +++ b/src/services/compiler/precompile.ts @@ -150,7 +150,7 @@ module TypeScript { var noDefaultLib = false; var diagnostics: Diagnostic[] = []; var referencedFiles: IFileReference[] = []; - var lineMap = text.lineMap() + var lineMap = text.lineMap(); for (var i = 0, n = leadingTrivia.count(); i < n; i++) { var trivia = leadingTrivia.syntaxTriviaAt(i); diff --git a/src/services/compiler/sourceMapping.ts b/src/services/compiler/sourceMapping.ts index 11fae5b4353..0b50d1247b1 100644 --- a/src/services/compiler/sourceMapping.ts +++ b/src/services/compiler/sourceMapping.ts @@ -94,9 +94,9 @@ module TypeScript { var expectedAst = this.mappingLevel.pop(); if (ast !== expectedAst) { var expectedAstInfo: any = (expectedAst).kind ? SyntaxKind[(expectedAst).kind] : [expectedAst.start(), expectedAst.end()]; - var astInfo: any = (ast).kind ? SyntaxKind[(ast).kind] : [ast.start(), ast.end()] + var astInfo: any = (ast).kind ? SyntaxKind[(ast).kind] : [ast.start(), ast.end()]; Debug.fail( - "Provided ast is not the expected ISyntaxElement, Expected: " + expectedAstInfo + " Given: " + astInfo) + "Provided ast is not the expected ISyntaxElement, Expected: " + expectedAstInfo + " Given: " + astInfo); } } diff --git a/src/services/compiler/typescript.ts b/src/services/compiler/typescript.ts index 03b59816b1d..f98d0baf52b 100644 --- a/src/services/compiler/typescript.ts +++ b/src/services/compiler/typescript.ts @@ -131,7 +131,7 @@ module TypeScript { export class CancellationToken { - public static None: CancellationToken = new CancellationToken(null) + public static None: CancellationToken = new CancellationToken(null); constructor(private cancellationToken: ICancellationToken) { } @@ -237,7 +237,7 @@ module TypeScript { }; }); documents.sort((x, y) => y.refCount - x.refCount); - return { bucket: name, documents: documents } + return { bucket: name, documents: documents }; }); return JSON.stringify(bucketInfoArray, null, 2); } @@ -705,7 +705,7 @@ module TypeScript { // public getSyntacticDiagnostics(fileName: string): Diagnostic[] { - fileName = TypeScript.switchToForwardSlashes(fileName) + fileName = TypeScript.switchToForwardSlashes(fileName); return this.getDocument(fileName).diagnostics(); } @@ -724,7 +724,7 @@ module TypeScript { var document = this.getDocument(fileName); var startTime = (new Date()).getTime(); - PullTypeResolver.typeCheck(this.compilationSettings(), this.semanticInfoChain, document) + PullTypeResolver.typeCheck(this.compilationSettings(), this.semanticInfoChain, document); var endTime = (new Date()).getTime(); typeCheckTime += endTime - startTime; @@ -1464,7 +1464,7 @@ module TypeScript { // shared emitter (and we'll take care of it after all the files are done. this._sharedEmitter = this.compiler._emitDocument( document, this._emitOptions, - outputFiles => { this._current = CompileResult.fromOutputFiles(outputFiles) }, + outputFiles => { this._current = CompileResult.fromOutputFiles(outputFiles); }, this._sharedEmitter); return true; } diff --git a/src/services/findReferenceHelpers.ts b/src/services/findReferenceHelpers.ts index 2e47a90ba12..68131a41115 100644 --- a/src/services/findReferenceHelpers.ts +++ b/src/services/findReferenceHelpers.ts @@ -50,7 +50,7 @@ module TypeScript.Services { var secondSymbolDecl = secondSymbol.getDeclarations()[0]; var firstParentDecl = firstSymbolDecl.getParentDecl(); - var secondParentDecl = secondSymbolDecl.getParentDecl() + var secondParentDecl = secondSymbolDecl.getParentDecl(); if (firstParentDecl.kind === TypeScript.PullElementKind.ObjectLiteral && secondParentDecl.kind === TypeScript.PullElementKind.ObjectLiteral) { diff --git a/src/services/formatting/formattingManager.ts b/src/services/formatting/formattingManager.ts index 4756b6eb240..57c854196a8 100644 --- a/src/services/formatting/formattingManager.ts +++ b/src/services/formatting/formattingManager.ts @@ -22,7 +22,7 @@ module TypeScript.Services.Formatting { constructor(private syntaxTree: SyntaxTree, private snapshot: ITextSnapshot, private rulesProvider: RulesProvider, editorOptions: ts.EditorOptions) { // // TODO: convert to use FormattingOptions instead of EditorOptions - this.options = new FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter) + this.options = new FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter); } public formatSelection(minChar: number, limChar: number): ts.TextEdit[] { diff --git a/src/services/formatting/ruleDescriptor.ts b/src/services/formatting/ruleDescriptor.ts index 52ee970130e..1e7d822d57b 100644 --- a/src/services/formatting/ruleDescriptor.ts +++ b/src/services/formatting/ruleDescriptor.ts @@ -26,7 +26,7 @@ module TypeScript.Services.Formatting { } static create1(left: SyntaxKind, right: SyntaxKind): RuleDescriptor { - return RuleDescriptor.create4(Shared.TokenRange.FromToken(left), Shared.TokenRange.FromToken(right)) + return RuleDescriptor.create4(Shared.TokenRange.FromToken(left), Shared.TokenRange.FromToken(right)); } static create2(left: Shared.TokenRange, right: SyntaxKind): RuleDescriptor {