From 76bc20c4342fe25e179022b63225b0e1cb89a995 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 8 Dec 2022 19:54:57 +0100 Subject: [PATCH] Capitalize error messages --- main.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.ml b/main.ml index 13c9922..f2cc502 100644 --- a/main.ml +++ b/main.ml @@ -21,11 +21,12 @@ let () = let parsed = Parser.prog Lexer.token buf in close_in f; let ast = Semantics.analyze parsed in + (* Semantics.emit Stdlib.stderr ast; *) let asm = Compiler.compile ast in Mips.emit Stdlib.stdout asm with | Lexer.Error c -> - err (Printf.sprintf "unrecognized char '%c'" c) (Lexing.lexeme_start_p buf) - | Parser.Error -> err "syntax error" (Lexing.lexeme_start_p buf) + err (Printf.sprintf "Unrecognized char \"%c\"" c) (Lexing.lexeme_start_p buf) + | Parser.Error -> err "Syntax error" (Lexing.lexeme_start_p buf) | Semantics.Error (msg, pos) -> err msg pos ;;