|
@@ -625,7 +625,7 @@ class GrammarLoader: |
|
|
elif stmt.data == 'import': |
|
|
elif stmt.data == 'import': |
|
|
dotted_path = stmt.children[0].children |
|
|
dotted_path = stmt.children[0].children |
|
|
name = stmt.children[1] if len(stmt.children)>1 else dotted_path[-1] |
|
|
name = stmt.children[1] if len(stmt.children)>1 else dotted_path[-1] |
|
|
grammar_path = os.path.join(*dotted_path[:-1]) + '.g' |
|
|
|
|
|
|
|
|
grammar_path = os.path.join(*dotted_path[:-1]) + '.lrk' |
|
|
g = import_grammar(grammar_path) |
|
|
g = import_grammar(grammar_path) |
|
|
token_options = dict(g.token_defs)[dotted_path[-1]] |
|
|
token_options = dict(g.token_defs)[dotted_path[-1]] |
|
|
assert isinstance(token_options, tuple) and len(token_options)==2 |
|
|
assert isinstance(token_options, tuple) and len(token_options)==2 |
|
|