diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index c233df2..657fe77 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -62,6 +62,8 @@ pub struct IR { pub span: Range } +// S-Expression displaying for IR +// Used for debugging (run `compile` with `-a`) impl std::fmt::Display for IRKind { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { diff --git a/example/iter.hz b/example/iter.hz index 8ddba9b..32cc159 100644 --- a/example/iter.hz +++ b/example/iter.hz @@ -3,8 +3,11 @@ fun iter_ (vec: vec_int) (current: int): void = do do end; else do + -- iter logic + -- TODO: function as argument @get(vec, current) |> @write(_); @write("\n"); + iter_(vec, current + 1); end; end;