Optional braces
Jakob Ovrum
jakobovrum+ng at gmail.com
Fri Aug 26 10:38:03 PDT 2011
On 2011/08/27 1:52, Andrej Mitrovic wrote:
>Of course they're still needed in other places, but to be
> honest I'm tired of "found foo, expected bla" errors due to missing
> semicolons.
You can have both semi-colons and nice error messages if you put some
effort into the parser. Clang manages this even for C++. Some sample SDC
output:
test.d(5:16): error: missing ';' after initialisation.
int foo = 2
^
;
test.d(5:18): error: missing ';' after expression.
assert(false)
^
;
test.d(5:27): error: missing ';' after declaration.
void function(int) foo
^
;
More information about the Digitalmars-d
mailing list