Merge pull request #1103 from DickvdBrink/unused-vars

Removed some unused variables
This commit is contained in:
Mohamed Hegazy
2014-11-09 21:45:52 -08:00
5 changed files with 2 additions and 33 deletions

View File

@@ -6683,7 +6683,6 @@ module ts {
return;
}
var symbol = getSymbolOfNode(signatureDeclarationNode);
// TypeScript 1.0 spec (April 2014): 3.7.2.4
// Every specialized call or construct signature in an object type must be assignable
// to at least one non-specialized call or construct signature in the same object type
@@ -8811,7 +8810,6 @@ module ts {
// parent is not source file or it is not reference to internal module
return false;
}
var symbol = getSymbolOfNode(node);
return isImportResolvedToValue(getSymbolOfNode(node));
}

View File

@@ -285,12 +285,10 @@ class CompilerBaselineRunner extends RunnerBase {
typeLines.push('=== ' + file.unitName + ' ===\r\n');
for (var i = 0; i < codeLines.length; i++) {
var currentCodeLine = codeLines[i];
var lastLine = typeLines[typeLines.length];
typeLines.push(currentCodeLine + '\r\n');
if (typeMap[file.unitName]) {
var typeInfo = typeMap[file.unitName][i];
if (typeInfo) {
var leadingSpaces = '';
typeInfo.forEach(ty => {
typeLines.push('>' + ty + '\r\n');
});

View File

@@ -2074,10 +2074,6 @@ module FourSlash {
}
}
private getEOF(): number {
return this.languageServiceShimHost.getScriptSnapshot(this.activeFile.fileName).getLength();
}
// Get the text of the entire line the caret is currently at
private getCurrentLineContent() {
// The current caret position (in line/col terms)
@@ -2193,14 +2189,6 @@ module FourSlash {
return result;
}
private getCurrentLineNumberZeroBased() {
return this.getCurrentLineNumberOneBased() - 1;
}
private getCurrentLineNumberOneBased() {
return this.languageServiceShimHost.positionToZeroBasedLineCol(this.activeFile.fileName, this.currentCaretPosition).line + 1;
}
private getLineColStringAtPosition(position: number) {
var pos = this.languageServiceShimHost.positionToZeroBasedLineCol(this.activeFile.fileName, position);
return 'line ' + (pos.line + 1) + ', col ' + pos.character;

View File

@@ -1092,7 +1092,6 @@ module Harness {
/** @param fileResults an array of strings for the fileName and an ITextWriter with its code */
constructor(fileResults: GeneratedFile[], errors: HarnessDiagnostic[], public program: ts.Program,
public currentDirectoryForProgram: string, private sourceMapData: ts.SourceMapData[]) {
var lines: string[] = [];
fileResults.forEach(emittedFile => {
if (isDTS(emittedFile.fileName)) {
@@ -1246,7 +1245,6 @@ module Harness {
/** Support class for baseline files */
export module Baseline {
var firstRun = true;
export interface BaselineOptions {
LineEndingSensitive?: boolean;
@@ -1287,8 +1285,7 @@ module Harness {
IO.createDirectory(dirName);
fileCache[dirName] = true;
}
var parentDir = IO.directoryName(actualFilename); // .../tests/baselines/local
var parentParentDir = IO.directoryName(IO.directoryName(actualFilename)) // .../tests/baselines
// Create folders if needed
createDirectoryStructure(Harness.IO.directoryName(actualFilename));

View File

@@ -144,7 +144,7 @@ module ts {
while (pos < end) {
var token = scanner.scan();
var textPos = scanner.getTextPos();
var node = nodes.push(createNode(token, pos, textPos, NodeFlags.Synthetic, this));
nodes.push(createNode(token, pos, textPos, NodeFlags.Synthetic, this));
pos = textPos;
}
return pos;
@@ -662,8 +662,6 @@ module ts {
}
}
var incrementalParse: IncrementalParse = TypeScript.IncrementalParser.parse;
class SourceFileObject extends NodeObject implements SourceFile {
public filename: string;
public text: string;
@@ -763,10 +761,6 @@ module ts {
return this.namedDeclarations;
}
private isDeclareFile(): boolean {
return TypeScript.isDTSFile(this.filename);
}
public update(scriptSnapshot: TypeScript.IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TypeScript.TextChangeRange): SourceFile {
if (textChangeRange && Debug.shouldAssert(AssertionLevel.Normal)) {
var oldText = this.scriptSnapshot;
@@ -3735,9 +3729,6 @@ module ts {
pushKeywordIf(keywords, switchStatement.getFirstToken(), SyntaxKind.SwitchKeyword);
// Types of break statements we can grab on to.
var breakSearchType = BreakContinueSearchType.All;
// Go through each clause in the switch statement, collecting the 'case'/'default' keywords.
forEach(switchStatement.clauses, clause => {
pushKeywordIf(keywords, clause.getFirstToken(), SyntaxKind.CaseKeyword, SyntaxKind.DefaultKeyword);
@@ -4611,7 +4602,6 @@ module ts {
var targetSourceFile = program.getSourceFile(filename); // Current selected file to be output
// If --out flag is not specified, shouldEmitToOwnFile is true. Otherwise shouldEmitToOwnFile is false.
var shouldEmitToOwnFile = ts.shouldEmitToOwnFile(targetSourceFile, compilerOptions);
var emitDeclaration = compilerOptions.declaration;
var emitOutput: EmitOutput = {
outputFiles: [],
emitOutputStatus: undefined,
@@ -4628,7 +4618,6 @@ module ts {
// Initialize writer for CompilerHost.writeFile
writer = getEmitOutputWriter;
var syntacticDiagnostics: Diagnostic[] = [];
var containSyntacticErrors = false;
if (shouldEmitToOwnFile) {
@@ -5567,7 +5556,6 @@ module ts {
function getClassificationsForLine(text: string, lexState: EndOfLineState): ClassificationResult {
var offset = 0;
var lastTokenOrCommentEnd = 0;
var token = SyntaxKind.Unknown;
var lastNonTriviaToken = SyntaxKind.Unknown;