Closed Shiroy closed 9 years ago
The scope of the syntax error is generally too large (for example, it will return the entire block if only one binding has a typo). You can try improving the precision by commenting out the bindings one by one.
Also, be careful of the following pitfall: subsequent xhtml values will always be concatenated, which causes the following code to fail (with expected a returned expression at the end of the block, but ...
):
xhtml = <div>Some xhtml value</div>
<div id="container">
{xhtml}
</div>
Yes, that's what I did to find the mistake in the if.
Thanks for the tip :)
During my implementation of Birdy following the book, I encountered this error :
But this code is correct.
The problem was due to this line of code I mistype :
Which should be
The function is the same than in the book.
The error reporting should be improved because this report was not exact at all.
PS : I work with the last version of OPA compiled for Linux.
The wrong code
The correct one