mirror of
https://github.com/LucasVbr/croissant.git
synced 2026-05-13 17:12:10 +00:00
feat: Add typecheck to the AST
This commit is contained in:
@@ -3,4 +3,4 @@
|
||||
(executable
|
||||
(name main)
|
||||
(public_name croissant)
|
||||
(libraries analyzer ast))
|
||||
(libraries ast))
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
(* bin/main.ml *)
|
||||
|
||||
open Printf
|
||||
open Ast.Print
|
||||
open Ast
|
||||
|
||||
exception Error of string
|
||||
|
||||
@@ -12,7 +12,7 @@ let () =
|
||||
if args_count >= 2 then printf "%s" help_message
|
||||
else if args_count = 1 then
|
||||
let file_path = Sys.argv.(1) in
|
||||
let ast = string_of_source_file (Analyzer.analyze_file file_path) in
|
||||
let ast = Print.string_of_source_file (Analyzer.analyze_file file_path) in
|
||||
printf "%s\n" ast
|
||||
else raise (Error "interpreter from stdin is not implemented yet")
|
||||
(* TODO: Implement interpreter from stdin *)
|
||||
Reference in New Issue
Block a user