Commits

Moritz Heidkamp committed df9a5f6

Normalize some identifier names

Comments (0)

Files changed (3)

          (inst . ,make-edn-tag)
          (uuid . ,make-edn-tag)))))
 
-(define (register-edn-tag! namespace name handler)
+(define (register-edn-tag-parser! namespace name parser)
   (edn-tags
    (alist-update!
     namespace
     (alist-update!
      name
-     (lambda (v _ _) (handler v))
+     (lambda (v _ _) (parser v))
      (or (alist-ref namespace (edn-tags)) '()))
     (edn-tags))))
 
-(define handle-unknown-edn-tags?
+(define parse-unknown-edn-tags?
   (make-parameter #t))
 
 (define (maybe-string->symbol s)
 
 (define (tag-ref ns name)
   (or (tag-ref* ns name)
-      (and (handle-unknown-edn-tags?)
+      (and (parse-unknown-edn-tags?)
            (tag-ref* #f #f))
       (error "Undefined tag" ns name)))
 
 
 (read-edn
  edn-parsers
- register-edn-tag!
- handle-unknown-edn-tags?
+ register-edn-tag-parser!
+ parse-unknown-edn-tags?
  write-edn
  write-edn/tag
- register-edn-emitter!
- edn-emitters)
+ edn-emitters
+ register-edn-emitter!)
 
 "edn-impl.scm"
 
   (test-read "#uuid \"f81d4fae-7dec-11d0-a765-00a0c91e6bf6\""
              '(tag (#f . uuid) "f81d4fae-7dec-11d0-a765-00a0c91e6bf6"))
   (test-read "#yak/sie masz" '(tag (yak . sie) masz))
-  (parameterize ((handle-unknown-edn-tags? #f))
+  (parameterize ((parse-unknown-edn-tags? #f))
     (test-read-error "#yak/sie masz")))
 
 (test-group "custom tags"
-  (register-edn-tag!
+  (register-edn-tag-parser!
    'nice 'string (lambda (x) (string-append x " is nice!")))
   (test-read "#nice/string \"edn\"" "edn is nice!"))