Interface SemanticErrorReporter


  • public interface SemanticErrorReporter
    Reports errors that occur after parsing. This may be used to implement semantic checks in a language specific way.
    • Method Detail

      • warning

        void warning​(Node location,
                     String message,
                     Object... formatArgs)
        Report a warning at the given location. Warnings do not abort the analysis. They are usually recoverable errors. They are used to warn the user that something wrong is going on, which may cause subsequent errors or inconsistent behavior.
        Parameters:
        location - Location where the warning should be reported
        message - Message (rendered using a MessageFormat)
        formatArgs - Format arguments
      • error

        SemanticException error​(Node location,
                                String message,
                                Object... formatArgs)
        Report an error at the given location. Errors abort subsequent analysis and cause a processing error to be put in the report. The produced error can be thrown by the caller if it cannot be recovered from.
        Parameters:
        location - Location where the error should be reported
        message - Message (rendered using a MessageFormat)
        formatArgs - Format arguments