thinking through some manglers.
This commit is contained in:
parent
8a2ba20407
commit
276df1b103
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user