[erlang-questions] erl_parse vs erl_syntax difference
Hans Bolinder
hans.bolinder@REDACTED
Fri Sep 14 09:58:26 CEST 2018
[Karlo Kuna:]
> for example if we parse form (i'm omitting scan pass here)
> "-type a() :: tuple()." we get {ok,{attribute,1,type,{a,{type,1,tuple,any},[]}}}
>
> interesting part here is:
> {type,1,tuple,any}
>
> as far as i can see there no method how to construct valid tuple or
> map type annotations using erl_syntax. Specifically if one construct
> type annotation for tuple and use erl_syntax:revert/1 one gets:
>
> {type,1,tuple,any_size}
>
> any_size =/= any
>
> is this a bug??
Thanks for pointing it out. A fix, see commit 1b91284, will be
included in Erlang/OTP 21.1.
Best regards,
Hans Bolinder, Erlang/OTP team, Ericsson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180914/ac9e1c5e/attachment.htm>
More information about the erlang-questions
mailing list