Skip to content

Commit

Permalink
Delete unused Jason.Codegen.jump_table_case/4 (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuinnWilton committed Apr 3, 2020
1 parent c326c91 commit 91a4eaf
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions lib/codegen.ex
Original file line number Diff line number Diff line change
Expand Up @@ -88,26 +88,6 @@ defmodule Jason.Codegen do
end)
end

defmacro jump_table_case(var, rest, ranges, default) do
clauses =
ranges
|> jump_table(default)
|> Enum.flat_map(fn {byte_value, action} ->
quote do
<<unquote(byte_value), unquote(rest)::bits>> ->
unquote(action)
end
end)

clauses = clauses ++ quote(do: (<<>> -> empty_error(original, skip)))

quote do
case unquote(var) do
unquote(clauses)
end
end
end

defp resize(array, size), do: :array.resize(size, array)

defp ranges_to_orddict(ranges) do
Expand Down

0 comments on commit 91a4eaf

Please sign in to comment.