|
|
@@ -227,10 +227,9 @@ class ParseTreeBuilder: |
|
|
|
options = rule.options |
|
|
|
keep_all_tokens = self.always_keep_all_tokens or options.keep_all_tokens |
|
|
|
expand_single_child = options.expand1 |
|
|
|
from_template = options.template_source is not None |
|
|
|
|
|
|
|
wrapper_chain = list(filter(None, [ |
|
|
|
(expand_single_child and not (rule.alias and not from_template)) and ExpandSingleChild, |
|
|
|
(expand_single_child and not rule.alias) and ExpandSingleChild, |
|
|
|
maybe_create_child_filter(rule.expansion, keep_all_tokens, self.ambiguous, options.empty_indices if self.maybe_placeholders else None), |
|
|
|
self.propagate_positions and PropagatePositions, |
|
|
|
self.ambiguous and maybe_create_ambiguous_expander(self.tree_class, rule.expansion, keep_all_tokens), |
|
|
|