From e65699f8d37e4d4b069afad55f2d22bfa271d101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Sat, 8 Nov 2025 23:31:59 +0100 Subject: feat(calc): use rational number for abitrary precision --- lib/main.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/main.ex') 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 -- cgit v1.2.3