diff options
| author | William Hergès <william@herges.fr> | 2025-11-08 23:31:59 +0100 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-11-08 23:31:59 +0100 |
| commit | e65699f8d37e4d4b069afad55f2d22bfa271d101 (patch) | |
| tree | 8ab324fa7fc192bb1e46d389541d79c910cd2514 /lib/main.ex | |
| parent | 8a26b3d43e1adb6f9585891500a5fc856fd0ca5c (diff) | |
feat(calc): use rational number for abitrary precision
Diffstat (limited to 'lib/main.ex')
| -rw-r--r-- | lib/main.ex | 4 |
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 |
