Remove the concept of early errors from the compiler.

Currently only parse errors prevent emitting (And this will be changed in the next
code review as well).
This commit is contained in:
Cyrus Najmabadi
2015-02-02 15:14:19 -08:00
parent eed1576e53
commit dd8d3535ff
7 changed files with 297 additions and 402 deletions
-5
View File
@@ -113,13 +113,8 @@ module ts {
return emitHost || (emitHost = createEmitHostFromProgram(program));
}
function hasEarlyErrors(sourceFile?: SourceFile): boolean {
return forEach(getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile), d => d.isEarly);
}
function isEmitBlocked(sourceFile?: SourceFile): boolean {
return getDiagnostics(sourceFile).length !== 0 ||
hasEarlyErrors(sourceFile) ||
(options.noEmitOnError && getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile).length !== 0);
}