Skip to content

Commit cd1d44e

Browse files
author
Tohava
committed
---
yaml --- r: 479 b: refs/heads/master c: 4bc173f h: refs/heads/master i: 477: 37f3687 475: c87d3a1 471: 15a0cae 463: f37766c 447: 0c0acc5 v: v3
1 parent 4b439f5 commit cd1d44e

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: ce79b0e492f1583debbce3c8155da3536c684d9a
2+
refs/heads/master: 4bc173fd3c66bb5b072b6452df8cb383b789c464

trunk/src/boot/fe/ast.ml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,13 @@ and fmt_stmt_body (ff:Format.formatter) (s:stmt) : unit =
12371237

12381238
| STMT_alt_port _ -> fmt ff "?stmt_alt_port?"
12391239
| STMT_note _ -> fmt ff "?stmt_note?"
1240-
| STMT_slice _ -> fmt ff "?stmt_slice?"
1240+
| STMT_slice (dst, src, slice) ->
1241+
fmt_lval ff dst;
1242+
fmt ff " = ";
1243+
fmt_lval ff src;
1244+
fmt ff ".";
1245+
fmt_slice ff slice;
1246+
fmt ff ";";
12411247
end
12421248

12431249
and fmt_arm
@@ -1275,6 +1281,27 @@ and fmt_pat (ff:Format.formatter) (pat:pat) : unit =
12751281
| PAT_wild ->
12761282
fmt ff "_"
12771283

1284+
and fmt_slice (ff:Format.formatter) (slice:slice) : unit =
1285+
let fmt_slice_start = (match slice.slice_start with
1286+
None -> (fun ff -> fmt ff "0")
1287+
| Some atom -> (fun ff -> fmt_atom ff atom)) in
1288+
fmt ff "(@[";
1289+
fmt_slice_start ff;
1290+
begin
1291+
match slice.slice_len with
1292+
None -> fmt ff ","
1293+
| Some slice_len ->
1294+
fmt ff ",@ @[";
1295+
fmt_slice_start ff;
1296+
fmt ff " +@ ";
1297+
fmt_atom ff slice_len;
1298+
fmt ff "@]";
1299+
end;
1300+
fmt ff "@])";
1301+
1302+
1303+
1304+
12781305
and fmt_decl_param (ff:Format.formatter) (param:ty_param) : unit =
12791306
let (ident, (i, e)) = param in
12801307
fmt_effect ff e;

0 commit comments

Comments
 (0)