private void processScalar() throws IOException {
        ScalarEvent ev = (ScalarEvent) event;
        if (analysis == null) {
            analysis = analyzeScalar(ev.getValue());
        }
        if (style == null) {
            style = chooseScalarStyle();
        }
        style = options.calculateScalarStyle(analysis, ScalarStyle.createStyle(style)).getChar();
        boolean split = !simpleKeyContext;
        if (style == null) {
            writePlain(analysis.scalar, split);
        } else {
            switch (style) {
            case '"':
                writeDoubleQuoted(analysis.scalar, split);
                break;
            case '\'':
                writeSingleQuoted(analysis.scalar, split);
                break;
            case '>':
                writeFolded(analysis.scalar);
                break;
            case '|':
                writeLiteral(analysis.scalar);
                break;
            }
        }
        analysis = null;
        style = null;
    }