} else
break;
- if ((mod_flags & (Modifiers.PRIVATE|Modifiers.PROTECTED)) != 0){
+ if ((mod_flags & (Modifiers.PRIVATE)) != 0){
Report.Error (
- 1527, lexer.Location,
+ 31089, lexer.Location,
"Namespace elements cannot be explicitly " +
- "declared private or protected in '" + name + "'");
+ "declared private in '" + name + "'");
+ }
+ else if ((mod_flags & (Modifiers.PROTECTED)) != 0){
+ Report.Error (
+ 31047, lexer.Location,
+ "Namespace elements cannot be explicitly " +
+ "declared protected in '" + name + "'");
}
}
;
;
class_declaration
- : CLASS identifier logical_end_of_line opt_inherits opt_implements
+ : CLASS identifier end_of_stmt opt_inherits opt_implements
{
// Module members are static by default, but Class *can't* be declared static
// so we must fix it, if mbas was the one actually responsible for this
opt_inherits
: /* empty */ { $$ = null; }
- | INHERITS type_list logical_end_of_line { $$ = $2; }
+ | INHERITS type_list end_of_stmt { $$ = $2; }
;
opt_implements
: /* empty */ { $$ = null; }
- | IMPLEMENTS type_list logical_end_of_line { $$ = $2; }
+ | IMPLEMENTS type_list end_of_stmt { $$ = $2; }
;
opt_modifiers
;
constant_declaration
- : CONST constant_declarators logical_end_of_line
+ : CONST constant_declarators end_of_stmt
{
// Module members are static by default, but constants *can't* be declared static
// so we must fix it, if mbas was the one actually responsible for this
;
struct_declaration
- : STRUCTURE identifier logical_end_of_line
+ : STRUCTURE identifier end_of_stmt
opt_implement_clause
{
Struct new_struct;
field_declaration
: opt_dim_stmt
- variable_declarators logical_end_of_line
+ variable_declarators end_of_stmt
{
int mod = (int) current_modifiers;