From c08b8f8ad8eaa827442d61b95aa5d95aad44f32f Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 12 Oct 2023 15:21:12 -0400 Subject: [PATCH] Ensure maybe_placeholders is set in lark parsing (#29730) --- scripts/py_matter_idl/matter_idl/matter_idl_parser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/py_matter_idl/matter_idl/matter_idl_parser.py b/scripts/py_matter_idl/matter_idl/matter_idl_parser.py index ee165409c1164e..e2abbc26e4ce84 100755 --- a/scripts/py_matter_idl/matter_idl/matter_idl_parser.py +++ b/scripts/py_matter_idl/matter_idl/matter_idl_parser.py @@ -543,6 +543,7 @@ def __init__(self, skip_meta: bool): # For this reason, every attempt should be made to make the grammar context free self.parser = Lark.open( 'matter_grammar.lark', rel_to=__file__, start='idl', parser='lalr', propagate_positions=True, + maybe_placeholders=True, # separate callbacks to ignore from regular parsing (no tokens) # while still getting notified about them lexer_callbacks={