You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really like the new python match construct but it seems the Tree datatype doesn't currently support it.
I can monkey patch it in with Tree.__match_args__ = ("data", "children") , but inserting this line into https://github.com/lark-parser/lark/blob/master/lark/tree.py should support it reasonably. Alternatively, a dataclass annotation I believe would also enable pattern matching.
The text was updated successfully, but these errors were encountered:
I really like the new python match construct but it seems the Tree datatype doesn't currently support it.
I can monkey patch it in with
Tree.__match_args__ = ("data", "children")
, but inserting this line into https://github.com/lark-parser/lark/blob/master/lark/tree.py should support it reasonably. Alternatively, a dataclass annotation I believe would also enable pattern matching.The text was updated successfully, but these errors were encountered: