(error points to the function call; changing ++val to val += 1 makes the error go away.)
Throwing in a semicolon after funk fixes it; also changing the return type of funk to Int fixes it (which seems weird).
brianSat 6 Jun 2009
Yeah, there are a couple cases where Fan's grammar is ambiguous regarding lack of a semicolon. Although I think we've fixed the biggest ones regarding return, (, and [ appearing on the same line as the start of their expr.
If you guys want we can do the same for the postfix operators ++ and --?
KevinKelley Sat 6 Jun 2009
This test:
gives this error:
(error points to the function call; changing
++val
toval += 1
makes the error go away.)Throwing in a semicolon after
funk
fixes it; also changing the return type of funk to Int fixes it (which seems weird).brian Sat 6 Jun 2009
Yeah, there are a couple cases where Fan's grammar is ambiguous regarding lack of a semicolon. Although I think we've fixed the biggest ones regarding
return
,(
, and[
appearing on the same line as the start of their expr.If you guys want we can do the same for the postfix operators
++
and--
?jtobler Thu 30 Jul 2009
This example deals with prefix operators, though.