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
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
# DEALINGS IN THE SOFTWARE.
|
# DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
from hy.macros import process as mprocess
|
||||||
|
|
||||||
import importlib
|
import importlib
|
||||||
|
|
||||||
|
|
||||||
@ -26,6 +28,11 @@ MACROS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def process(tree):
|
||||||
|
load_macros()
|
||||||
|
return mprocess(tree)
|
||||||
|
|
||||||
|
|
||||||
def load_macros():
|
def load_macros():
|
||||||
for module in MACROS:
|
for module in MACROS:
|
||||||
importlib.import_module(module)
|
importlib.import_module(module)
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
from hy.lex import tokenize
|
from hy.lex import tokenize
|
||||||
from hy.macros import process
|
from hy.core import process
|
||||||
from hy.core import load_macros
|
|
||||||
from hy.compiler import hy_compile
|
from hy.compiler import hy_compile
|
||||||
|
|
||||||
|
|
||||||
@ -13,7 +12,6 @@ import os
|
|||||||
|
|
||||||
def import_file_to_hst(fpath):
|
def import_file_to_hst(fpath):
|
||||||
tree = tokenize(open(fpath, 'r').read())
|
tree = tokenize(open(fpath, 'r').read())
|
||||||
load_macros()
|
|
||||||
tree = process(tree)
|
tree = process(tree)
|
||||||
return tree
|
return tree
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user