Added gensym, and phases in the desugar module for logical and & or
This commit is contained in:
8
lib/compiler/gensym.ml
Normal file
8
lib/compiler/gensym.ml
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
|
||||
let counter = ref 0
|
||||
|
||||
let reset () = counter := 0
|
||||
let gensym base =
|
||||
incr counter;
|
||||
Printf.sprintf "__generated_%s_%d" base !counter
|
||||
Reference in New Issue
Block a user