Compiler Diagnostics
This tracks the problems encountered while compiling a single module.
Author
Mark van Gulik
Parameters
The source code of the module.
The ModuleName of the module being compiled.
A BooleanSupplier to indicate whether to abort.
A ProblemHandler for, well, handling problems during compilation.
Constructors
Create a CompilerDiagnostics suitable for tracking the potential problems encountered during compilation of a single module.
Types
These enumeration values form a priority scheme for reporting parsing problems.
Functions
Record an expectation at the given token.
Handle a problem via the problem handler.
Record the fact that this token was encountered while parsing the current top-level statement.
Report the rightmost accumulated errors, then invoke the failureReporter.
Report one specific terminal problem and call the failure continuation to abort compilation.
Set the success reporter and failure reporter.
Record the fact that we're starting to parse a top-level statement at the indicated one-based position in the source. Clear any already recorded expectations.
Properties
This boolean is set when the problemHandler decides that an encountered Problem is serious enough that code generation should be suppressed. In Avail, that means the serialized module should not be written to its repository.
Allow the positionsToTrack for ParseNotificationLevel.SILENT entries to be adjusted. Only do this when there is no compilation active for the receiver.