@ -314,14 +314,13 @@ TypeDeclaration =
( ClassOrModuleOrStructureTypeDeclaration |
( ClassOrModuleOrStructureTypeDeclaration |
DelegateTypeDeclaration )
DelegateTypeDeclaration )
.
.
ClassOrModuleOrStructureTypeDeclaration =
ClassOrModuleOrStructureTypeDeclaration =
(. PushContext(Context.TypeDeclaration, la, t); .)
( "Module" | "Class" | "Structure" ) (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) ANY (. PopContext(); .)
( "Module" | "Class" | "Structure" ) (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) ANY (. PopContext(); .)
[ "(" "Of" [ "Out" | "In" ] IdentifierExceptOut [ (. PushContext(Context.Type, la, t); .) "As" GenericConstraintList (. PopContext(); .) ] { "," [ "Out" | "In" ] IdentifierExceptOut [ (. PushContext(Context.Type, la, t); .) "As" GenericConstraintList (. PopContext(); .) ] } ")" ] { ANY } [ StatementTerminator ]
[ "(" "Of" [ "Out" | "In" ] IdentifierExceptOut [ (. PushContext(Context.Type, la, t); .) "As" GenericConstraintList (. PopContext(); .) ] { "," [ "Out" | "In" ] IdentifierExceptOut [ (. PushContext(Context.Type, la, t); .) "As" GenericConstraintList (. PopContext(); .) ] } ")" ] StatementTerminator
[ "Inherits" { ANY } StatementTerminator ]
[ "Inherits" { ANY } StatementTerminator ]
[ "Implements" { ANY } StatementTerminator ]
[ "Implements" { ANY } StatementTerminator ]
(. PushContext(Context.TypeDeclaration, la, t); .)
(. isMissingModifier = true; Console.WriteLine("is true"); .) { MemberDeclaration (. isMissingModifier = true; .) } (. isMissingModifier = false; Console.WriteLine("is false"); .)
{ MemberDeclaration }
"End" ( "Module" | "Class" | "Structure" ) StatementTerminator
"End" ( "Module" | "Class" | "Structure" ) StatementTerminator
(. PopContext(); .)
(. PopContext(); .)
.
.
@ -341,8 +340,8 @@ DelegateTypeDeclaration =
.
.
MemberDeclaration =
MemberDeclaration =
(. PushContext(Context.Member, la, t); .)
(. PushContext(Context.Member, la, t); isMissingModifier = true ; .)
{ AttributeBlock } { MemberModifier }
{ AttributeBlock } { MemberModifier (. isMissingModifier = false; .) } (. isMissingModifier = false; .)
(
(
MemberVariableOrConstantDeclaration |
MemberVariableOrConstantDeclaration |
SubOrFunctionDeclaration |
SubOrFunctionDeclaration |
@ -363,11 +362,13 @@ SubOrFunctionDeclaration =
.
.
ExternalMemberDeclaration =
ExternalMemberDeclaration =
(. isMissingModifier = false; .)
"Declare" [ "Ansi" | "Unicode" | "Auto" ] ( "Sub" | "Function" ) (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) Identifier (. PopContext(); .)
"Declare" [ "Ansi" | "Unicode" | "Auto" ] ( "Sub" | "Function" ) (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) Identifier (. PopContext(); .)
"Lib" LiteralString [ "Alias" LiteralString ] [ "(" [ ParameterList ] ")" ] [ (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) ] StatementTerminator
"Lib" LiteralString [ "Alias" LiteralString ] [ "(" [ ParameterList ] ")" ] [ (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) ] StatementTerminator
.
.
EventMemberDeclaration =
EventMemberDeclaration =
(. isMissingModifier = false; .)
"Event" (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) Identifier (. PopContext(); .) ( (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) | [ "(" [ ParameterList ] ")" ] )
"Event" (. PushContext(Context.Identifier, la, t); .) (.OnEachPossiblePath: SetIdentifierExpected(la); .) Identifier (. PopContext(); .) ( (. PushContext(Context.Type, la, t); .) "As" TypeName (. PopContext(); .) | [ "(" [ ParameterList ] ")" ] )
[ "Implements" TypeName /*"." IdentifierOrKeyword*/ { "," TypeName /*"." IdentifierOrKeyword*/ } ]
[ "Implements" TypeName /*"." IdentifierOrKeyword*/ { "," TypeName /*"." IdentifierOrKeyword*/ } ]
/* the TypeName production already allows the "." IdentifierOrKeyword syntax, so to avoid an ambiguous grammer we just leave that out */
/* the TypeName production already allows the "." IdentifierOrKeyword syntax, so to avoid an ambiguous grammer we just leave that out */
@ -375,6 +376,7 @@ EventMemberDeclaration =
.
.
CustomEventMemberDeclaration =
CustomEventMemberDeclaration =
(. isMissingModifier = false; .)
"Custom" EventMemberDeclaration
"Custom" EventMemberDeclaration
{
{
{ AttributeBlock } ( "AddHandler" | "RemoveHandler" | "RaiseEvent" ) "(" ParameterList ")"
{ AttributeBlock } ( "AddHandler" | "RemoveHandler" | "RaiseEvent" ) "(" ParameterList ")"