Skip to content

Instantly share code, notes, and snippets.

@fogus
Created May 11, 2012 19:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fogus/2662079 to your computer and use it in GitHub Desktop.
Save fogus/2662079 to your computer and use it in GitHub Desktop.
load('./cljjs.js')
// USING EXISTING PARSER
clj.read_string("#queue [1 2 3]")
//=> #queue [1 2 3]
// REGISTERING NEW PARSER
clj.register_tag_parser('date', function(d) { return (new Date(Date.parse(d))) })
clj.read_string("#date \"December 2, 1975\"")
//=> Tue Dec 02 1975 00:00:00 GMT-0500 (EST)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment