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
{{ message }}
Repository navigation
patchedast is currently not handling some match-case statement syntaxes #623
All four nodes listed here are implemented. #819 added MatchOr, MatchSequence, MatchSingleton and MatchStar, #863 fixed the parenthesis handling for MatchSequence, and both are in 1.15.0. On master (46ebf37) a pattern of each kind now round-trips through write_ast().
Two MatchSequence cases still fail on master:
case (1), (2): raises MismatchedTokenError: Token <)> at (2, 17) cannot be matched.
case (("a" | None), None): warns Unexpected character in MatchSequence's opening_paren <((>, and write_ast() no longer reproduces the source.
Item 3 of the open PR #882 addresses both. Would you close this once #882 is merged, or close it now and leave the corner cases to #882?
Activity
mcepl commentedon Nov 2, 2026
All four nodes listed here are implemented. #819 added
MatchOr,MatchSequence,MatchSingletonandMatchStar, #863 fixed the parenthesis handling forMatchSequence, and both are in 1.15.0. On master (46ebf37) a pattern of each kind now round-trips throughwrite_ast().Two
MatchSequencecases still fail on master:case (1), (2):raisesMismatchedTokenError: Token <)> at (2, 17) cannot be matched.case (("a" | None), None):warnsUnexpected character in MatchSequence's opening_paren <((>, andwrite_ast()no longer reproduces the source.Item 3 of the open PR #882 addresses both. Would you close this once #882 is merged, or close it now and leave the corner cases to #882?
lieryan commentedon Nov 2, 2026
Let's close this. #882 can be its own issue.