Browse Source

implemented LoopStatements

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/vbnet@5973 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Siegfried Pammer 16 years ago
parent
commit
44a6852425
  1. 42
      src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg
  2. 1237
      src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.cs

42
src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/ExpressionFinder.atg

@ -517,6 +517,9 @@ Statement = @@ -517,6 +517,9 @@ Statement =
| RaiseEventStatement
| IfStatement
| SelectStatement
| WhileStatement
| DoLoopStatement
| ForStatement
| InvocationStatement
.
@ -574,6 +577,45 @@ ComparisonOperator = @@ -574,6 +577,45 @@ ComparisonOperator =
"=" | "<>" | "<" | ">" | ">=" | "<="
.
WhileStatement =
"While" Expression StatementTerminatorAndBlock "End" "While"
.
DoLoopStatement =
"Do" ( DoTopLoopStatement | DoBottomLoopStatement )
.
DoTopLoopStatement =
( "While" | "Until" ) Expression
StatementTerminatorAndBlock
"Loop"
.
DoBottomLoopStatement =
StatementTerminatorAndBlock
"Loop" [ ( "While" | "Until" ) Expression ]
.
ForStatement =
"For" ( ForLoopStatement | ForEachLoopStatement )
.
ForLoopStatement =
ForLoopVariable "=" Expression /* "To" is binary operator */ [ "Step" Expression ]
StatementTerminatorAndBlock
"Next" [ Expression { "," Expression } ]
.
ForEachLoopStatement =
"Each" ForLoopVariable "In" Expression
StatementTerminatorAndBlock
"Next" [ Expression { "," Expression } ]
.
ForLoopVariable =
SimpleExpression [ "?" ] { ExpressionSuffix }
.
InvocationStatement =
[ "Call" ] Expression
.

1237
src/Libraries/NRefactory/Project/Src/Parser/VBNet/Experimental/Parser.cs

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save