Interface ICSSParseErrorHandler

    • Method Detail

      • onCSSParseError

        void onCSSParseError​(@Nonnull
                             ParseException aParseEx,
                             @Nullable
                             Token aLastSkippedToken)
                      throws ParseException
        Called upon a recoverable error. The parameter list is similar to the one of the ParseException.
        Parameters:
        aParseEx - The original parse exception. May not be null.
        aLastSkippedToken - The token until which was skipped (incl.) May be null.
        Throws:
        ParseException - In case the error is fatal and should be propagated.
      • onCSSUnexpectedRule

        void onCSSUnexpectedRule​(@Nonnull
                                 Token aCurrentToken,
                                 @Nonnull @Nonempty
                                 String sRule,
                                 @Nonnull @Nonempty
                                 String sMsg)
                          throws ParseException
        Called upon an unexpected rule. This happens e.g. when @import is used in the middle of the file.
        Parameters:
        aCurrentToken - The token that could not be interpreted. Never null.
        sRule - The name of the rule. Always starts with a '@'. Neither null nor empty.
        sMsg - The custom error message. Neither null nor empty.
        Throws:
        ParseException - In case the error is fatal and should be propagated.
      • onCSSDeprecatedProperty

        void onCSSDeprecatedProperty​(@Nonnull
                                     Token aPrefixToken,
                                     @Nonnull
                                     Token aIdentifierToken)
                              throws ParseException
        To be called, if a deprecated old IE 6/7 property is found.
        Parameters:
        aPrefixToken - The prefix token found (like '$' or '*'). Never null.
        aIdentifierToken - The identifier token found. Never null.
        Throws:
        ParseException - In case the error is fatal and should be propagated.
        Since:
        6.5.0
      • onIllegalCharacter

        default void onIllegalCharacter​(char cIllegalChar)
        This method is invoked, when an illegal character is encountered (in TokenManager), and the respective rule is part of the JavaCC grammar.
        Parameters:
        cIllegalChar - The illegal char
        Since:
        5.0.3