Skip to content

Fix some dialyzer issues #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions lib/spitfire.ex
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,6 @@ defmodule Spitfire do

defp parse_comma_list(parser, precedence, is_list, is_map) do
trace "parse_comma_list", trace_meta(parser) do
precedence = precedence || @list_comma
{front, parser} = parse_expression(parser, precedence, is_list, is_map, false)
# we zip together the expression and parser state so that we can potentially
# backtrack later
Expand Down Expand Up @@ -2161,9 +2160,6 @@ defmodule Spitfire do
case code
|> String.to_charlist()
|> :spitfire_tokenizer.tokenize(opts[:line] || 1, opts[:column] || 1, opts) do
{:ok, _, _, _, tokens} ->
tokens

{:ok, line, column, _, rev_tokens, rev_terminators} ->
# vendored from elixir-lang/elixir, license: Apache2
{rev_tokens, rev_terminators} =
Expand Down Expand Up @@ -2356,7 +2352,7 @@ defmodule Spitfire do
defp eat_at(%{tokens: remaining_tokens} = parser, tokens, idx) when is_list(remaining_tokens) and is_map(tokens) do
tokens =
if tokens[Enum.at(remaining_tokens, idx)] do
List.delete_at(tokens, idx)
List.delete_at(remaining_tokens, idx)
else
remaining_tokens
end
Expand Down
Loading