ocamlcc playground
a compiler front-end written in OCaml, running in your tab —
source
·
home
copy link
source — int, bool, number, char · if/else · while · int <: number subtyping
int main() { int x = 5; number n = x + 1; if (x > 0) { char c = 'A'; print_char(c); } else { int y = x - 1; print_int(y); } while (x > 0) { int step = 1; x = x - step; } return 0; }
front-end dump — AST · symbol tables · typechecker verdict
loading compiler.js …