aboutsummaryrefslogtreecommitdiff
path: root/src/boot/fe/ast.ml
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-08-23 18:19:42 -0700
committerGraydon Hoare <[email protected]>2010-08-23 18:19:42 -0700
commit6e3a77c3a3b32aa6fabad895492c2b24739fedba (patch)
tree5e92169975465400c1f617c39fcbacf9bffab706 /src/boot/fe/ast.ml
parentWarn when the value of "spawn" is unused, as it's useless (diff)
parentModified parser to handle alt type andadded a few tests (diff)
downloadrust-6e3a77c3a3b32aa6fabad895492c2b24739fedba.tar.xz
rust-6e3a77c3a3b32aa6fabad895492c2b24739fedba.zip
Merge remote branch 'tohava/master'
Conflicts: src/boot/fe/ast.ml
Diffstat (limited to 'src/boot/fe/ast.ml')
-rw-r--r--src/boot/fe/ast.ml13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/boot/fe/ast.ml b/src/boot/fe/ast.ml
index 357bf1e6..79ff2c7c 100644
--- a/src/boot/fe/ast.ml
+++ b/src/boot/fe/ast.ml
@@ -322,7 +322,7 @@ and pat =
and tag_arm' = pat * block
and tag_arm = tag_arm' identified
-and type_arm' = ident * slot * block
+and type_arm' = (ident * slot) * block
and type_arm = type_arm' identified
and port_arm' = port_case * block
@@ -1253,7 +1253,6 @@ and fmt_stmt_body (ff:Format.formatter) (s:stmt) : unit =
fmt_cbb ff;
end;
fmt_cbb ff;
-
| STMT_alt_port at ->
fmt_obox ff;
fmt ff "alt ";
@@ -1273,7 +1272,6 @@ and fmt_stmt_body (ff:Format.formatter) (s:stmt) : unit =
fmt_cbb ff;
end;
fmt_cbb ff;
-
| STMT_note at ->
begin
fmt ff "note ";
@@ -1308,10 +1306,11 @@ and fmt_tag_arm (ff:Format.formatter) (tag_arm:tag_arm) : unit =
fmt_arm ff (fun ff -> fmt_pat ff pat) block;
and fmt_type_arm (ff:Format.formatter) (type_arm:type_arm) : unit =
- let (_, slot, block) = type_arm.node in
- fmt_arm ff (fun ff -> fmt_slot ff slot) block;
-
-
+ let ((ident, slot), block) = type_arm.node in
+ let fmt_type_arm_case (ff:Format.formatter) =
+ fmt_slot ff slot; fmt ff " "; fmt_ident ff ident
+ in
+ fmt_arm ff fmt_type_arm_case block;
and fmt_port_arm (ff:Format.formatter) (port_arm:port_arm) : unit =
let (port_case, block) = port_arm.node in
fmt_arm ff (fun ff -> fmt_port_case ff port_case) block;