From c0063e4d82844bab2d1d0db9d91708144f3b92e2 Mon Sep 17 00:00:00 2001 From: Kaspar Emanuel Date: Fri, 6 Oct 2017 17:28:33 +0100 Subject: [PATCH] Make tracking includes more logical in nearley tool --- lark/tools/nearley.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lark/tools/nearley.py b/lark/tools/nearley.py index 7ff01b3..a367c0f 100644 --- a/lark/tools/nearley.py +++ b/lark/tools/nearley.py @@ -118,9 +118,8 @@ def _nearley_to_lark(g, builtin_path, n2l, js_code, folder_path, includes=None): includes.append(path) with open(path) as f: text = f.read() - [included_rule_defs, included_includes] = _nearley_to_lark(text, builtin_path, n2l, js_code, os.path.abspath(os.path.dirname(path)), includes) + [included_rule_defs, includes] = _nearley_to_lark(text, builtin_path, n2l, js_code, os.path.abspath(os.path.dirname(path)), includes) rule_defs += included_rule_defs - includes += included_includes else: assert False, directive elif statement.data == 'js_code':