Skip to content

Commit 39046fa

Browse files
committed
Merge pull request #395 from DickvdBrink/code-style
Added missing semicolons
2 parents b9124a7 + e0f7384 commit 39046fa

18 files changed

+33
-33
lines changed

src/compiler/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ module ts {
174174
var result: Map<T> = {};
175175

176176
forEach(array, value => {
177-
result[makeKey(value)] = value
177+
result[makeKey(value)] = value;
178178
});
179179

180180
return result;

src/compiler/tc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ module ts {
362362
var output = "";
363363

364364
// We want to align our "syntax" and "examples" commands to a certain margin.
365-
var syntaxLength = getDiagnosticText(Diagnostics.Syntax_Colon_0, "").length
366-
var examplesLength = getDiagnosticText(Diagnostics.Examples_Colon_0, "").length
365+
var syntaxLength = getDiagnosticText(Diagnostics.Syntax_Colon_0, "").length;
366+
var examplesLength = getDiagnosticText(Diagnostics.Examples_Colon_0, "").length;
367367
var marginLength = Math.max(syntaxLength, examplesLength);
368368

369369
// Build up the syntactic skeleton.

src/compiler/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,8 @@ module ts {
635635

636636
export interface SymbolAccessiblityResult {
637637
accessibility: SymbolAccessibility;
638-
errorSymbolName?: string // Optional symbol name that results in error
639-
errorModuleName?: string // If the symbol is not visibile from module, module's name
638+
errorSymbolName?: string; // Optional symbol name that results in error
639+
errorModuleName?: string; // If the symbol is not visibile from module, module's name
640640
}
641641

642642
export interface EmitResolver {

src/harness/compilerRunner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ class CompilerBaselineRunner extends RunnerBase {
365365
walker.results.forEach(result => {
366366
var formattedLine = result.identifierName + " : " + result.type;
367367
if (!typeMap[file.unitName]) {
368-
typeMap[file.unitName] = {}
368+
typeMap[file.unitName] = {};
369369
}
370370

371371
var typeInfo = [formattedLine];
@@ -386,7 +386,7 @@ class CompilerBaselineRunner extends RunnerBase {
386386
walker.results.forEach(result => {
387387
var formattedLine = result.identifierName + " : " + result.type;
388388
if (!typeMap[file.unitName]) {
389-
typeMap[file.unitName] = {}
389+
typeMap[file.unitName] = {};
390390
} else {
391391
typeLines.push('No type information for this code.');
392392
}

src/harness/exec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class WindowsScriptHostExec implements IExec {
3232
var process = shell.Exec(fileName + ' ' + cmdLineArgs.join(' '));
3333
} catch(e) {
3434
result.stderr = e.message;
35-
result.exitCode = 1
35+
result.exitCode = 1;
3636
handleResult(result);
3737
return;
3838
}

src/harness/fourslash.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ module FourSlash {
466466
this.assertItemInCompletionList(members.entries, symbol, type, docComment, fullSymbolName, kind);
467467
}
468468
else {
469-
throw new Error("Expected a member list, but none was provided")
469+
throw new Error("Expected a member list, but none was provided");
470470
}
471471
}
472472

@@ -2040,7 +2040,7 @@ module FourSlash {
20402040
globalOptions: opts,
20412041
files: files,
20422042
ranges: ranges
2043-
}
2043+
};
20442044
}
20452045

20462046
enum State {

src/harness/harness.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ module Utils {
107107
} else {
108108
return cache[key] = f.apply(this, arguments);
109109
}
110-
})
110+
});
111111
}
112112
}
113113

@@ -555,7 +555,7 @@ module Harness {
555555
getCanonicalFileName: ts.getCanonicalFileName,
556556
useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames,
557557
getNewLine: ()=> sys.newLine
558-
}
558+
};
559559
}
560560

561561
export class HarnessCompiler {
@@ -1018,7 +1018,7 @@ module Harness {
10181018
}
10191019
}
10201020

