aboutsummaryrefslogtreecommitdiff
path: root/src/elixir_math_parser.yrl
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-11-10 00:21:40 +0100
committerAnhgelus Morhtuuzh <william@herges.fr>2025-11-10 00:21:40 +0100
commit244e46ed692e9d2a7c4be7c0f5adda03239ee2fd (patch)
tree58e4d516a9bfe6d173380c4f557afb2e22816cd1 /src/elixir_math_parser.yrl
parent2019a495893f138f70e189483f36b219eabe20e2 (diff)
feat(parser): supports _ in numbers
Diffstat (limited to 'src/elixir_math_parser.yrl')
-rw-r--r--src/elixir_math_parser.yrl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/elixir_math_parser.yrl b/src/elixir_math_parser.yrl
index f8de916..4e8e9e9 100644
--- a/src/elixir_math_parser.yrl
+++ b/src/elixir_math_parser.yrl
@@ -54,4 +54,6 @@ expr -> '-' exprs : {sub_op, {int, 0, 0}, '$2'}.
Erlang code.
-unwrap({int, Line, Value}) -> {int, Line, list_to_integer(Value)}.
+unwrap({int, Line, Value}) ->
+ Match = fun(X) -> not(X == 95) end,
+ {int, Line, list_to_integer(lists:filter(Match, Value))}.