[erlang-questions] Syntax highlight erlang code with erlang

Richard Carlsson richardc@REDACTED
Wed May 23 14:17:14 CEST 2007

Petter Larsson XA (TN/EAB) wrote:
> How do I get this syntax tree in the first place, if I use
> epp_dogder:parse_file all comments in the file is lost. What is the
> correct function to create a full syntax tree from a source code?

Something like this (from lib/syntax_tools/examples/demo.erl):

read(Name) ->
     {ok, Forms} = epp:parse_file(Name, [], []),
     Comments = erl_comment_scan:file(Name),
     erl_recomment:recomment_forms(Forms, Comments).


More information about the erlang-questions mailing list