[erlang-questions] erl_syntax:comment with erl_prettypr error

Adrian Campos calvi88@REDACTED
Fri Dec 23 19:34:47 CET 2011


Hello,
I have been trying to create an abstract syntax tree with a comment, but once the tree is correctly formed and I try to print it with erl_prettypr:format(Tree) I get this error:
5> C = erl_syntax:comment("comm").{tree,comment,{attr,0,[],none},{comment,none,"comm"}}6> erl_prettypr:format(C).** exception error: no function clause matching prettypr:strwidth(99,1)     in function  prettypr:string/1     in call from prettypr:text/1     in call from erl_prettypr:stack_comment_lines/1     in call from erl_prettypr:lay_2/2     in call from erl_prettypr:format/2
My question is: is this error a prettypr bug? or am I doing something wrong using erl_prettypr:format withot any options besides the Tree?
Thank you 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111223/4f9c86a8/attachment.htm>


More information about the erlang-questions mailing list