/** * <pre> * block_mapping ::= BLOCK-MAPPING_START * ((KEY block_node_or_indentless_sequence?)? * (VALUE block_node_or_indentless_sequence?)?)* * BLOCK-END * </pre> */ private Event processEmptyScalar(Mark mark) { return new ScalarEvent(null, null, new ImplicitTuple(true, false), "", mark, mark, DumperOptions.ScalarStyle.PLAIN); } }
ImplicitTuple implicitValues; if ((token.getPlain() && tag == null) || "!".equals(tag)) { implicitValues = new ImplicitTuple(true, false); } else if (tag == null) { implicitValues = new ImplicitTuple(false, true); } else { implicitValues = new ImplicitTuple(false, false); event = new ScalarEvent(anchor, tag, new ImplicitTuple(implicit, false), "", startMark, endMark, DumperOptions.ScalarStyle.PLAIN); state = states.pop();
public SldTransformContext scalar(String value) throws IOException { yaml.emit( new ScalarEvent( null, null, new ImplicitTuple(true, false), value, null, null, DumperOptions.ScalarStyle.PLAIN)); return this; }
Tag detectedTag = this.resolver.resolve(NodeId.scalar, scalarNode.getValue(), true); Tag defaultTag = this.resolver.resolve(NodeId.scalar, scalarNode.getValue(), false); ImplicitTuple tuple = new ImplicitTuple(node.getTag().equals(detectedTag), node .getTag().equals(defaultTag)); ScalarEvent event = new ScalarEvent(tAlias, node.getTag().getValue(), tuple,
/** * <pre> * block_mapping ::= BLOCK-MAPPING_START * ((KEY block_node_or_indentless_sequence?)? * (VALUE block_node_or_indentless_sequence?)?)* * BLOCK-END * </pre> */ private Event processEmptyScalar(Mark mark) { return new ScalarEvent(null, null, new ImplicitTuple(true, false), "", mark, mark, DumperOptions.ScalarStyle.PLAIN); } }
/** * <pre> * block_mapping ::= BLOCK-MAPPING_START * ((KEY block_node_or_indentless_sequence?)? * (VALUE block_node_or_indentless_sequence?)?)* * BLOCK-END * </pre> */ private Event processEmptyScalar(Mark mark) { return new ScalarEvent(null, null, new ImplicitTuple(true, false), "", mark, mark, (char) 0); } }
/** * <pre> * block_mapping ::= BLOCK-MAPPING_START * ((KEY block_node_or_indentless_sequence?)? * (VALUE block_node_or_indentless_sequence?)?)* * BLOCK-END * </pre> */ private Event processEmptyScalar(Mark mark) { return new ScalarEvent(null, null, new ImplicitTuple(true, false), "", mark, mark, (char) 0); } }
public SldTransformContext scalar(String value) throws IOException { yaml.emit( new ScalarEvent( null, null, new ImplicitTuple(true, false), value, null, null, null)); return this; }
@Override protected ScalarEvent _scalarEvent(String value, Character style) { if (value.indexOf('\n') != -1) { style = Character.valueOf('|'); } ImplicitTuple implicit; String yamlTag = _typeId; if (yamlTag != null) { _typeId = null; implicit = new ImplicitTuple(false, false); // we want to always preserve the tags (if they are present) } else { implicit = new ImplicitTuple(true, true); } String anchor = _objectId; if (anchor != null) { _objectId = null; } return new ScalarEvent(anchor, yamlTag, implicit, value, null, null, style); }
@JRubyMethod(required = 6) public IRubyObject scalar(ThreadContext context, IRubyObject[] args) { IRubyObject value = args[0]; IRubyObject anchor = args[1]; IRubyObject tag = args[2]; IRubyObject plain = args[3]; IRubyObject quoted = args[4]; IRubyObject style = args[5]; if (!(value instanceof RubyString)) { throw context.runtime.newTypeError(value, context.runtime.getString()); } ScalarEvent event = new ScalarEvent( anchor.isNil() ? null : anchor.asJavaString(), tag.isNil() ? null : tag.asJavaString(), new ImplicitTuple(plain.isTrue(), quoted.isTrue()), value.asJavaString(), NULL_MARK, NULL_MARK, SCALAR_STYLES[(int)style.convertToInteger().getLongValue()]); emit(context, event); return this; }
@JRubyMethod(required = 6) public IRubyObject scalar(ThreadContext context, IRubyObject[] args) { IRubyObject value = args[0]; IRubyObject anchor = args[1]; IRubyObject tag = args[2]; IRubyObject plain = args[3]; IRubyObject quoted = args[4]; IRubyObject style = args[5]; if (!(value instanceof RubyString)) { throw context.runtime.newTypeError(value, context.runtime.getString()); } ScalarEvent event = new ScalarEvent( anchor.isNil() ? null : anchor.asJavaString(), tag.isNil() ? null : tag.asJavaString(), new ImplicitTuple(plain.isTrue(), quoted.isTrue()), value.asJavaString(), NULL_MARK, NULL_MARK, SCALAR_STYLES[(int)style.convertToInteger().getLongValue()]); emit(context, event); return this; }
ImplicitTuple implicitValues; if ((token.getPlain() && tag == null) || "!".equals(tag)) { implicitValues = new ImplicitTuple(true, false); } else if (tag == null) { implicitValues = new ImplicitTuple(false, true); } else { implicitValues = new ImplicitTuple(false, false); event = new ScalarEvent(anchor, tag, new ImplicitTuple(implicit, false), "", startMark, endMark, (char) 0); state = states.pop();
ImplicitTuple implicitValues; if ((token.getPlain() && tag == null) || "!".equals(tag)) { implicitValues = new ImplicitTuple(true, false); } else if (tag == null) { implicitValues = new ImplicitTuple(false, true); } else { implicitValues = new ImplicitTuple(false, false); event = new ScalarEvent(anchor, tag, new ImplicitTuple(implicit, false), "", startMark, endMark, (char) 0); state = states.pop();
ImplicitTuple implicitValues; if ((token.getPlain() && tag == null) || "!".equals(tag)) { implicitValues = new ImplicitTuple(true, false); } else if (tag == null) { implicitValues = new ImplicitTuple(false, true); } else { implicitValues = new ImplicitTuple(false, false); event = new ScalarEvent(anchor, tag, new ImplicitTuple(implicit, false), "", startMark, endMark, DumperOptions.ScalarStyle.PLAIN); state = states.pop();
Tag detectedTag = this.resolver.resolve(NodeId.scalar, scalarNode.getValue(), true); Tag defaultTag = this.resolver.resolve(NodeId.scalar, scalarNode.getValue(), false); ImplicitTuple tuple = new ImplicitTuple(node.getTag().equals(detectedTag), node .getTag().equals(defaultTag)); ScalarEvent event = new ScalarEvent(tAlias, node.getTag().getValue(), tuple,
Tag detectedTag = this.resolver.resolve(NodeId.scalar, scalarNode.getValue(), true); Tag defaultTag = this.resolver.resolve(NodeId.scalar, scalarNode.getValue(), false); ImplicitTuple tuple = new ImplicitTuple(node.getTag().equals(detectedTag), node .getTag().equals(defaultTag)); ScalarEvent event = new ScalarEvent(tAlias, node.getTag().getValue(), tuple,
Tag detectedTag = this.resolver.resolve(NodeId.scalar, scalarNode.getValue(), true); Tag defaultTag = this.resolver.resolve(NodeId.scalar, scalarNode.getValue(), false); ImplicitTuple tuple = new ImplicitTuple(node.getTag().equals(detectedTag), node .getTag().equals(defaultTag)); ScalarEvent event = new ScalarEvent(tAlias, node.getTag().getValue(), tuple,