@ -231,14 +231,15 @@ VBNET
(.
(.
lexer.NextToken(); // get the first token
lexer.NextToken(); // get the first token
compilationUnit = new CompilationUnit();
compilationUnit = new CompilationUnit();
.) =
.)
{ EOL }
=
{ OptionStmt }
{ EndOfStmt }
{ ImportsStmt}
{ OptionStmt { EndOfStmt } }
{ IF (IsGlobalAttrTarget()) GlobalAttributeSection }
{ ImportsStmt { EndOfStmt } }
{ NamespaceMemberDecl }
{ IF (IsGlobalAttrTarget()) GlobalAttributeSection { EndOfStmt } }
{ NamespaceMemberDecl { EndOfStmt } }
EOF
EOF
.
.
OptionStmt (. INode node = null; bool val = true; .) =
OptionStmt (. INode node = null; bool val = true; .) =
"Option" (. Location startPos = t.Location; .)
"Option" (. Location startPos = t.Location; .)
@ -529,13 +530,18 @@ NonModuleDeclaration<ModifierList m, List<AttributeSection> attributes>
.
.
NamespaceBody =
NamespaceBody =
{ NamespaceMemberDecl }
{ EndOfStmt } /* allow empty lines at begin of body */
{
NamespaceMemberDecl
{ EndOfStmt } /* allow empty lines in body */
}
"End" "Namespace"
"End" "Namespace"
EndOfStmt
EndOfStmt
.
.
ClassBody<TypeDeclaration newType>
ClassBody<TypeDeclaration newType>
(. AttributeSection section; .) =
(. AttributeSection section; .) =
{ EndOfStmt } /* allow empty lines at begin of body */
{
{
(.List<AttributeSection> attributes = new List<AttributeSection>();
(.List<AttributeSection> attributes = new List<AttributeSection>();
ModifierList m = new ModifierList();
ModifierList m = new ModifierList();
@ -543,11 +549,13 @@ ClassBody<TypeDeclaration newType>
{ AttributeSection<out section> (. attributes.Add(section); .) }
{ AttributeSection<out section> (. attributes.Add(section); .) }
{ MemberModifier<m> }
{ MemberModifier<m> }
ClassMemberDecl<m, attributes>
ClassMemberDecl<m, attributes>
{ EndOfStmt } /* allow empty lines in body */
}
}
.
.
StructureBody<TypeDeclaration newType>
StructureBody<TypeDeclaration newType>
(. AttributeSection section; .) =
(. AttributeSection section; .) =
{ EndOfStmt } /* allow empty lines at begin of body */
{
{
(.List<AttributeSection> attributes = new List<AttributeSection>();
(.List<AttributeSection> attributes = new List<AttributeSection>();
ModifierList m = new ModifierList();
ModifierList m = new ModifierList();
@ -555,6 +563,7 @@ StructureBody<TypeDeclaration newType>
{ AttributeSection<out section> (. attributes.Add(section); .) }
{ AttributeSection<out section> (. attributes.Add(section); .) }
{ MemberModifier<m> }
{ MemberModifier<m> }
StructureMemberDecl<m, attributes>
StructureMemberDecl<m, attributes>
{ EndOfStmt } /* allow empty lines in body */
}
}
"End" "Structure" (. newType.EndLocation = t.EndLocation; .)
"End" "Structure" (. newType.EndLocation = t.EndLocation; .)
EndOfStmt
EndOfStmt
@ -563,6 +572,7 @@ StructureBody<TypeDeclaration newType>
/* 7.7.1 */
/* 7.7.1 */
ModuleBody<TypeDeclaration newType>
ModuleBody<TypeDeclaration newType>
(. AttributeSection section; .) =
(. AttributeSection section; .) =
{ EndOfStmt } /* allow empty lines at begin of body */
{
{
(.List<AttributeSection> attributes = new List<AttributeSection>();
(.List<AttributeSection> attributes = new List<AttributeSection>();
ModifierList m = new ModifierList();
ModifierList m = new ModifierList();
@ -570,6 +580,7 @@ ModuleBody<TypeDeclaration newType>
{ AttributeSection<out section> (. attributes.Add(section); .) }
{ AttributeSection<out section> (. attributes.Add(section); .) }
{ MemberModifier<m> }
{ MemberModifier<m> }
ClassMemberDecl<m, attributes>
ClassMemberDecl<m, attributes>
{ EndOfStmt } /* allow empty lines in body */
}
}
"End" "Module" (. newType.EndLocation = t.EndLocation; .)
"End" "Module" (. newType.EndLocation = t.EndLocation; .)
EndOfStmt
EndOfStmt
@ -577,15 +588,21 @@ ModuleBody<TypeDeclaration newType>
EnumBody<TypeDeclaration newType>
EnumBody<TypeDeclaration newType>
(. FieldDeclaration f; .) =
(. FieldDeclaration f; .) =
{ EndOfStmt } /* allow empty lines at begin of body */
{
{
EnumMemberDecl<out f> (. compilationUnit.AddChild(f); .)
EnumMemberDecl<out f> (. compilationUnit.AddChild(f); .)
{ EndOfStmt } /* allow empty lines in body */
}
}
"End" "Enum" (. newType.EndLocation = t.EndLocation; .)
"End" "Enum" (. newType.EndLocation = t.EndLocation; .)
EndOfStmt
EndOfStmt
.
.
InterfaceBody<TypeDeclaration newType> =
InterfaceBody<TypeDeclaration newType> =
{ InterfaceMemberDecl }
{ EndOfStmt } /* allow empty lines at begin of body */
{
InterfaceMemberDecl
{ EndOfStmt } /* allow empty lines in body */
}
"End" "Interface" (. newType.EndLocation = t.EndLocation; .)
"End" "Interface" (. newType.EndLocation = t.EndLocation; .)
EndOfStmt
EndOfStmt
.
.