hy/bin/hy-lex-json

13 lines
183 B
Plaintext
Raw Normal View History

2012-12-16 00:59:11 +01:00
#!/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
)