Handbook
Glossary
yaml-events ( string -- )
Vocabulary
yaml
.
dbg
Inputs
string
an
object
Outputs
None
Definition
USING:
accessors
alien.data
classes.struct
continuations
destructors
io.encodings.string
io.encodings.utf8
kernel
libc
prettyprint
sequences
yaml.ffi
yaml.private
;
IN:
yaml.dbg
::
yaml-events
( string -- )
[
yaml_parser_t
(malloc-struct)
&free
&yaml_parser_delete
:>
parser parser
yaml_parser_initialize
.
string
utf8
encode
[
malloc-byte-array
&free
]
[
length
]
bi
:>
( input length ) parser input length
yaml_parser_set_input_string
yaml_event_t
(malloc-struct)
&free
:>
event
f
:>
done!
[
[
done
]
[
parser event
yaml_parser_parse
[
[
event
&yaml_event_delete
event.
event
type>>
YAML_STREAM_END_EVENT
=
done!
]
with-destructors
]
[
parser
(libyaml-parser-error)
]
if
]
until
]
[
.
]
recover
]
with-destructors
;