Source

SmallCC / src / compiler.ml

Full commit
class compiler = 
object(this) 

  method compile (file:string) =
    let ast = this#makeAst file in
      print_endline ("AST " ^ file)

  method makeAst (file:string) =
    let file_in = open_in file in
        let wrapper = new Wrapper.wrapper in
            wrapper#from_channel file_in ()

  method run (files:string list) =
    List.iter this#compile files

end

let compiler =
  let a = new compiler in
    a