Skip to content

Commit e0a1815

Browse files
committed
print pexp_array
1 parent a38a5bd commit e0a1815

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

analysis/src/DumpAst.ml

+8
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,14 @@ and printExprItem expr ~pos ~indentation =
152152
^ (expr.pexp_loc |> printLocDenominator ~pos)
153153
^
154154
match expr.Parsetree.pexp_desc with
155+
| Pexp_array exprs ->
156+
"Pexp_array(\n"
157+
^ addIndentation (indentation + 1)
158+
^ (exprs
159+
|> List.map (fun expr ->
160+
expr |> printExprItem ~pos ~indentation:(indentation + 1))
161+
|> String.concat ("\n" ^ addIndentation (indentation + 1)))
162+
^ "\n" ^ addIndentation indentation ^ ")"
155163
| Pexp_match (matchExpr, cases) ->
156164
"Pexp_match("
157165
^ printExprItem matchExpr ~pos ~indentation:0

0 commit comments

Comments
 (0)