From 61b70f02f1f84c7832e42d7ac7a9e3e3dd6aa7fd Mon Sep 17 00:00:00 2001
From: Hyeonung Baek <wiserlix@gmail.com>
Date: Mon, 17 Jan 2022 15:21:47 +0900
Subject: [PATCH] Add error handling for Token_not_found

---
 main.ml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/main.ml b/main.ml
index 33b7370..8c8c12a 100644
--- a/main.ml
+++ b/main.ml
@@ -6,6 +6,7 @@ let version = "%%VERSION%%"
 
 let error_to_string e =
   try raise e with
+  | Lex.Token_not_found -> sprintf "invalid token"
   | Parser.Expected t -> sprintf "expected %s" t
   | Parser.Unexpected_token t -> sprintf "unexpected token \"%s\"" t
   | Eval.Invalid_type -> "invalid type"