Having investigated this a little more I am convinced there is an issue here.
It is easily reproducible (as described below).
Would someone like to raise an issue for this? (I am happy to do it, if that's OK)
Looks like a good candidate for a fix before 0.9 is released. ;-)
Graeme
________
To produce the error:
make app PROJECT=bug_demo
Then create a controller/bug_demo_test_controller.erl with content of
1 -module(bug_demo_test_controller, [Req, SessionId]).
2 -compile(export_all).
3
4 index('GET',[]) ->
5 Rslt = 1 - length([1,2,3]),
6 {output, "Hello, world!"}.
Compilation fails on line 5 with a syntax error before 'length'.
Changing the '-' to a '+' avoids the error, as does replacing length([1,2,3]) with a simple constant or variable. The error seems to be specific to parsing a '-' sign as the last operator in an expression when the last operand is a function call.