Permalink
Browse files

some module organization

  • Loading branch information...
jtolds committed Jan 7, 2012
1 parent 45b5a7d commit 5f56e63bb379f2bb268b8969f86b19956ee1a73e
View
@@ -1,7 +1,2 @@
src/pants
src/run_tests
src/*.o
src/*.pyc
src/assets.h
src/assets.cpp
*.pyc
samples/*.pc
View
No changes.
@@ -32,7 +32,7 @@
__author_email__ = "hello@jtolds.com"
__all__ = ["parse"]
import ast
import types as ast
DEBUG_LEVEL = 0
@@ -25,7 +25,7 @@
Pants
http://www.pants-lang.org/
AST module
AST types
"""
__author__ = "JT Olds"
View
No changes.
View
@@ -0,0 +1,38 @@
#!/usr/bin/env python
#
# Copyright (c) 2011, JT Olds <hello@jtolds.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
"""
Pants
http://www.pants-lang.org/
IR conversion
"""
__author__ = "JT Olds"
__author_email__ = "hello@jtolds.com"
__all__ = ["convert"]
import types as ir
def convert(ast):
print ast.format()
View
@@ -0,0 +1,32 @@
#!/usr/bin/env python
#
# Copyright (c) 2011, JT Olds <hello@jtolds.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
"""
Pants
http://www.pants-lang.org/
IR types
"""
__author__ = "JT Olds"
__author_email__ = "hello@jtolds.com"
View
@@ -32,10 +32,11 @@
__author_email__ = "hello@jtolds.com"
import sys
from parse import parse
from ast.parse import parse
from ir.convert import convert
def main(argv):
print parse(sys.stdin).format()
convert(parse(sys.stdin))
if __name__ == "__main__":
sys.exit(main(sys.argv))

0 comments on commit 5f56e63

Please sign in to comment.