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 committed 2015-02-02 15:14:19 -08:00
1 parent eed1576e53
commit dd8d3535ff
7 files changed
+297 -402

No files matched your search

-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);
}