thinking through some manglers.

This commit is contained in:
Paul R. Tagliamonte 2013-03-09 16:34:35 -05:00
parent 8a2ba20407
commit 276df1b103
2 changed files with 8 additions and 3 deletions

View File

@ -18,6 +18,8 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
from hy.macros import process as mprocess
import importlib
@ -26,6 +28,11 @@ MACROS = [
]
def process(tree):
load_macros()
return mprocess(tree)
def load_macros():
for module in MACROS:
importlib.import_module(module)

View File

@ -1,8 +1,7 @@
#
from hy.lex import tokenize
from hy.macros import process
from hy.core import load_macros
from hy.core import process
from hy.compiler import hy_compile
@ -13,7 +12,6 @@ import os
def import_file_to_hst(fpath):
tree = tokenize(open(fpath, 'r').read())
load_macros()
tree = process(tree)
return tree