Merge pull request #356 from DickvdBrink/missing-semicolon

Code style: Missing semicolons
This commit is contained in:
Mohamed Hegazy 2014-08-04 13:38:26 -07:00
commit 28f73121d6
3 changed files with 17 additions and 17 deletions

View file

@ -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 (<Type>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 && (<CallExpression>n).func.kind === SyntaxKind.SuperKeyword
return n.kind === SyntaxKind.CallExpression && (<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)) {

View file

@ -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 {

View file

@ -130,7 +130,7 @@ module ts {
function isEvalOrArgumentsIdentifier(node: Node): boolean {
return node.kind === SyntaxKind.Identifier &&
(<Identifier>node).text &&
((<Identifier>node).text === "eval" || (<Identifier>node).text === "arguments")
((<Identifier>node).text === "eval" || (<Identifier>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 && (<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*<amd-dependency\s+path\s*=\s*('|")(.+?)\1/gim;
var amdDependencyMatchResult = amdDependencyRegEx.exec(comment)
var amdDependencyMatchResult = amdDependencyRegEx.exec(comment);
if (amdDependencyMatchResult) {
amdDependencies.push(amdDependencyMatchResult[2]);
}
@ -3635,7 +3635,7 @@ module ts {
function processImportedModules(file: SourceFile, basePath: string) {
forEach(file.statements, node => {
if (node.kind === SyntaxKind.ImportDeclaration && (<ImportDeclaration>node).externalModuleName) {
var nameLiteral = (<ImportDeclaration>node).externalModuleName
var nameLiteral = (<ImportDeclaration>node).externalModuleName;
var moduleName = nameLiteral.text;
if (moduleName) {
var searchPath = basePath;
@ -3674,7 +3674,7 @@ module ts {
}
}
}
})
});
}
});