Skip to content

Commit

Permalink
Fix pretty parser
Browse files Browse the repository at this point in the history
  • Loading branch information
tehrengruber committed Dec 3, 2024
1 parent 2fd58ec commit 15d32f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gt4py/next/iterator/pretty_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ def visit_FunCall(self, node: ir.FunCall, *, prec: int) -> list[str]:
if fun_name == "named_range" and len(node.args) == 3:
# named_range(dim, start, stop) → dim: [star, stop)
dim, start, end = self.visit(node.args, prec=0)
res = self._hmerge(dim, [": ["], start, [", "], end, ["["]) # to get matching parenthesis of functions
res = self._hmerge(
dim, [": ["], start, [", "], end, ["["]
) # to get matching parenthesis of functions
return self._prec_parens(res, prec, PRECEDENCE["__call__"])
if fun_name == "cartesian_domain" and len(node.args) >= 1:
# cartesian_domain(x, y, ...) → c{ x × y × ... } # noqa: RUF003 [ambiguous-unicode-character-comment]
Expand Down

0 comments on commit 15d32f0

Please sign in to comment.