public void syntaxError()

in src/main/java/org/apache/sling/scripting/sightly/impl/compiler/frontend/SightlyParserErrorListener.java [37:51]


    public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg,
                            RecognitionException e) {
        String offendingInput;
        if (Parser.class.isAssignableFrom(recognizer.getClass())) {
            List<String> stack = ((Parser) recognizer).getRuleInvocationStack();
            Collections.reverse(stack);
            offendingInput = ((CommonTokenStream) recognizer.getInputStream()).getTokenSource().getInputStream().toString();
        } else {
            offendingInput = recognizer.getInputStream().toString();
        }
        if (e != null) {
            throw new SightlyCompilerException(msg, offendingInput, line, charPositionInLine, e);
        }
        throw new SightlyCompilerException(msg, offendingInput, line, charPositionInLine);
    }