本文整理汇总了C#中ModifierList.GetDeclarationLocation方法的典型用法代码示例。如果您正苦于以下问题:C# ModifierList.GetDeclarationLocation方法的具体用法?C# ModifierList.GetDeclarationLocation怎么用?C# ModifierList.GetDeclarationLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModifierList
的用法示例。
在下文中一共展示了ModifierList.GetDeclarationLocation方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NonModuleDeclaration
void NonModuleDeclaration(
//#line 455 "VBNET.ATG"
ModifierList m, List<AttributeSection> attributes) {
//#line 457 "VBNET.ATG"
TypeReference typeRef = null;
List<TypeReference> baseInterfaces = null;
switch (la.kind) {
case 84: {
//#line 460 "VBNET.ATG"
m.Check(Modifiers.Classes);
lexer.NextToken();
//#line 463 "VBNET.ATG"
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
newType.StartLocation = t.Location;
AddChild(newType);
BlockStart(newType);
newType.Type = ClassType.Class;
Identifier();
//#line 470 "VBNET.ATG"
newType.Name = t.val;
TypeParameterList(
//#line 471 "VBNET.ATG"
newType.Templates);
EndOfStmt();
//#line 473 "VBNET.ATG"
newType.BodyStartLocation = t.Location;
if (la.kind == 140) {
ClassBaseType(
//#line 474 "VBNET.ATG"
out typeRef);
//#line 474 "VBNET.ATG"
SafeAdd(newType, newType.BaseTypes, typeRef);
}
while (la.kind == 136) {
TypeImplementsClause(
//#line 475 "VBNET.ATG"
out baseInterfaces);
//#line 475 "VBNET.ATG"
newType.BaseTypes.AddRange(baseInterfaces);
}
ClassBody(
//#line 476 "VBNET.ATG"
newType);
Expect(113);
Expect(84);
//#line 477 "VBNET.ATG"
newType.EndLocation = t.EndLocation;
EndOfStmt();
//#line 480 "VBNET.ATG"
BlockEnd();
break;
}
case 155: {
lexer.NextToken();
//#line 484 "VBNET.ATG"
m.Check(Modifiers.VBModules);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
AddChild(newType);
BlockStart(newType);
newType.StartLocation = m.GetDeclarationLocation(t.Location);
newType.Type = ClassType.Module;
Identifier();
//#line 491 "VBNET.ATG"
newType.Name = t.val;
EndOfStmt();
//#line 493 "VBNET.ATG"
newType.BodyStartLocation = t.Location;
ModuleBody(
//#line 494 "VBNET.ATG"
newType);
//#line 496 "VBNET.ATG"
BlockEnd();
break;
}
case 209: {
lexer.NextToken();
//#line 500 "VBNET.ATG"
m.Check(Modifiers.VBStructures);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
AddChild(newType);
//.........这里部分代码省略.........
示例2: NonModuleDeclaration
void NonModuleDeclaration(
#line 424 "VBNET.ATG"
ModifierList m, List<AttributeSection> attributes) {
#line 426 "VBNET.ATG"
TypeReference typeRef = null;
List<TypeReference> baseInterfaces = null;
switch (la.kind) {
case 71: {
#line 429 "VBNET.ATG"
m.Check(Modifiers.Classes);
lexer.NextToken();
#line 432 "VBNET.ATG"
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
newType.StartLocation = t.Location;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.Type = ClassType.Class;
Identifier();
#line 439 "VBNET.ATG"
newType.Name = t.val;
TypeParameterList(
#line 440 "VBNET.ATG"
newType.Templates);
EndOfStmt();
#line 442 "VBNET.ATG"
newType.BodyStartLocation = t.Location;
if (la.kind == 127) {
ClassBaseType(
#line 443 "VBNET.ATG"
out typeRef);
#line 443 "VBNET.ATG"
SafeAdd(newType, newType.BaseTypes, typeRef);
}
while (la.kind == 123) {
TypeImplementsClause(
#line 444 "VBNET.ATG"
out baseInterfaces);
#line 444 "VBNET.ATG"
newType.BaseTypes.AddRange(baseInterfaces);
}
ClassBody(
#line 445 "VBNET.ATG"
newType);
Expect(100);
Expect(71);
#line 446 "VBNET.ATG"
newType.EndLocation = t.EndLocation;
EndOfStmt();
#line 449 "VBNET.ATG"
compilationUnit.BlockEnd();
break;
}
case 141: {
lexer.NextToken();
#line 453 "VBNET.ATG"
m.Check(Modifiers.VBModules);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.StartLocation = m.GetDeclarationLocation(t.Location);
newType.Type = ClassType.Module;
Identifier();
#line 460 "VBNET.ATG"
newType.Name = t.val;
EndOfStmt();
#line 462 "VBNET.ATG"
newType.BodyStartLocation = t.Location;
ModuleBody(
#line 463 "VBNET.ATG"
newType);
#line 465 "VBNET.ATG"
compilationUnit.BlockEnd();
break;
}
case 194: {
lexer.NextToken();
#line 469 "VBNET.ATG"
m.Check(Modifiers.VBStructures);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
compilationUnit.AddChild(newType);
//.........这里部分代码省略.........
示例3: StructureMemberDecl
void StructureMemberDecl(
//#line 807 "VBNET.ATG"
ModifierList m, List<AttributeSection> attributes) {
//#line 809 "VBNET.ATG"
TypeReference type = null;
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
Statement stmt = null;
List<VariableDeclaration> variableDeclarators = new List<VariableDeclaration>();
List<TemplateDefinition> templates = new List<TemplateDefinition>();
switch (la.kind) {
case 84: case 103: case 115: case 142: case 155: case 209: {
NonModuleDeclaration(
//#line 816 "VBNET.ATG"
m, attributes);
break;
}
case 210: {
lexer.NextToken();
//#line 820 "VBNET.ATG"
Location startPos = t.Location;
if (StartOf(4)) {
//#line 824 "VBNET.ATG"
string name = String.Empty;
MethodDeclaration methodDeclaration; List<string> handlesClause = null;
List<InterfaceImplementation> implementsClause = null;
Identifier();
//#line 830 "VBNET.ATG"
name = t.val;
m.Check(Modifiers.VBMethods);
TypeParameterList(
//#line 833 "VBNET.ATG"
templates);
if (la.kind == 37) {
lexer.NextToken();
if (StartOf(6)) {
FormalParameterList(
//#line 834 "VBNET.ATG"
p);
}
Expect(38);
}
if (la.kind == 134 || la.kind == 136) {
if (la.kind == 136) {
ImplementsClause(
//#line 837 "VBNET.ATG"
out implementsClause);
} else {
HandlesClause(
//#line 839 "VBNET.ATG"
out handlesClause);
}
}
//#line 842 "VBNET.ATG"
Location endLocation = t.EndLocation;
if (
//#line 845 "VBNET.ATG"
IsMustOverride(m)) {
EndOfStmt();
//#line 848 "VBNET.ATG"
methodDeclaration = new MethodDeclaration {
Name = name, Modifier = m.Modifier, Parameters = p, Attributes = attributes,
StartLocation = m.GetDeclarationLocation(startPos), EndLocation = endLocation,
TypeReference = new TypeReference("System.Void", true),
Templates = templates,
HandlesClause = handlesClause,
InterfaceImplementations = implementsClause
};
AddChild(methodDeclaration);
} else if (la.kind == 1) {
lexer.NextToken();
//#line 861 "VBNET.ATG"
methodDeclaration = new MethodDeclaration {
Name = name, Modifier = m.Modifier, Parameters = p, Attributes = attributes,
StartLocation = m.GetDeclarationLocation(startPos), EndLocation = endLocation,
TypeReference = new TypeReference("System.Void", true),
Templates = templates,
HandlesClause = handlesClause,
InterfaceImplementations = implementsClause
};
AddChild(methodDeclaration);
//#line 872 "VBNET.ATG"
if (ParseMethodBodies) {
Block(
//#line 873 "VBNET.ATG"
out stmt);
Expect(113);
//.........这里部分代码省略.........
示例4: NonModuleDeclaration
void NonModuleDeclaration(
#line 405 "VBNET.ATG"
ModifierList m, List<AttributeSection> attributes) {
#line 407 "VBNET.ATG"
TypeReference typeRef = null;
List<TypeReference> baseInterfaces = null;
switch (la.kind) {
case 67: {
#line 410 "VBNET.ATG"
m.Check(Modifiers.Classes);
lexer.NextToken();
#line 413 "VBNET.ATG"
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
newType.StartLocation = t.Location;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.Type = ClassType.Class;
Identifier();
#line 420 "VBNET.ATG"
newType.Name = t.val;
TypeParameterList(
#line 421 "VBNET.ATG"
newType.Templates);
EndOfStmt();
#line 423 "VBNET.ATG"
newType.BodyStartLocation = t.Location;
if (la.kind == 110) {
ClassBaseType(
#line 424 "VBNET.ATG"
out typeRef);
#line 424 "VBNET.ATG"
newType.BaseTypes.Add(typeRef);
}
while (la.kind == 107) {
TypeImplementsClause(
#line 425 "VBNET.ATG"
out baseInterfaces);
#line 425 "VBNET.ATG"
newType.BaseTypes.AddRange(baseInterfaces);
}
ClassBody(
#line 426 "VBNET.ATG"
newType);
Expect(88);
Expect(67);
#line 427 "VBNET.ATG"
newType.EndLocation = t.EndLocation;
Expect(1);
#line 430 "VBNET.ATG"
compilationUnit.BlockEnd();
break;
}
case 121: {
lexer.NextToken();
#line 434 "VBNET.ATG"
m.Check(Modifiers.VBModules);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.StartLocation = m.GetDeclarationLocation(t.Location);
newType.Type = ClassType.Module;
Identifier();
#line 441 "VBNET.ATG"
newType.Name = t.val;
Expect(1);
#line 443 "VBNET.ATG"
newType.BodyStartLocation = t.Location;
ModuleBody(
#line 444 "VBNET.ATG"
newType);
#line 446 "VBNET.ATG"
compilationUnit.BlockEnd();
break;
}
case 166: {
lexer.NextToken();
#line 450 "VBNET.ATG"
m.Check(Modifiers.VBStructures);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
compilationUnit.AddChild(newType);
//.........这里部分代码省略.........
示例5: StructureMemberDecl
void StructureMemberDecl(
#line 775 "VBNET.ATG"
ModifierList m, List<AttributeSection> attributes) {
#line 777 "VBNET.ATG"
TypeReference type = null;
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
Statement stmt = null;
List<VariableDeclaration> variableDeclarators = new List<VariableDeclaration>();
List<TemplateDefinition> templates = new List<TemplateDefinition>();
switch (la.kind) {
case 71: case 90: case 102: case 129: case 141: case 194: {
NonModuleDeclaration(
#line 784 "VBNET.ATG"
m, attributes);
break;
}
case 195: {
lexer.NextToken();
#line 788 "VBNET.ATG"
Location startPos = t.Location;
if (StartOf(14)) {
#line 792 "VBNET.ATG"
string name = String.Empty;
MethodDeclaration methodDeclaration; List<string> handlesClause = null;
List<InterfaceImplementation> implementsClause = null;
Identifier();
#line 798 "VBNET.ATG"
name = t.val;
m.Check(Modifiers.VBMethods);
TypeParameterList(
#line 801 "VBNET.ATG"
templates);
if (la.kind == 25) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
#line 802 "VBNET.ATG"
p);
}
Expect(26);
}
if (la.kind == 121 || la.kind == 123) {
if (la.kind == 123) {
ImplementsClause(
#line 805 "VBNET.ATG"
out implementsClause);
} else {
HandlesClause(
#line 807 "VBNET.ATG"
out handlesClause);
}
}
#line 810 "VBNET.ATG"
Location endLocation = t.EndLocation;
if (
#line 813 "VBNET.ATG"
IsMustOverride(m)) {
EndOfStmt();
#line 816 "VBNET.ATG"
methodDeclaration = new MethodDeclaration {
Name = name, Modifier = m.Modifier, Parameters = p, Attributes = attributes,
StartLocation = m.GetDeclarationLocation(startPos), EndLocation = endLocation,
TypeReference = new TypeReference("System.Void", true),
Templates = templates,
HandlesClause = handlesClause,
InterfaceImplementations = implementsClause
};
compilationUnit.AddChild(methodDeclaration);
} else if (la.kind == 1) {
lexer.NextToken();
#line 829 "VBNET.ATG"
methodDeclaration = new MethodDeclaration {
Name = name, Modifier = m.Modifier, Parameters = p, Attributes = attributes,
StartLocation = m.GetDeclarationLocation(startPos), EndLocation = endLocation,
TypeReference = new TypeReference("System.Void", true),
Templates = templates,
HandlesClause = handlesClause,
InterfaceImplementations = implementsClause
};
compilationUnit.AddChild(methodDeclaration);
#line 840 "VBNET.ATG"
if (ParseMethodBodies) {
Block(
#line 841 "VBNET.ATG"
out stmt);
Expect(100);
//.........这里部分代码省略.........
示例6: StructureMemberDecl
void StructureMemberDecl(
#line 737 "VBNET.ATG"
ModifierList m, List<AttributeSection> attributes) {
#line 739 "VBNET.ATG"
TypeReference type = null;
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
Statement stmt = null;
List<VariableDeclaration> variableDeclarators = new List<VariableDeclaration>();
List<TemplateDefinition> templates = new List<TemplateDefinition>();
switch (la.kind) {
case 67: case 80: case 90: case 112: case 121: case 166: {
NonModuleDeclaration(
#line 746 "VBNET.ATG"
m, attributes);
break;
}
case 167: {
lexer.NextToken();
#line 750 "VBNET.ATG"
Location startPos = t.Location;
if (StartOf(13)) {
#line 754 "VBNET.ATG"
string name = String.Empty;
MethodDeclaration methodDeclaration; List<string> handlesClause = null;
List<InterfaceImplementation> implementsClause = null;
Identifier();
#line 760 "VBNET.ATG"
name = t.val;
m.Check(Modifiers.VBMethods);
TypeParameterList(
#line 763 "VBNET.ATG"
templates);
if (la.kind == 24) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
#line 764 "VBNET.ATG"
p);
}
Expect(25);
}
if (la.kind == 105 || la.kind == 107) {
if (la.kind == 107) {
ImplementsClause(
#line 767 "VBNET.ATG"
out implementsClause);
} else {
HandlesClause(
#line 769 "VBNET.ATG"
out handlesClause);
}
}
#line 772 "VBNET.ATG"
Location endLocation = t.EndLocation;
Expect(1);
if (
#line 776 "VBNET.ATG"
IsMustOverride(m)) {
#line 778 "VBNET.ATG"
methodDeclaration = new MethodDeclaration {
Name = name, Modifier = m.Modifier, Parameters = p, Attributes = attributes,
StartLocation = m.GetDeclarationLocation(startPos), EndLocation = endLocation,
TypeReference = new TypeReference("", "System.Void"),
Templates = templates,
HandlesClause = handlesClause,
InterfaceImplementations = implementsClause
};
compilationUnit.AddChild(methodDeclaration);
} else if (StartOf(14)) {
#line 790 "VBNET.ATG"
methodDeclaration = new MethodDeclaration {
Name = name, Modifier = m.Modifier, Parameters = p, Attributes = attributes,
StartLocation = m.GetDeclarationLocation(startPos), EndLocation = endLocation,
TypeReference = new TypeReference("", "System.Void"),
Templates = templates,
HandlesClause = handlesClause,
InterfaceImplementations = implementsClause
};
compilationUnit.AddChild(methodDeclaration);
#line 801 "VBNET.ATG"
if (ParseMethodBodies) {
Block(
#line 802 "VBNET.ATG"
out stmt);
Expect(88);
Expect(167);
//.........这里部分代码省略.........
示例7: NonModuleDeclaration
void NonModuleDeclaration(
#line 459 "VBNET.ATG"
ModifierList m, List<AttributeSection> attributes) {
#line 461 "VBNET.ATG"
TypeReference typeRef = null;
List<TypeReference> baseInterfaces = null;
switch (la.kind) {
case 86: {
#line 464 "VBNET.ATG"
m.Check(Modifiers.Classes);
lexer.NextToken();
#line 467 "VBNET.ATG"
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
newType.StartLocation = t.Location;
AddChild(newType);
BlockStart(newType);
newType.Type = ClassType.Class;
Identifier();
#line 474 "VBNET.ATG"
newType.Name = t.val;
TypeParameterList(
#line 475 "VBNET.ATG"
newType.Templates);
EndOfStmt();
#line 477 "VBNET.ATG"
newType.BodyStartLocation = t.Location;
if (la.kind == 142) {
ClassBaseType(
#line 478 "VBNET.ATG"
out typeRef);
#line 478 "VBNET.ATG"
SafeAdd(newType, newType.BaseTypes, typeRef);
}
while (la.kind == 138) {
TypeImplementsClause(
#line 479 "VBNET.ATG"
out baseInterfaces);
#line 479 "VBNET.ATG"
newType.BaseTypes.AddRange(baseInterfaces);
}
ClassBody(
#line 480 "VBNET.ATG"
newType);
Expect(115);
Expect(86);
#line 481 "VBNET.ATG"
newType.EndLocation = t.EndLocation;
EndOfStmt();
#line 484 "VBNET.ATG"
BlockEnd();
break;
}
case 158: {
lexer.NextToken();
#line 488 "VBNET.ATG"
m.Check(Modifiers.VBModules);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
AddChild(newType);
BlockStart(newType);
newType.StartLocation = m.GetDeclarationLocation(t.Location);
newType.Type = ClassType.Module;
Identifier();
#line 495 "VBNET.ATG"
newType.Name = t.val;
EndOfStmt();
#line 497 "VBNET.ATG"
newType.BodyStartLocation = t.Location;
ModuleBody(
#line 498 "VBNET.ATG"
newType);
#line 500 "VBNET.ATG"
BlockEnd();
break;
}
case 212: {
lexer.NextToken();
#line 504 "VBNET.ATG"
m.Check(Modifiers.VBStructures);
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
AddChild(newType);
//.........这里部分代码省略.........
示例8: TypeDecl
void TypeDecl(
#line 359 "cs.ATG"
ModifierList m, List<AttributeSection> attributes) {
#line 361 "cs.ATG"
TypeReference type;
List<TypeReference> names;
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
string name;
List<TemplateDefinition> templates;
if (la.kind == 59) {
#line 367 "cs.ATG"
m.Check(Modifiers.Classes);
lexer.NextToken();
#line 368 "cs.ATG"
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
templates = newType.Templates;
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.StartLocation = m.GetDeclarationLocation(t.Location);
newType.Type = Types.Class;
Identifier();
#line 376 "cs.ATG"
newType.Name = t.val;
if (la.kind == 23) {
TypeParameterList(
#line 379 "cs.ATG"
templates);
}
if (la.kind == 9) {
ClassBase(
#line 381 "cs.ATG"
out names);
#line 381 "cs.ATG"
newType.BaseTypes = names;
}
while (la.kind == 127) {
TypeParameterConstraintsClause(
#line 384 "cs.ATG"
templates);
}
#line 386 "cs.ATG"
newType.BodyStartLocation = t.EndLocation;
Expect(16);
ClassBody();
Expect(17);
if (la.kind == 11) {
lexer.NextToken();
}
#line 390 "cs.ATG"
newType.EndLocation = t.Location;
compilationUnit.BlockEnd();
} else if (StartOf(9)) {
#line 393 "cs.ATG"
m.Check(Modifiers.StructsInterfacesEnumsDelegates);
if (la.kind == 109) {
lexer.NextToken();
#line 394 "cs.ATG"
TypeDeclaration newType = new TypeDeclaration(m.Modifier, attributes);
templates = newType.Templates;
newType.StartLocation = m.GetDeclarationLocation(t.Location);
compilationUnit.AddChild(newType);
compilationUnit.BlockStart(newType);
newType.Type = Types.Struct;
Identifier();
#line 401 "cs.ATG"
newType.Name = t.val;
if (la.kind == 23) {
TypeParameterList(
#line 404 "cs.ATG"
templates);
}
if (la.kind == 9) {
StructInterfaces(
#line 406 "cs.ATG"
out names);
#line 406 "cs.ATG"
newType.BaseTypes = names;
}
while (la.kind == 127) {
TypeParameterConstraintsClause(
#line 409 "cs.ATG"
templates);
}
//.........这里部分代码省略.........
示例9: StructMemberDecl
void StructMemberDecl(
#line 748 "cs.ATG"
ModifierList m, List<AttributeSection> attributes) {
#line 750 "cs.ATG"
string qualident = null;
TypeReference type;
Expression expr;
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
Statement stmt = null;
List<TemplateDefinition> templates = new List<TemplateDefinition>();
TypeReference explicitInterface = null;
bool isExtensionMethod = false;
if (la.kind == 60) {
#line 760 "cs.ATG"
m.Check(Modifiers.Constants);
lexer.NextToken();
#line 761 "cs.ATG"
Location startPos = t.Location;
Type(
#line 762 "cs.ATG"
out type);
Identifier();
#line 762 "cs.ATG"
FieldDeclaration fd = new FieldDeclaration(attributes, type, m.Modifier | Modifiers.Const);
fd.StartLocation = m.GetDeclarationLocation(startPos);
VariableDeclaration f = new VariableDeclaration(t.val);
f.StartLocation = t.Location;
f.TypeReference = type;
SafeAdd(fd, fd.Fields, f);
Expect(3);
Expr(
#line 769 "cs.ATG"
out expr);
#line 769 "cs.ATG"
f.Initializer = expr;
while (la.kind == 14) {
lexer.NextToken();
Identifier();
#line 770 "cs.ATG"
f = new VariableDeclaration(t.val);
f.StartLocation = t.Location;
f.TypeReference = type;
SafeAdd(fd, fd.Fields, f);
Expect(3);
Expr(
#line 775 "cs.ATG"
out expr);
#line 775 "cs.ATG"
f.EndLocation = t.EndLocation; f.Initializer = expr;
}
Expect(11);
#line 776 "cs.ATG"
fd.EndLocation = t.EndLocation; compilationUnit.AddChild(fd);
} else if (
#line 780 "cs.ATG"
NotVoidPointer()) {
#line 780 "cs.ATG"
m.Check(Modifiers.PropertysEventsMethods);
Expect(123);
#line 781 "cs.ATG"
Location startPos = t.Location;
if (
#line 782 "cs.ATG"
IsExplicitInterfaceImplementation()) {
TypeName(
#line 783 "cs.ATG"
out explicitInterface, false);
#line 784 "cs.ATG"
if (la.kind != Tokens.Dot || Peek(1).kind != Tokens.This) {
qualident = TypeReference.StripLastIdentifierFromType(ref explicitInterface);
}
} else if (StartOf(19)) {
Identifier();
#line 787 "cs.ATG"
qualident = t.val;
} else SynErr(162);
if (la.kind == 23) {
TypeParameterList(
#line 790 "cs.ATG"
templates);
}
Expect(20);
if (la.kind == 111) {
lexer.NextToken();
//.........这里部分代码省略.........
示例10: ClassMemberDecl
void ClassMemberDecl(
#line 1054 "cs.ATG"
ModifierList m, List<AttributeSection> attributes) {
#line 1055 "cs.ATG"
Statement stmt = null;
if (StartOf(21)) {
StructMemberDecl(
#line 1057 "cs.ATG"
m, attributes);
} else if (la.kind == 27) {
#line 1058 "cs.ATG"
m.Check(Modifiers.Destructors); Location startPos = la.Location;
lexer.NextToken();
Identifier();
#line 1059 "cs.ATG"
DestructorDeclaration d = new DestructorDeclaration(t.val, m.Modifier, attributes);
d.Modifier = m.Modifier;
d.StartLocation = m.GetDeclarationLocation(startPos);
Expect(20);
Expect(21);
#line 1063 "cs.ATG"
d.EndLocation = t.EndLocation;
if (la.kind == 16) {
Block(
#line 1063 "cs.ATG"
out stmt);
} else if (la.kind == 11) {
lexer.NextToken();
} else SynErr(160);
#line 1064 "cs.ATG"
d.Body = (BlockStatement)stmt;
compilationUnit.AddChild(d);
} else SynErr(161);
}