This repository has been archived by the owner. It is now read-only.
Browse files

added comment on errors

  • Loading branch information...
joshua-choi committed May 24, 2009
1 parent 4df10a0 commit ecf83f1553d72375f6aff5360db31762f4445f80
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/name/choi/joshua/fnparse/json.clj
@@ -10,6 +10,8 @@
(def make-scalar-node (partial make-node :scalar))
(def make-array-node (partial make-node :array))
(def make-object-node (partial make-node :object))
+; A couple of parse errors have been put here and there. It's nowhere complete, but rather
+; it's to show examples of how to implement errors.
(deferror parse-error [] [state message message-args]
{:msg (str (format "JSON error at line %s, column %s: " (:line state) (:column state))
(apply format message message-args))

0 comments on commit ecf83f1

Please sign in to comment.