1021-
var fileCache: { [idx: string]: boolean } = {}
1021+
var fileCache: { [idx: string]: boolean } = {};
10221022
function generateActual(actualFilename: string, generateContent: () => string): string {
10231023
// For now this is written using TypeScript, because sys is not available when running old test cases.
10241024
// But we need to move to sys once we have
@@ -1083,8 +1083,8 @@ module Harness {
10831083
var lineEndingSensitive = opts && opts.LineEndingSensitive;
10841084

10851085
if (!lineEndingSensitive) {
1086-
expected = expected.replace(/\r\n?/g, '\n')
1087-
actual = actual.replace(/\r\n?/g, '\n')
1086+
expected = expected.replace(/\r\n?/g, '\n');
1087+
actual = actual.replace(/\r\n?/g, '\n');
10881088
}
10891089

10901090
return { expected: expected, actual: actual };

src/harness/harnessLanguageService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ module Harness.LanguageService {
9191
}
9292

9393
class CancellationToken {
94-
public static None: CancellationToken = new CancellationToken(null)
94+
public static None: CancellationToken = new CancellationToken(null);
9595

9696
constructor(private cancellationToken: ts.CancellationToken) {
9797
}
@@ -283,7 +283,7 @@ module Harness.LanguageService {
283283

284284
/** Parse a file on disk given its fileName */
285285
public parseFile(fileName: string) {
286-
var sourceText = TypeScript.ScriptSnapshot.fromString(Harness.IO.readFile(fileName))
286+
var sourceText = TypeScript.ScriptSnapshot.fromString(Harness.IO.readFile(fileName));
287287
return this.parseSourceText(fileName, sourceText);
288288
}
289289

src/harness/runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var mytestconfig = 'mytest.config';
4141
var testconfig = 'test.config';
4242
var testConfigFile =
4343
Harness.IO.fileExists(mytestconfig) ? Harness.IO.readFile(mytestconfig) :
44-
(Harness.IO.fileExists(testconfig) ? Harness.IO.readFile(testconfig) : '')
44+
(Harness.IO.fileExists(testconfig) ? Harness.IO.readFile(testconfig) : '');
4545

4646
if (testConfigFile !== '') {
4747
// TODO: not sure why this is crashing mocha

src/services/braceMatcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module TypeScript.Services {
3636
if (start(currentToken) === position) {
3737
var closingBraceKind = BraceMatcher.getMatchingCloseBraceTokenKind(currentToken);
3838
if (closingBraceKind !== null) {
39-
var parentElement = currentToken.parent
39+
var parentElement = currentToken.parent;
4040
var currentPosition = fullStart(currentToken.parent);
4141
for (var i = 0, n = childCount(parentElement); i < n; i++) {
4242
var element = childAt(parentElement, i);
@@ -87,7 +87,7 @@ module TypeScript.Services {
8787
var element = positionedElement !== null && positionedElement;
8888
switch (element.kind()) {
8989
case TypeScript.SyntaxKind.OpenBraceToken:
90-
return TypeScript.SyntaxKind.CloseBraceToken
90+
return TypeScript.SyntaxKind.CloseBraceToken;
9191
case TypeScript.SyntaxKind.OpenParenToken:
9292
return TypeScript.SyntaxKind.CloseParenToken;
9393
case TypeScript.SyntaxKind.OpenBracketToken:

src/services/compiler/hashTable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
///<reference path='references.ts' />
1717

1818
module TypeScript {
19-
var proto = "__proto__"
19+
var proto = "__proto__";
2020

2121
class BlockIntrinsics<T> {
2222
public prototype: T = undefined;

src/services/compiler/optionsParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ module TypeScript {
155155

156156
config.name = name;
157157
config.short = short;
158-
config.flag = true
158+
config.flag = true;
159159

160160
this.options.push(config);
161161
}

src/services/compiler/precompile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ module TypeScript {
150150
var noDefaultLib = false;
151151
var diagnostics: Diagnostic[] = [];
152152
var referencedFiles: IFileReference[] = [];
153-
var lineMap = text.lineMap()
153+
var lineMap = text.lineMap();
154154

155155
for (var i = 0, n = leadingTrivia.count(); i < n; i++) {
156156
var trivia = leadingTrivia.syntaxTriviaAt(i);

src/services/compiler/sourceMapping.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ module TypeScript {
9494
var expectedAst = this.mappingLevel.pop();
9595
if (ast !== expectedAst) {
9696
var expectedAstInfo: any = (<any>expectedAst).kind ? SyntaxKind[(<any>expectedAst).kind] : [expectedAst.start(), expectedAst.end()];
97-
var astInfo: any = (<any>ast).kind ? SyntaxKind[(<any>ast).kind] : [ast.start(), ast.end()]
97+
var astInfo: any = (<any>ast).kind ? SyntaxKind[(<any>ast).kind] : [ast.start(), ast.end()];
9898
Debug.fail(
99-
"Provided ast is not the expected ISyntaxElement, Expected: " + expectedAstInfo + " Given: " + astInfo)
99+
"Provided ast is not the expected ISyntaxElement, Expected: " + expectedAstInfo + " Given: " + astInfo);
100100

101101
}
102102
}

src/services/compiler/typescript.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module TypeScript {
131131

132132
export class CancellationToken {
133133

134-
public static None: CancellationToken = new CancellationToken(null)
134+
public static None: CancellationToken = new CancellationToken(null);
135135

136136
constructor(private cancellationToken: ICancellationToken) {
137137
}
@@ -237,7 +237,7 @@ module TypeScript {
237237
};
238238
});
239239
documents.sort((x, y) => y.refCount - x.refCount);
240-
return { bucket: name, documents: documents }
240+
return { bucket: name, documents: documents };
241241
});
242242
return JSON.stringify(bucketInfoArray, null, 2);
243243
}
@@ -705,7 +705,7 @@ module TypeScript {
705705
//
706706

707707
public getSyntacticDiagnostics(fileName: string): Diagnostic[] {
708-
fileName = TypeScript.switchToForwardSlashes(fileName)
708+
fileName = TypeScript.switchToForwardSlashes(fileName);
709709
return this.getDocument(fileName).diagnostics();
710710
}
711711

@@ -724,7 +724,7 @@ module TypeScript {
724724
var document = this.getDocument(fileName);
725725

726726
var startTime = (new Date()).getTime();
727-
PullTypeResolver.typeCheck(this.compilationSettings(), this.semanticInfoChain, document)
727+
PullTypeResolver.typeCheck(this.compilationSettings(), this.semanticInfoChain, document);
728728
var endTime = (new Date()).getTime();
729729

730730
typeCheckTime += endTime - startTime;
@@ -1464,7 +1464,7 @@ module TypeScript {
14641464
// shared emitter (and we'll take care of it after all the files are done.
14651465
this._sharedEmitter = this.compiler._emitDocument(
14661466
document, this._emitOptions,
1467-
outputFiles => { this._current = CompileResult.fromOutputFiles(outputFiles) },
1467+
outputFiles => { this._current = CompileResult.fromOutputFiles(outputFiles); },
14681468
this._sharedEmitter);
14691469
return true;
14701470
}

src/services/findReferenceHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module TypeScript.Services {
5050
var secondSymbolDecl = secondSymbol.getDeclarations()[0];
5151

5252
var firstParentDecl = firstSymbolDecl.getParentDecl();
53-
var secondParentDecl = secondSymbolDecl.getParentDecl()
53+
var secondParentDecl = secondSymbolDecl.getParentDecl();
5454

5555
if (firstParentDecl.kind === TypeScript.PullElementKind.ObjectLiteral &&
5656
secondParentDecl.kind === TypeScript.PullElementKind.ObjectLiteral) {

src/services/formatting/formattingManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module TypeScript.Services.Formatting {
2222
constructor(private syntaxTree: SyntaxTree, private snapshot: ITextSnapshot, private rulesProvider: RulesProvider, editorOptions: ts.EditorOptions) {
2323
//
2424
// TODO: convert to use FormattingOptions instead of EditorOptions
25-
this.options = new FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter)
25+
this.options = new FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter);
2626
}
2727

2828
public formatSelection(minChar: number, limChar: number): ts.TextEdit[] {

src/services/formatting/ruleDescriptor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module TypeScript.Services.Formatting {
2626
}
2727

2828
static create1(left: SyntaxKind, right: SyntaxKind): RuleDescriptor {
29-
return RuleDescriptor.create4(Shared.TokenRange.FromToken(left), Shared.TokenRange.FromToken(right))
29+
return RuleDescriptor.create4(Shared.TokenRange.FromToken(left), Shared.TokenRange.FromToken(right));
3030
}
3131

3232
static create2(left: Shared.TokenRange, right: SyntaxKind): RuleDescriptor {

0 commit comments

Comments
 (0)