diff options
| author | William Hergès <william@herges.fr> | 2025-11-09 12:49:15 +0100 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-11-09 12:49:15 +0100 |
| commit | 8f9730d89e66ab1cbf08cbc0dea2a429d135e0da (patch) | |
| tree | fee1312ae3ff572ebb2f5a9ff6b22fb66a66644a /lib | |
| parent | 5c422b7ef948a0fd579a0750ab29ab93e36b0e95 (diff) | |
feat(parser): supports implicit mult
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/main.ex | 7 |
1 files changed, 4 insertions, 3 deletions
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 |
