From ab5bc3f47e1a83f2c420fd8bfb4108719baa8d14 Mon Sep 17 00:00:00 2001 From: MegaIng1 Date: Tue, 6 Oct 2020 02:32:25 +0200 Subject: [PATCH] Improved comment --- lark/load_grammar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lark/load_grammar.py b/lark/load_grammar.py index 156a1be..08990f2 100644 --- a/lark/load_grammar.py +++ b/lark/load_grammar.py @@ -948,7 +948,8 @@ class GrammarLoader: rule_names = {} for name, params, _x, option in rules: - if self.always_keep_all_tokens: # We need to do this somewhere. Might as well prevent an additional loop + # We can't just simply not throw away the tokens later, we need option.keep_all_tokens to correctly generate maybe_placeholders + if self.always_keep_all_tokens: option.keep_all_tokens = True if name.startswith('__'):