From c9c874815229f37310b7f6340e109dfea57950d2 Mon Sep 17 00:00:00 2001 From: Dick van den Brink Date: Mon, 4 Aug 2014 22:32:32 +0200 Subject: [PATCH] Code style: Missing semicolons --- src/compiler/checker.ts | 14 +++++++------- src/compiler/core.ts | 2 +- src/compiler/parser.ts | 18 +++++++++--------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 731f5abf9e..16e6057ccb 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -721,7 +721,7 @@ module ts { return false; }); - return qualify + return qualify; } // Enclosing declaration is optional when we dont want to get qualified name in the enclosing declaration scope @@ -3972,7 +3972,7 @@ module ts { return resolveErrorCall(node); } - var apparentType = getApparentType(funcType) + var apparentType = getApparentType(funcType); if (apparentType === unknownType) { // handler cases when funcType is type parameter with invalid constraint // Another error was already reported @@ -4229,7 +4229,7 @@ module ts { } function bodyContainsSingleThrowStatement(body: Block) { - return (body.statements.length === 1) && (body.statements[0].kind === SyntaxKind.ThrowStatement) + return (body.statements.length === 1) && (body.statements[0].kind === SyntaxKind.ThrowStatement); } // TypeScript Specification 1.0 (6.3) - July 2014 @@ -4808,7 +4808,7 @@ module ts { } function isSuperCallExpression(n: Node): boolean { - return n.kind === SyntaxKind.CallExpression && (n).func.kind === SyntaxKind.SuperKeyword + return n.kind === SyntaxKind.CallExpression && (n).func.kind === SyntaxKind.SuperKeyword; } function containsSuperCall(n: Node): boolean { @@ -5209,7 +5209,7 @@ module ts { case SyntaxKind.ImportDeclaration: var result: SymbolFlags = 0; var target = resolveImport(getSymbolOfNode(d)); - forEach(target.declarations, d => { result |= getDeclarationSpaces(d); } ) + forEach(target.declarations, d => { result |= getDeclarationSpaces(d); } ); return result; default: return SymbolFlags.ExportValue; @@ -5220,7 +5220,7 @@ module ts { function checkFunctionDeclaration(node: FunctionDeclaration) { checkSignatureDeclaration(node); - var symbol = getSymbolOfNode(node) + var symbol = getSymbolOfNode(node); // first we want to check the local symbol that contain this declaration // - if node.localSymbol !== undefined - this is current declaration is exported and localSymbol points to the local symbol // - if node.localSymbol === undefined - this node is non-exported so we can just pick the result of getSymbolOfNode @@ -5367,7 +5367,7 @@ module ts { node.kind === SyntaxKind.GetAccessor || node.kind === SyntaxKind.SetAccessor) { // it is ok to have member named '_super' or '_this' - member access is always qualified - return false + return false; } if (isInAmbientContext(node)) { diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 6b4db235da..581a1672f2 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -227,7 +227,7 @@ module ts { code: message.code, next: details - } + }; } export function flattenDiagnosticChain(file: SourceFile, start: number, length: number, diagnosticChain: DiagnosticMessageChain, newLine: string): Diagnostic { diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 6902ebc483..d09f070117 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -130,7 +130,7 @@ module ts { function isEvalOrArgumentsIdentifier(node: Node): boolean { return node.kind === SyntaxKind.Identifier && (node).text && - ((node).text === "eval" || (node).text === "arguments") + ((node).text === "eval" || (node).text === "arguments"); } /// Should be called only on prologue directives (isPrologueDirective(node) should be true) @@ -1263,7 +1263,7 @@ module ts { function checkIndexSignature(node: SignatureDeclaration, indexerStart: number, indexerLength: number): void { var parameter = node.parameters[0]; if (node.parameters.length !== 1) { - var arityDiagnostic = Diagnostics.An_index_signature_must_have_exactly_one_parameter + var arityDiagnostic = Diagnostics.An_index_signature_must_have_exactly_one_parameter; if (parameter) { grammarErrorOnNode(parameter.name, arityDiagnostic); } @@ -1773,7 +1773,7 @@ module ts { var body: Node; if (token === SyntaxKind.OpenBraceToken) { - body = parseBody(/* ignoreMissingOpenBrace */ false) + body = parseBody(/* ignoreMissingOpenBrace */ false); } else if (isStatement(/* inErrorRecovery */ true) && !isExpressionStatement() && token !== SyntaxKind.FunctionKeyword) { // Check if we got a plain statement (i.e. no expression-statements, no functions expressions/declarations) @@ -2481,7 +2481,7 @@ module ts { if (isInStrictMode) { // Strict mode code may not include a WithStatement. The occurrence of a WithStatement in such // a context is an - grammarErrorAtPos(startPos, endPos - startPos, Diagnostics.with_statements_are_not_allowed_in_strict_mode) + grammarErrorAtPos(startPos, endPos - startPos, Diagnostics.with_statements_are_not_allowed_in_strict_mode); } return node; } @@ -2984,7 +2984,7 @@ module ts { var lastStaticModifierStart: number; var lastStaticModifierLength: number; var lastDeclareModifierStart: number; - var lastDeclareModifierLength: number + var lastDeclareModifierLength: number; var lastPrivateModifierStart: number; var lastPrivateModifierLength: number; @@ -3280,7 +3280,7 @@ module ts { grammarErrorOnNode(s, Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module); } else if (s.kind === SyntaxKind.ImportDeclaration && (s).externalModuleName) { - grammarErrorOnNode(s, Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module) + grammarErrorOnNode(s, Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module); } }); } @@ -3482,7 +3482,7 @@ module ts { } else { var amdDependencyRegEx = /^\/\/\/\s* { if (node.kind === SyntaxKind.ImportDeclaration && (node).externalModuleName) { - var nameLiteral = (node).externalModuleName + var nameLiteral = (node).externalModuleName; var moduleName = nameLiteral.text; if (moduleName) { var searchPath = basePath; @@ -3674,7 +3674,7 @@ module ts { } } } - }) + }); } });