]> gitweb.factorcode.org Git - factor.git/commitdiff
YAML: cleanup, tags are defined in the ffi
authorJon Harper <jon.harper87@gmail.com>
Tue, 25 Feb 2014 22:33:59 +0000 (23:33 +0100)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 27 Apr 2014 22:24:22 +0000 (15:24 -0700)
extra/yaml/yaml.factor

index 8784304761fd8a6da963e7a17364675cb724cf12..073eb2a64f00c2ca88fb0373f2dd7985d2105b39 100644 (file)
@@ -138,7 +138,7 @@ M:: string emit-value ( emitter event string -- )
         string utf8 encode
         [ malloc-byte-array &free ] [ length ] bi :> ( value length )
 
-        "tag:yaml.org,2002:str" utf8 malloc-string &free :> tag
+        YAML_STR_TAG utf8 malloc-string &free :> tag
 
         event f tag value length 0 0 0
         yaml_scalar_event_initialize yaml-assert-ok
@@ -148,7 +148,7 @@ M:: string emit-value ( emitter event string -- )
 
 :: emit-sequence-start ( emitter event -- )
     [
-        "tag:yaml.org,2002:seq" utf8 malloc-string &free :> tag
+        YAML_SEQ_TAG utf8 malloc-string &free :> tag
 
         event f tag 0 0
         yaml_sequence_start_event_initialize yaml-assert-ok
@@ -169,7 +169,7 @@ M: sequence emit-value ( emitter event seq -- )
 
 :: emit-assoc-start ( emitter event -- )
     [
-        "tag:yaml.org,2002:map" utf8 malloc-string &free :> tag
+        YAML_MAP_TAG utf8 malloc-string &free :> tag
 
         event f tag 0 0
         yaml_mapping_start_event_initialize yaml-assert-ok