Skip to content

Commit

Permalink
feat(lltz_codegen): formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmarkoTrilitech committed Oct 7, 2024
1 parent 07c8358 commit 1e14806
Show file tree
Hide file tree
Showing 15 changed files with 3,658 additions and 2,845 deletions.
3 changes: 3 additions & 0 deletions lib/lltz_codegen/config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ module ExtStack = struct
match t with
| Ok stack -> Ok (f stack)
| Exceptional -> Exceptional
;;

let merge t1 t2 =
match t1, t2 with
| Ok stack1, Ok stack2 -> Ok (Stack.merge stack1 stack2)
| Exceptional, stack | stack, Exceptional -> stack
;;
end

type t =
Expand All @@ -31,3 +33,4 @@ let merge t1 t2 ~f =
{ stack = ExtStack.merge t1.stack t2.stack
; instructions = f t1.instructions t2.instructions
}
;;
4 changes: 2 additions & 2 deletions lib/lltz_codegen/ident.ml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
open Core

include String

let create =
let next = ref 0 in
fun ?(prefix = "_") () ->
Int.incr next;
prefix ^ Int.to_string !next
prefix ^ Int.to_string !next
;;
Loading

0 comments on commit 1e14806

Please sign in to comment.