[erlang-questions] clarify: export statement in erl_syntax notation

Roberto Saccon <>
Sat Jan 12 20:37:20 CET 2008


whatever I try doesn't get compiled.

eg.:

  -export([foo/0, foo/1]).

in abstract erl_syntax notation:

neither:

erl_syntax:attribute(erl_syntax:atom(export),
  [erl_syntax:tuple([erl_syntax:atom("foo"), erl_syntax:integer(0)]),
    erl_syntax:tuple([erl_syntax:atom("foo"), erl_syntax:integer(1)])]),

nor:

erl_syntax:attribute(erl_syntax:atom(export),
  [erl_syntax:atom("foo/0"), erl_syntax:atom("foo/1")]),

nor:

erl_syntax:attribute(erl_syntax:atom(export),
  [erl_syntax:text("foo/0"), erl_syntax:text("foo/1")]),


nor any other "combination" I tried compiles.

testing with erl_parse:parse_form/1 I get the following abstract
syntax (which still doesn't hep me):

{attribute,1,export,[{foo,0},{foo,1}]}

Anybody knows ?

regards
-- 
Roberto Saccon
http://rsaccon.com



More information about the erlang-questions mailing list