@Override public Integer quotedString( final SExpressionQuotedStringType qs) throws IOException { w.print('"'); w.print(qs.text()); w.print('"'); return Integer.valueOf(0); }
/** * @param e The expression * * @return A parser exception * * @see JPRAParseErrorCode#EXPECTED_LIST_GOT_QUOTED_STRING */ public static JPRACompilerParseException expectedListGotQuotedString( final SExpressionQuotedStringType e) { final StringBuilder mb = new StringBuilder(256); mb.append(" Expected: A list"); mb.append(System.lineSeparator()); mb.append(" Got: A quoted string '"); mb.append(e.text()); mb.append("'"); final String m = NullCheck.notNull(mb.toString(), "Message"); return new JPRACompilerParseException( e.lexical().map(LexicalPosition::copyOf), JPRAParseErrorCode.EXPECTED_LIST_GOT_QUOTED_STRING, m); }
/** * @param e The expression * * @return A parser exception * * @see JPRAParseErrorCode#EXPECTED_SYMBOL_GOT_QUOTED_STRING */ public static JPRACompilerParseException expectedSymbolGotQuotedString( final SExpressionQuotedStringType e) { final StringBuilder mb = new StringBuilder(256); mb.append(" Expected: A symbol"); mb.append(System.lineSeparator()); mb.append(" Got: A quoted string '"); mb.append(e.text()); mb.append("'"); final String m = NullCheck.notNull(mb.toString(), "Message"); return new JPRACompilerParseException( e.lexical().map(LexicalPosition::copyOf), JPRAParseErrorCode.EXPECTED_SYMBOL_GOT_QUOTED_STRING, m); }
/** * @param e The expression * * @return A parser exception * * @see JPRAParseErrorCode#EXPECTED_SYMBOL_OR_LIST_GOT_QUOTED_STRING */ public static JPRACompilerParseException expectedSymbolOrListGotQuotedString( final SExpressionQuotedStringType e) { final StringBuilder mb = new StringBuilder(256); mb.append(" Expected: A list or a symbol"); mb.append(System.lineSeparator()); mb.append(" Got: A quoted string '"); mb.append(e.text()); mb.append("'"); final String m = NullCheck.notNull(mb.toString(), "Message"); return new JPRACompilerParseException( e.lexical().map(LexicalPosition::copyOf), JPRAParseErrorCode.EXPECTED_SYMBOL_OR_LIST_GOT_QUOTED_STRING, m); }
if (!texts.filter(text -> Objects.equals(s.text(), text)).isEmpty()) { return Validation.valid(s); sb.append(options); sb.append(" but received a quoted string \""); sb.append(s.text()); sb.append("\""); sb.append(System.lineSeparator()); sb.append(s.text()); sb.append("'"); sb.append(System.lineSeparator());
getExpressionLexical(le), size, qe.text());