[erlang-questions] ErlTL: A Simple Erlang Template Language
Dmitrii Dimandt
dmitriid@REDACTED
Fri Oct 20 08:29:07 CEST 2006
On 10/19/06, Yariv Sadan <yarivvv@REDACTED> wrote:
>
> > However, it wouldn't work if
> > <%? [What, Where, Objects, Action] = Data %>
> > wasn't the first line of the template.
> >
> > Even inserting a newline before that would result in the following
> error:
>
> >
> > {error,{misplaced_top_expression,{line,2},
> > "<%? [What, Where,
> > Objects, Action] = Data %>\r
> > "}}
> >
> > This error appeared for both ASCII and UTF-8 files.
>
> Actually, this line is supposed to appear before all other lines
> because it's a top level expression. Top level expressions aren't part
> of the function's output, so they must appear first. Adding a newline
> before it is tantamount to adding a binary expression to the output,
> which means that the top level expression doesn't precede all output
> expressions anymore.
Oh, ok. I see that. Quite logical, actually :) However, this error also
appears if I insert a comment line there (as per example in your blog)
I could change the error to a warning, but first,
> can you show me a template that absolutely requires changing the
> existing error handling behavior?
No, it's ok now that I understand it :)
Thanks,
> Yariv
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20061020/78696dad/attachment.htm>
More information about the erlang-questions
mailing list