From 8f9730d89e66ab1cbf08cbc0dea2a429d135e0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Sun, 9 Nov 2025 12:49:15 +0100 Subject: feat(parser): supports implicit mult --- lib/main.ex | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/main.ex') diff --git a/lib/main.ex b/lib/main.ex index 5418da5..99c25ca 100644 --- a/lib/main.ex +++ b/lib/main.ex @@ -1,7 +1,8 @@ defmodule ElixirMathParser.Main do def process_parse({:error, result}) do - IO.puts("\nParse error") - IO.inspect(result) + {line, _file, errors} = result + err = Enum.join(errors) + err <> " (line " <> to_string(line) <> ")" end def process_parse({:ok, tree}) do @@ -26,7 +27,7 @@ defmodule ElixirMathParser.Main do res = process_parse(:elixir_math_parser.parse(tokens)) if res != :ok do - IO.puts(res) + IO.puts(:stderr, "\n" <> res) end end end -- cgit v1.2.3