|
|
|
@ -318,7 +318,7 @@ SubOrFunctionDeclaration = |
|
|
|
("Sub" | "Function") |
|
|
|
("Sub" | "Function") |
|
|
|
(. PushContext(Context.IdentifierExpected, t); .) ANY (. PopContext(); .) |
|
|
|
(. PushContext(Context.IdentifierExpected, t); .) ANY (. PopContext(); .) |
|
|
|
[ "(" [ ParameterList ] ")" ] [ "As" TypeName ] |
|
|
|
[ "(" [ ParameterList ] ")" ] [ "As" TypeName ] |
|
|
|
Block |
|
|
|
StatementTerminatorAndBlock |
|
|
|
"End" ("Sub" | "Function") StatementTerminator |
|
|
|
"End" ("Sub" | "Function") StatementTerminator |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
@ -337,16 +337,16 @@ EventMemberDeclaration = |
|
|
|
CustomEventMemberDeclaration = |
|
|
|
CustomEventMemberDeclaration = |
|
|
|
"Custom" EventMemberDeclaration |
|
|
|
"Custom" EventMemberDeclaration |
|
|
|
{ |
|
|
|
{ |
|
|
|
{ AttributeBlock } ( "AddHandler" | "RemoveHandler" | "RaiseEvent" ) "(" ParameterList ")" EOL |
|
|
|
{ AttributeBlock } ( "AddHandler" | "RemoveHandler" | "RaiseEvent" ) "(" ParameterList ")" |
|
|
|
Block |
|
|
|
StatementTerminatorAndBlock |
|
|
|
"End" ( "AddHandler" | "RemoveHandler" | "RaiseEvent" ) StatementTerminator |
|
|
|
"End" ( "AddHandler" | "RemoveHandler" | "RaiseEvent" ) StatementTerminator |
|
|
|
} |
|
|
|
} |
|
|
|
"End" "Event" StatementTerminator |
|
|
|
"End" "Event" StatementTerminator |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
OperatorDeclaration = |
|
|
|
OperatorDeclaration = |
|
|
|
"Operator" ANY "(" ParameterList ")" [ "As" { AttributeBlock } TypeName ] EOL |
|
|
|
"Operator" ANY "(" ParameterList ")" [ "As" { AttributeBlock } TypeName ] |
|
|
|
Block |
|
|
|
StatementTerminatorAndBlock |
|
|
|
"End" "Operator" StatementTerminator |
|
|
|
"End" "Operator" StatementTerminator |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
@ -362,7 +362,7 @@ Parameter = |
|
|
|
{ AttributeBlock } { ParameterModifier } Identifier [ "As" TypeName ] [ "=" Expression ] |
|
|
|
{ AttributeBlock } { ParameterModifier } Identifier [ "As" TypeName ] [ "=" Expression ] |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
Block = |
|
|
|
StatementTerminatorAndBlock = |
|
|
|
(. PushContext(Context.Body, t); .) |
|
|
|
(. PushContext(Context.Body, t); .) |
|
|
|
StatementTerminator |
|
|
|
StatementTerminator |
|
|
|
{ [ Statement] StatementTerminator } |
|
|
|
{ [ Statement] StatementTerminator } |
|
|
|
@ -373,8 +373,7 @@ Expression = |
|
|
|
(. nextTokenIsPotentialStartOfXmlMode = true; .) |
|
|
|
(. nextTokenIsPotentialStartOfXmlMode = true; .) |
|
|
|
( |
|
|
|
( |
|
|
|
SimpleExpressionWithSuffix { BinaryOperator SimpleExpressionWithSuffix } |
|
|
|
SimpleExpressionWithSuffix { BinaryOperator SimpleExpressionWithSuffix } |
|
|
|
| NewExpression |
|
|
|
| ConditionalExpression |
|
|
|
//| ConditionalExpression |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
@ -396,7 +395,7 @@ SimpleExpressionWithSuffix = |
|
|
|
( |
|
|
|
( |
|
|
|
SimpleExpression { ExpressionSuffix } |
|
|
|
SimpleExpression { ExpressionSuffix } |
|
|
|
| "TypeOf" SimpleExpressionWithSuffix "Is" TypeName |
|
|
|
| "TypeOf" SimpleExpressionWithSuffix "Is" TypeName |
|
|
|
| CastExpression |
|
|
|
| NewExpression |
|
|
|
). |
|
|
|
). |
|
|
|
|
|
|
|
|
|
|
|
SimpleExpression = |
|
|
|
SimpleExpression = |
|
|
|
@ -408,6 +407,7 @@ SimpleExpression = |
|
|
|
| "GetType" "(" TypeName ")" |
|
|
|
| "GetType" "(" TypeName ")" |
|
|
|
| "GetXmlNamespace" "(" (. readXmlIdentifier = true; .) Identifier ")" |
|
|
|
| "GetXmlNamespace" "(" (. readXmlIdentifier = true; .) Identifier ")" |
|
|
|
| XmlLiteral |
|
|
|
| XmlLiteral |
|
|
|
|
|
|
|
| CastExpression |
|
|
|
) |
|
|
|
) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
@ -454,10 +454,9 @@ SimpleCastExpression = |
|
|
|
"(" Expression ")" |
|
|
|
"(" Expression ")" |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
ConditionalExpression = |
|
|
|
ConditionalExpression = |
|
|
|
"If" "(" Expression "," Expression [ "," Expression ] ")" |
|
|
|
"If" "(" Expression "," Expression [ "," Expression ] ")" |
|
|
|
.*/ |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
XmlLiteral = |
|
|
|
XmlLiteral = |
|
|
|
(. PushContext(Context.Xml, t); .) |
|
|
|
(. PushContext(Context.Xml, t); .) |
|
|
|
@ -516,6 +515,7 @@ Statement = |
|
|
|
| WithOrLockStatement |
|
|
|
| WithOrLockStatement |
|
|
|
| AddOrRemoveHandlerStatement |
|
|
|
| AddOrRemoveHandlerStatement |
|
|
|
| RaiseEventStatement |
|
|
|
| RaiseEventStatement |
|
|
|
|
|
|
|
| IfStatement |
|
|
|
| InvocationStatement |
|
|
|
| InvocationStatement |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
@ -524,7 +524,7 @@ VariableDeclarationStatement = |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
WithOrLockStatement = |
|
|
|
WithOrLockStatement = |
|
|
|
( "With" | "SyncLock" ) Expression StatementTerminator Block "End" ( "With" | "SyncLock" ) |
|
|
|
( "With" | "SyncLock" ) Expression StatementTerminatorAndBlock "End" ( "With" | "SyncLock" ) |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
AddOrRemoveHandlerStatement = |
|
|
|
AddOrRemoveHandlerStatement = |
|
|
|
@ -535,6 +535,27 @@ RaiseEventStatement = |
|
|
|
"RaiseEvent" IdentifierOrKeyword [ "(" [ ArgumentList ] ")" ] |
|
|
|
"RaiseEvent" IdentifierOrKeyword [ "(" [ ArgumentList ] ")" ] |
|
|
|
. |
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IfStatement = |
|
|
|
|
|
|
|
"If" Expression |
|
|
|
|
|
|
|
( "Then" |
|
|
|
|
|
|
|
( Statement { ":" Statement } [ "Else" Statement { ":" Statement } ] EOL |
|
|
|
|
|
|
|
| MultilineIfRest |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
| MultilineIfRest |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MultilineIfRest = |
|
|
|
|
|
|
|
StatementTerminatorAndBlock |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
("Else" [ "If" Expression [ "Then" ] ] |
|
|
|
|
|
|
|
| "ElseIf" Expression [ "Then" ] |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
StatementTerminatorAndBlock |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
"End" "If" |
|
|
|
|
|
|
|
. |
|
|
|
|
|
|
|
|
|
|
|
InvocationStatement = |
|
|
|
InvocationStatement = |
|
|
|
[ "Call" ] Expression |
|
|
|
[ "Call" ] Expression |
|
|
|
. |
|
|
|
. |
|
|
|
|