Skip to content

Commit

Permalink
Update parser.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Thamirawaran authored Sep 18, 2024
1 parent 1a775db commit 41ef238
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jac/jaclang/compiler/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3587,7 +3587,7 @@ def match_case_block(self, kid: list[ast.AstNode]) -> ast.MatchCase:
match_case_block: KW_CASE pattern_seq (KW_IF expression)? COLON statement_list
"""
pattern = kid[1]
guard = kid[3] if isinstance(kid[3], ast.Expr) else None
guard = kid[3] if isinstance(kid[3], ast.Expr) else None
stmts = [i for i in kid if isinstance(i, ast.CodeBlockStmt)]
if isinstance(pattern, ast.MatchPattern) and isinstance(
guard, (ast.Expr, type(None))
Expand Down

0 comments on commit 41ef238

Please sign in to comment.