Hi Steve

The formatter extracts comments from Elixir source like so:
https://github.com/elixir-lang/elixir/blob/9cf118bd123deb945be71bf3ea2b48cd271088f0/lib/elixir/lib/code/formatter.ex#L199-L225

This may help you.

Cheers,
Louis

On Sun, 16 Sep 2018 at 17:59 Steve Morin <steve.mo...@gmail.com> wrote:

> Wanted to see what peoples thoughts are about adding comments to the AST.
>
> One use-case is to be able to parse and manipulate Source files outside of
> just macros but in that case you would want to be able to preserve
> comments.
>
> E.g. Read a source file, manipulate it, write that source file back to a
> file.
>
> This would allow people/tooling to use elixir to parse and manipulate
> source files.
>
> If this might disturb existing consumers of the AST maybe this could be
> added as a option to existing Macro functions so that I could be turned on
> for people with this use-case.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elixir-lang-core+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/955237D8-31DE-448C-9777-1104F1175DC7%40gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CABu8xFCqNwQWGjr7PmeGgNOsKBcbFfQHoKLXmZuHahSv_vTxtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to