aboutsummaryrefslogtreecommitdiff
path: root/lib/main.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/main.ex')
-rw-r--r--lib/main.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/main.ex b/lib/main.ex
index ad657ca..5418da5 100644
--- a/lib/main.ex
+++ b/lib/main.ex
@@ -7,8 +7,9 @@ defmodule ElixirMathParser.Main do
def process_parse({:ok, tree}) do
IO.puts("\nParse tree")
IO.inspect(tree, pretty: true)
+
case ElixirMathParser.process_tree(tree) do
- {:ok, _} -> :ok
+ {:ok, _} -> :ok
{:error, reason} -> reason
end
end
@@ -23,6 +24,7 @@ defmodule ElixirMathParser.Main do
IO.puts("Parsed #{filename}, stopped at line #{line}")
res = process_parse(:elixir_math_parser.parse(tokens))
+
if res != :ok do
IO.puts(res)
end