lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.generator.HumanReadableReportingStrategy Class Reference

An error reporting strategy that parses human-readable output. More...

Inherits org.lflang.generator.DiagnosticReporting.Strategy.

Public Member Functions

 HumanReadableReportingStrategy (Pattern diagnosticMessagePattern, Pattern labelPattern)
 Instantiate a reporting strategy for lines of validator output that match diagnosticMessagePattern.
 HumanReadableReportingStrategy (Pattern diagnosticMessagePattern, Pattern labelPattern, Path relativeTo)
 Instantiate a reporting strategy for lines of validator output that match diagnosticMessagePattern.
void report (String validationOutput, MessageReporter messageReporter, Map< Path, CodeMap > map)
 Parse the validation output and report any errors that it contains.

Detailed Description

An error reporting strategy that parses human-readable output.

Author
Peter Donovan

Constructor & Destructor Documentation

◆ HumanReadableReportingStrategy() [1/2]

org.lflang.generator.HumanReadableReportingStrategy.HumanReadableReportingStrategy ( Pattern diagnosticMessagePattern,
Pattern labelPattern )

Instantiate a reporting strategy for lines of validator output that match diagnosticMessagePattern.

Parameters
diagnosticMessagePatternA pattern that matches lines that should be reported via this strategy. This pattern must contain named capturing groups called "path", "line", "column", "message", and "severity".
labelPatternA pattern that matches lines that act as labels, showing the location of the relevant piece of text. This pattern must contain two groups, the first of which must match characters that precede the location given by the "line" and "column" groups.

◆ HumanReadableReportingStrategy() [2/2]

org.lflang.generator.HumanReadableReportingStrategy.HumanReadableReportingStrategy ( Pattern diagnosticMessagePattern,
Pattern labelPattern,
Path relativeTo )

Instantiate a reporting strategy for lines of validator output that match diagnosticMessagePattern.

Parameters
diagnosticMessagePatterna pattern that matches lines that should be reported via this strategy. This pattern must contain named capturing groups called "path", "line", "column", "message", and "severity".
labelPatternA pattern that matches lines that act as labels, showing the location of the relevant piece of text. This pattern must contain two groups, the first of which must match characters that precede the location given by the "line" and "column" groups.
relativeToThe path against which any paths should be resolved.

Member Function Documentation

◆ report()

void org.lflang.generator.HumanReadableReportingStrategy.report ( String validationOutput,
MessageReporter messageReporter,
Map< Path, CodeMap > map )

Parse the validation output and report any errors that it contains.

Parameters
validationOutputany validation output
messageReporterany error reporter
mapthe map from generated files to CodeMaps

Implements org.lflang.generator.DiagnosticReporting.Strategy.


The documentation for this class was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/generator/HumanReadableReportingStrategy.java