digitalmars.D.bugs - [docs.grammar] missing/deprecated entries
- Manfred Nowak (16/16) Apr 29 2005 The nonterminal FunctionBody is referenced two times
The nonterminal FunctionBody is referenced two times (declaration.html and expression.html) but nowhere defined. The ClassConstructur is defined to be this ( ) BlockStatement but 1) the ParameterList is not required to be empty as the docs itself show some lines down. 2) The only possibility of declarations in a Blockstatement is via the DeclarationStatement which restricts the programmer to declaring variables as the grammar states and the words describe. But this is not true, because nested function declarations are possible at least in the BlockStatement of the constructor. From a rough run over dmd's parser in parse.c I have the impression, that the BlockStatement, FunctionBody and ClassBody in fact currently are identical. -manfred
Apr 29 2005