Browse Source

Implemented LambdaExpressions

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

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

@ -373,6 +373,8 @@ Expression =
( (
SimpleExpressionWithSuffix { BinaryOperator SimpleExpressionWithSuffix } SimpleExpressionWithSuffix { BinaryOperator SimpleExpressionWithSuffix }
| ConditionalExpression | ConditionalExpression
| LambdaExpression
// | QueryExpression
) )
. .
@ -455,6 +457,21 @@ ConditionalExpression =
"If" "(" Expression "," Expression [ "," Expression ] ")" "If" "(" Expression "," Expression [ "," Expression ] ")"
. .
LambdaExpression =
SubLambdaExpression |
FunctionLambdaExpression
.
SubLambdaExpression =
"Sub" [ "(" [ ParameterList ] ")" ]
( Statement | StatementTerminatorAndBlock "End" "Sub" )
.
FunctionLambdaExpression =
"Function" [ "(" [ ParameterList ] ")" ]
( Expression | [ "As" TypeName ] StatementTerminatorAndBlock "End" "Function" )
.
/* semantic action in front of = will be inserted on all paths that possibly lead to XmlLiteral */ /* semantic action in front of = will be inserted on all paths that possibly lead to XmlLiteral */
XmlLiteral XmlLiteral
(. nextTokenIsPotentialStartOfXmlMode = true; .) (. nextTokenIsPotentialStartOfXmlMode = true; .)

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

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