Skip to content

Commit

Permalink
feat: add spitfire parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Timmer committed May 15, 2024
1 parent cf3e231 commit a720859
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/mix_edit.ex
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ defmodule MixEdit do
emit_warnings: false
]

Code.string_to_quoted_with_comments!(intext, quote_opts)
{:ok, data, comments} = Spitfire.parse_with_comments(intext, quote_opts)
{data, comments}
end

@doc "Function that updates the mix.exs file (or `Mix.Project`)"
Expand Down
5 changes: 4 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ defmodule MixEdit.MixProject do

# Run "mix help deps" to learn about dependencies.
defp deps do
[]
[
{:spitfire, git: "https://github.com/elixir-tools/spitfire.git"}
# {:spitfire, path: "../spitfire"}
]
end
end
1 change: 1 addition & 0 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
%{
"spitfire": {:git, "https://github.com/elixir-tools/spitfire.git", "e47385f64db19f65b8efdd57d003272376446a4e", []},
}

0 comments on commit a720859

Please sign in to comment.