Thanks - but I found it does not return same format as mix format for .exs
remove-comment.exs file
# top-level comment
defmodule RemoveComment do
# in-module comment
def run(code_string) do
# in-func comment
code_string
|> Code.string_to_quoted!()
|> Macro.to_string()
end
end
"./remove-comment.exs"
|> File.read!()
|> RemoveComment.run()
|> IO.puts()
$ elixir --version
Erlang/OTP 22 [erts-10.4.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Elixir 1.9.0 (compiled with Erlang/OTP 22)
$ elixir remove-comment.exs
(
defmodule(RemoveComment) do
def(run(code_string)) do
code_string |> Code.string_to_quoted!() |> Macro.to_string()
end
end
"./remove-comment.exs" |> File.read!() |> RemoveComment.run() |> IO.puts()
)


















