Skip to content

Added missing semicolons #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/compiler/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ module ts {
var result: Map<T> = {};

forEach(array, value => {
result[makeKey(value)] = value
result[makeKey(value)] = value;
});

return result;
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/tc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/harness/compilerRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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.');
}
Expand Down
2 changes: 1 addition & 1 deletion src/harness/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/harness/fourslash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

Expand Down Expand Up @@ -2040,7 +2040,7 @@ module FourSlash {
globalOptions: opts,
files: files,
ranges: ranges
}
};
}

enum State {
Expand Down
10 changes: 5 additions & 5 deletions src/harness/harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module Utils {
} else {
return cache[key] = f.apply(this, arguments);
}
})
});
}
}

Expand Down Expand Up @@ -555,7 +555,7 @@ module Harness {
getCanonicalFileName: ts.getCanonicalFileName,
useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames,
getNewLine: ()=> sys.newLine
}
};
}

export class HarnessCompiler {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 };
Expand Down
4 changes: 2 additions & 2 deletions src/harness/harnessLanguageService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
}
Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/harness/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/services/braceMatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/services/compiler/hashTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
///<reference path='references.ts' />

module TypeScript {
var proto = "__proto__"
var proto = "__proto__";

class BlockIntrinsics<T> {
public prototype: T = undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/services/compiler/optionsParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ module TypeScript {

config.name = name;
config.short = short;
config.flag = true
config.flag = true;

this.options.push(config);
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/compiler/precompile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/services/compiler/sourceMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ module TypeScript {
var expectedAst = this.mappingLevel.pop();
if (ast !== expectedAst) {
var expectedAstInfo: any = (<any>expectedAst).kind ? SyntaxKind[(<any>expectedAst).kind] : [expectedAst.start(), expectedAst.end()];
var astInfo: any = (<any>ast).kind ? SyntaxKind[(<any>ast).kind] : [ast.start(), ast.end()]
var astInfo: any = (<any>ast).kind ? SyntaxKind[(<any>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);

}
}
Expand Down
10 changes: 5 additions & 5 deletions src/services/compiler/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -705,7 +705,7 @@ module TypeScript {
//

public getSyntacticDiagnostics(fileName: string): Diagnostic[] {
fileName = TypeScript.switchToForwardSlashes(fileName)
fileName = TypeScript.switchToForwardSlashes(fileName);
return this.getDocument(fileName).diagnostics();
}

Expand All @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/findReferenceHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/services/formatting/formattingManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] {
Expand Down
2 changes: 1 addition & 1 deletion src/services/formatting/ruleDescriptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down