Re:So You Want to Write Your Own Language (2014)
by ufo on Wednesday December 23, 2015 @12:27PM
(#10784392)
Lua avoids this issue because it does not allow an statement to be just an expression.
[ Parent
| on HN ]
Re:So You Want to Write Your Own Language (2014)
by theseoafs on Wednesday December 23, 2015 @01:05PM
(#10784605)
f()
Re:So You Want to Write Your Own Language (2014)
by ufo on Wednesday December 23, 2015 @01:22PM
(#10784730)
Function-call-statements are a special case. Not every expression can be turned into a statement.
http://www.lua.org/manual/5.3/manual.html#3.3.6
This gets rids of almost all the syntactic ambiguities. The only big one that is left is statements that start with parenthesis.