本文整理汇总了C#中ModifierList类的典型用法代码示例。如果您正苦于以下问题:C# ModifierList类的具体用法?C# ModifierList怎么用?C# ModifierList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModifierList类属于命名空间,在下文中一共展示了ModifierList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StructureBody
void StructureBody(
#line 548 "VBNET.ATG"
TypeDeclaration newType) {
#line 549 "VBNET.ATG"
AttributeSection section;
while (StartOf(7)) {
#line 551 "VBNET.ATG"
List<AttributeSection> attributes = new List<AttributeSection>();
ModifierList m = new ModifierList();
while (la.kind == 27) {
AttributeSection(
#line 554 "VBNET.ATG"
out section);
#line 554 "VBNET.ATG"
attributes.Add(section);
}
while (StartOf(8)) {
MemberModifier(
#line 555 "VBNET.ATG"
m);
}
StructureMemberDecl(
#line 556 "VBNET.ATG"
m, attributes);
}
Expect(88);
Expect(166);
#line 558 "VBNET.ATG"
newType.EndLocation = t.EndLocation;
Expect(1);
}
示例2: NamespaceMemberDecl
void NamespaceMemberDecl() {
//#line 361 "VBNET.ATG"
ModifierList m = new ModifierList();
AttributeSection section;
List<AttributeSection> attributes = new List<AttributeSection>();
string qualident;
if (la.kind == 160) {
lexer.NextToken();
//#line 368 "VBNET.ATG"
Location startPos = t.Location;
Qualident(
//#line 370 "VBNET.ATG"
out qualident);
//#line 372 "VBNET.ATG"
INode node = new NamespaceDeclaration(qualident);
node.StartLocation = startPos;
AddChild(node);
BlockStart(node);
EndOfStmt();
NamespaceBody();
//#line 380 "VBNET.ATG"
node.EndLocation = t.Location;
BlockEnd();
} else if (StartOf(2)) {
while (la.kind == 40) {
AttributeSection(
//#line 384 "VBNET.ATG"
out section);
//#line 384 "VBNET.ATG"
attributes.Add(section);
}
while (StartOf(3)) {
TypeModifier(
//#line 385 "VBNET.ATG"
m);
}
NonModuleDeclaration(
//#line 385 "VBNET.ATG"
m, attributes);
} else SynErr(245);
}
示例3: 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);
//.........这里部分代码省略.........
示例4: MemberModifier
void MemberModifier(
//#line 3720 "VBNET.ATG"
ModifierList m) {
switch (la.kind) {
case 156: {
lexer.NextToken();
//#line 3721 "VBNET.ATG"
m.Add(Modifiers.Abstract, t.Location);
break;
}
case 102: {
lexer.NextToken();
//#line 3722 "VBNET.ATG"
m.Add(Modifiers.Default, t.Location);
break;
}
case 125: {
lexer.NextToken();
//#line 3723 "VBNET.ATG"
m.Add(Modifiers.Internal, t.Location);
break;
}
case 199: {
lexer.NextToken();
//#line 3724 "VBNET.ATG"
m.Add(Modifiers.New, t.Location);
break;
}
case 181: {
lexer.NextToken();
//#line 3725 "VBNET.ATG"
m.Add(Modifiers.Override, t.Location);
break;
}
case 157: {
lexer.NextToken();
//#line 3726 "VBNET.ATG"
m.Add(Modifiers.Abstract, t.Location);
break;
}
case 185: {
lexer.NextToken();
//#line 3727 "VBNET.ATG"
m.Add(Modifiers.Private, t.Location);
break;
}
case 187: {
lexer.NextToken();
//#line 3728 "VBNET.ATG"
m.Add(Modifiers.Protected, t.Location);
break;
}
case 188: {
lexer.NextToken();
//#line 3729 "VBNET.ATG"
m.Add(Modifiers.Public, t.Location);
break;
}
case 166: {
lexer.NextToken();
//#line 3730 "VBNET.ATG"
m.Add(Modifiers.Sealed, t.Location);
break;
}
case 167: {
lexer.NextToken();
//#line 3731 "VBNET.ATG"
m.Add(Modifiers.Sealed, t.Location);
break;
}
case 200: {
lexer.NextToken();
//#line 3732 "VBNET.ATG"
m.Add(Modifiers.Static, t.Location);
break;
}
case 180: {
lexer.NextToken();
//#line 3733 "VBNET.ATG"
m.Add(Modifiers.Virtual, t.Location);
break;
}
case 179: {
lexer.NextToken();
//#line 3734 "VBNET.ATG"
m.Add(Modifiers.Overloads, t.Location);
//.........这里部分代码省略.........
示例5: 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);
//.........这里部分代码省略.........
示例6: ClassBody
void ClassBody(
#line 559 "VBNET.ATG"
TypeDeclaration newType) {
#line 560 "VBNET.ATG"
AttributeSection section;
while (la.kind == 1 || la.kind == 11) {
EndOfStmt();
}
while (StartOf(8)) {
#line 563 "VBNET.ATG"
List<AttributeSection> attributes = new List<AttributeSection>();
ModifierList m = new ModifierList();
while (la.kind == 28) {
AttributeSection(
#line 566 "VBNET.ATG"
out section);
#line 566 "VBNET.ATG"
attributes.Add(section);
}
while (StartOf(9)) {
MemberModifier(
#line 567 "VBNET.ATG"
m);
}
ClassMemberDecl(
#line 568 "VBNET.ATG"
m, attributes);
while (la.kind == 1 || la.kind == 11) {
EndOfStmt();
}
}
}
示例7: ModuleBody
void ModuleBody(
//#line 621 "VBNET.ATG"
TypeDeclaration newType) {
//#line 622 "VBNET.ATG"
AttributeSection section;
while (la.kind == 1 || la.kind == 21) {
EndOfStmt();
}
while (StartOf(9)) {
//#line 625 "VBNET.ATG"
List<AttributeSection> attributes = new List<AttributeSection>();
ModifierList m = new ModifierList();
while (la.kind == 40) {
AttributeSection(
//#line 628 "VBNET.ATG"
out section);
//#line 628 "VBNET.ATG"
attributes.Add(section);
}
while (StartOf(10)) {
MemberModifier(
//#line 629 "VBNET.ATG"
m);
}
ClassMemberDecl(
//#line 630 "VBNET.ATG"
m, attributes);
while (la.kind == 1 || la.kind == 21) {
EndOfStmt();
}
}
Expect(113);
Expect(155);
//#line 633 "VBNET.ATG"
newType.EndLocation = t.EndLocation;
EndOfStmt();
}
示例8: addAnnotation
public void addAnnotation(Char[] pAnnotationIdentifier)
{
StringBuilder sbModifierList =
new StringBuilder('@').Append(pAnnotationIdentifier);
ModifierList oldModifierList = getModifiers();
if (oldModifierList != null)
{
sbModifierList.Append(' ')
.Append(oldModifierList.getMarshaller().ToString());
}
List<String> errorMessages = new List<String>();
try
{
AST2ModifierList modifierList =
getUnmarshaller().unmarshalAST2ModifierList(
sbModifierList.ToString(), errorMessages);
if (modifierList != null)
{
// TODO After implementation of adding JSOMs to JSOMs:
// Check if error messages have been emitted by the parser.
ITree modifierListTree = modifierList.getTreeNode();
mModifierList = modifierList;
getTreeNode().SetChild(0, modifierListTree);
}
}
catch (JSourceUnmarshallerException jsue)
{
// TODO After implementation of adding JSOMs to JSOMs:
// Replace message by an internationalized message.
throw new JSourceObjectizerException(
"Parsing the modifier list '" + pAnnotationIdentifier +
"' failed.", jsue);
}
// Update the token stream.
// TODO After implementation of adding JSOMs to JSOMs:
// Move this stuff to 'AST2JSOM'.
TokenRewriteStream stream = getTokenRewriteStream();
sbModifierList.Remove(0, sbModifierList.Length);
sbModifierList.Append('@').Append(pAnnotationIdentifier)
.Append(' ');
stream.InsertBefore(
getTreeNode().TokenStartIndex, sbModifierList.ToString());
}
示例9: getModifiers
public ModifierList getModifiers()
{
if (!mHasModifier)
{
return null;
}
if (mModifierList == null)
{
mModifierList = new AST2ModifierList((AST2JSOMTree)
getTreeNode().GetChild(0), getTokenRewriteStream());
}
return mModifierList;
}
示例10: TypeModifier
void TypeModifier(
#line 2874 "VBNET.ATG"
ModifierList m) {
switch (la.kind) {
case 148: {
lexer.NextToken();
#line 2875 "VBNET.ATG"
m.Add(Modifiers.Public, t.Location);
break;
}
case 147: {
lexer.NextToken();
#line 2876 "VBNET.ATG"
m.Add(Modifiers.Protected, t.Location);
break;
}
case 99: {
lexer.NextToken();
#line 2877 "VBNET.ATG"
m.Add(Modifiers.Internal, t.Location);
break;
}
case 145: {
lexer.NextToken();
#line 2878 "VBNET.ATG"
m.Add(Modifiers.Private, t.Location);
break;
}
case 158: {
lexer.NextToken();
#line 2879 "VBNET.ATG"
m.Add(Modifiers.Static, t.Location);
break;
}
case 157: {
lexer.NextToken();
#line 2880 "VBNET.ATG"
m.Add(Modifiers.New, t.Location);
break;
}
case 122: {
lexer.NextToken();
#line 2881 "VBNET.ATG"
m.Add(Modifiers.Abstract, t.Location);
break;
}
case 131: {
lexer.NextToken();
#line 2882 "VBNET.ATG"
m.Add(Modifiers.Sealed, t.Location);
break;
}
case 204: {
lexer.NextToken();
#line 2883 "VBNET.ATG"
m.Add(Modifiers.Partial, t.Location);
break;
}
default: SynErr(214); break;
}
}
示例11: 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);
//.........这里部分代码省略.........
示例12: InterfaceMemberDecl
void InterfaceMemberDecl() {
#line 596 "VBNET.ATG"
TypeReference type =null;
List<ParameterDeclarationExpression> p = new List<ParameterDeclarationExpression>();
List<TemplateDefinition> templates = new List<TemplateDefinition>();
AttributeSection section, returnTypeAttributeSection = null;
ModifierList mod = new ModifierList();
List<AttributeSection> attributes = new List<AttributeSection>();
string name;
if (StartOf(18)) {
while (la.kind == 27) {
AttributeSection(
#line 604 "VBNET.ATG"
out section);
#line 604 "VBNET.ATG"
attributes.Add(section);
}
while (StartOf(8)) {
MemberModifier(
#line 607 "VBNET.ATG"
mod);
}
if (la.kind == 93) {
lexer.NextToken();
#line 611 "VBNET.ATG"
mod.Check(Modifiers.VBInterfaceEvents);
Location startLocation = t.Location;
Identifier();
#line 614 "VBNET.ATG"
name = t.val;
if (la.kind == 24) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
#line 615 "VBNET.ATG"
p);
}
Expect(25);
}
if (la.kind == 48) {
lexer.NextToken();
TypeName(
#line 616 "VBNET.ATG"
out type);
}
Expect(1);
#line 619 "VBNET.ATG"
EventDeclaration ed = new EventDeclaration {
Name = name, TypeReference = type, Modifier = mod.Modifier,
Parameters = p, Attributes = attributes,
StartLocation = startLocation, EndLocation = t.EndLocation
};
compilationUnit.AddChild(ed);
} else if (la.kind == 167) {
lexer.NextToken();
#line 629 "VBNET.ATG"
Location startLocation = t.Location;
mod.Check(Modifiers.VBInterfaceMethods);
Identifier();
#line 632 "VBNET.ATG"
name = t.val;
TypeParameterList(
#line 633 "VBNET.ATG"
templates);
if (la.kind == 24) {
lexer.NextToken();
if (StartOf(4)) {
FormalParameterList(
#line 634 "VBNET.ATG"
p);
}
Expect(25);
}
Expect(1);
#line 637 "VBNET.ATG"
MethodDeclaration md = new MethodDeclaration {
Name = name,
Modifier = mod.Modifier,
Parameters = p,
Attributes = attributes,
TypeReference = new TypeReference("", "System.Void"),
StartLocation = startLocation,
EndLocation = t.EndLocation,
Templates = templates
};
compilationUnit.AddChild(md);
} else if (la.kind == 100) {
//.........这里部分代码省略.........
示例13: 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);
//.........这里部分代码省略.........
示例14: MemberModifier
void MemberModifier(
#line 2886 "VBNET.ATG"
ModifierList m) {
switch (la.kind) {
case 122: {
lexer.NextToken();
#line 2887 "VBNET.ATG"
m.Add(Modifiers.Abstract, t.Location);
break;
}
case 79: {
lexer.NextToken();
#line 2888 "VBNET.ATG"
m.Add(Modifiers.Default, t.Location);
break;
}
case 99: {
lexer.NextToken();
#line 2889 "VBNET.ATG"
m.Add(Modifiers.Internal, t.Location);
break;
}
case 157: {
lexer.NextToken();
#line 2890 "VBNET.ATG"
m.Add(Modifiers.New, t.Location);
break;
}
case 142: {
lexer.NextToken();
#line 2891 "VBNET.ATG"
m.Add(Modifiers.Override, t.Location);
break;
}
case 123: {
lexer.NextToken();
#line 2892 "VBNET.ATG"
m.Add(Modifiers.Abstract, t.Location);
break;
}
case 145: {
lexer.NextToken();
#line 2893 "VBNET.ATG"
m.Add(Modifiers.Private, t.Location);
break;
}
case 147: {
lexer.NextToken();
#line 2894 "VBNET.ATG"
m.Add(Modifiers.Protected, t.Location);
break;
}
case 148: {
lexer.NextToken();
#line 2895 "VBNET.ATG"
m.Add(Modifiers.Public, t.Location);
break;
}
case 131: {
lexer.NextToken();
#line 2896 "VBNET.ATG"
m.Add(Modifiers.Sealed, t.Location);
break;
}
case 132: {
lexer.NextToken();
#line 2897 "VBNET.ATG"
m.Add(Modifiers.Sealed, t.Location);
break;
}
case 158: {
lexer.NextToken();
#line 2898 "VBNET.ATG"
m.Add(Modifiers.Static, t.Location);
break;
}
case 141: {
lexer.NextToken();
#line 2899 "VBNET.ATG"
m.Add(Modifiers.Virtual, t.Location);
break;
}
case 140: {
lexer.NextToken();
#line 2900 "VBNET.ATG"
m.Add(Modifiers.Overloads, t.Location);
//.........这里部分代码省略.........
示例15: 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);
//.........这里部分代码省略.........