${ test-obj } [ $ test-string yaml> ] unit-test
${ test-represented-string } [ $ test-obj >yaml ] unit-test
${ test-represented-string } [ $ test-represented-string yaml> >yaml ] unit-test
+
+CONSTANT: complex-key H{ { { "4" } "3" } }
+CONSTANT: complex-key-represented """--- !!map
+? !!seq
+- !!str 4
+: !!str 3
+...
+"""
+
+${ complex-key } [ $ complex-key-represented yaml> ] unit-test
YAML_MAPPING_END_EVENT = [
t done! f f
] [
- event event>scalar t
+ event ?scalar-value
] if
- ] with-destructors [ parser event next-value swap ,, ] [ drop ] if ] until
+ ] with-destructors 2dup or [
+ [ nip [ parser event ] dip next-complex-value ] when*
+ parser event next-value swap ,,
+ ] [ 2drop ] if ] until
] H{ } make ;
:: parse-sequence ( parser event -- seq ) [
f :> done!