OK, trying some grown-up work.

This commit is contained in:
Paul Tagliamonte 2012-12-15 18:59:11 -05:00
parent 03f25f0cbe
commit 33771bf254
2 changed files with 20 additions and 0 deletions

12
bin/hy-lex-json Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env python
from hy.lex.tokenize import tokenize
import json
import sys
print json.dumps(
tokenize(open(sys.argv[1], 'r').read()),
indent=4,
sort_keys=True
)

8
test.hy Normal file
View File

@ -0,0 +1,8 @@
; vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 filetype=lisp
(ns test)
(def square
(fn [x] (* x x)))
(print (square 4))