hy/bin/hy-lex-json
2012-12-15 18:59:11 -05:00

13 lines
183 B
Python
Executable File

#!/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
)