]
"("
+ [ "this" (. isExtensionMethod = true; /* C# 3.0 */ .) ]
[ FormalParameterList ] ")"
(. MethodDeclaration methodDeclaration = new MethodDeclaration(qualident,
m.Modifier,
@@ -745,6 +760,7 @@ StructMemberDecl attributes>
methodDeclaration.StartLocation = m.GetDeclarationLocation(startPos);
methodDeclaration.EndLocation = t.EndLocation;
methodDeclaration.Templates = templates;
+ methodDeclaration.IsExtensionMethod = isExtensionMethod;
if (explicitInterface != null)
methodDeclaration.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident));
compilationUnit.AddChild(methodDeclaration);
@@ -752,7 +768,7 @@ StructMemberDecl attributes>
.)
/* .NET 2.0 */
- { IF (IdentIsWhere()) TypeParameterConstraintsClause }
+ { TypeParameterConstraintsClause }
( Block | ";" ) (. compilationUnit.BlockEnd();
methodDeclaration.Body = (BlockStatement)stmt;
@@ -772,7 +788,7 @@ StructMemberDecl attributes>
(. qualident = TypeReference.StripLastIdentifierFromType(ref explicitInterface); .)
(. eventDecl.InterfaceImplementations.Add(new InterfaceImplementation(explicitInterface, qualident)); .)
- | ident (. qualident = t.val; .)
+ | Identifier (. qualident = t.val; .)
)
(. eventDecl.Name = qualident; eventDecl.EndLocation = t.EndLocation; .)
[ "=" Expr (. eventDecl.Initializer = expr; .) ]
@@ -788,7 +804,7 @@ StructMemberDecl attributes>
| /*--- constructor or static contructor declaration: */
IF (IdentAndLPar()) (. m.Check(Modifiers.Constructors | Modifiers.StaticConstructors); .)
- ident (. string name = t.val; Location startPos = t.Location; .) "(" [ (. m.Check(Modifiers.Constructors); .)
+ Identifier (. string name = t.val; Location startPos = t.Location; .) "(" [ (. m.Check(Modifiers.Constructors); .)
FormalParameterList
]
")" (.ConstructorInitializer init = null; .)
@@ -810,7 +826,7 @@ StructMemberDecl attributes>
.)
( "implicit" (. startPos = t.Location; .) | "explicit" (. isImplicit = false; startPos = t.Location; .) )
"operator" Type (. TypeReference operatorType = type; .)
- "(" Type ident (. string varName = t.val; .) ")"
+ "(" Type Identifier (. string varName = t.val; .) ")"
(. Location endPos = t.Location; .)
( Block | ";" (. stmt = null; .) )
(.
@@ -840,8 +856,8 @@ StructMemberDecl attributes>
if (m.isNone) Error("at least one modifier must be set");
.)
"operator" OverloadableOperator (. TypeReference firstType, secondType = null; string secondName = null; .)
- "(" Type ident (. string firstName = t.val; .)
- ( "," Type