本文整理汇总了C#中ICSharpCode.NRefactory.Parser.ModifierList.Add方法的典型用法代码示例。如果您正苦于以下问题:C# ModifierList.Add方法的具体用法?C# ModifierList.Add怎么用?C# ModifierList.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICSharpCode.NRefactory.Parser.ModifierList
的用法示例。
在下文中一共展示了ModifierList.Add方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TypeModifier
void TypeModifier(
#line 695 "cs.ATG"
ModifierList m) {
switch (la.kind) {
case 89: {
lexer.NextToken();
#line 697 "cs.ATG"
m.Add(Modifiers.New, t.Location);
break;
}
case 98: {
lexer.NextToken();
#line 698 "cs.ATG"
m.Add(Modifiers.Public, t.Location);
break;
}
case 97: {
lexer.NextToken();
#line 699 "cs.ATG"
m.Add(Modifiers.Protected, t.Location);
break;
}
case 84: {
lexer.NextToken();
#line 700 "cs.ATG"
m.Add(Modifiers.Internal, t.Location);
break;
}
case 96: {
lexer.NextToken();
#line 701 "cs.ATG"
m.Add(Modifiers.Private, t.Location);
break;
}
case 119: {
lexer.NextToken();
#line 702 "cs.ATG"
m.Add(Modifiers.Unsafe, t.Location);
break;
}
case 49: {
lexer.NextToken();
#line 703 "cs.ATG"
m.Add(Modifiers.Abstract, t.Location);
break;
}
case 103: {
lexer.NextToken();
#line 704 "cs.ATG"
m.Add(Modifiers.Sealed, t.Location);
break;
}
case 107: {
lexer.NextToken();
#line 705 "cs.ATG"
m.Add(Modifiers.Static, t.Location);
break;
}
case 126: {
lexer.NextToken();
#line 706 "cs.ATG"
m.Add(Modifiers.Partial, t.Location);
break;
}
default: SynErr(153); break;
}
}
示例2: MemberModifiers
void MemberModifiers(
#line 730 "cs.ATG"
ModifierList m) {
while (StartOf(19)) {
switch (la.kind) {
case 49: {
lexer.NextToken();
#line 733 "cs.ATG"
m.Add(Modifiers.Abstract, t.Location);
break;
}
case 71: {
lexer.NextToken();
#line 734 "cs.ATG"
m.Add(Modifiers.Extern, t.Location);
break;
}
case 84: {
lexer.NextToken();
#line 735 "cs.ATG"
m.Add(Modifiers.Internal, t.Location);
break;
}
case 89: {
lexer.NextToken();
#line 736 "cs.ATG"
m.Add(Modifiers.New, t.Location);
break;
}
case 94: {
lexer.NextToken();
#line 737 "cs.ATG"
m.Add(Modifiers.Override, t.Location);
break;
}
case 96: {
lexer.NextToken();
#line 738 "cs.ATG"
m.Add(Modifiers.Private, t.Location);
break;
}
case 97: {
lexer.NextToken();
#line 739 "cs.ATG"
m.Add(Modifiers.Protected, t.Location);
break;
}
case 98: {
lexer.NextToken();
#line 740 "cs.ATG"
m.Add(Modifiers.Public, t.Location);
break;
}
case 99: {
lexer.NextToken();
#line 741 "cs.ATG"
m.Add(Modifiers.ReadOnly, t.Location);
break;
}
case 103: {
lexer.NextToken();
#line 742 "cs.ATG"
m.Add(Modifiers.Sealed, t.Location);
break;
}
case 107: {
lexer.NextToken();
#line 743 "cs.ATG"
m.Add(Modifiers.Static, t.Location);
break;
}
case 74: {
lexer.NextToken();
#line 744 "cs.ATG"
m.Add(Modifiers.Fixed, t.Location);
break;
}
case 119: {
lexer.NextToken();
#line 745 "cs.ATG"
m.Add(Modifiers.Unsafe, t.Location);
break;
}
case 122: {
lexer.NextToken();
#line 746 "cs.ATG"
//.........这里部分代码省略.........
示例3: AccessorModifiers
void AccessorModifiers(
#line 685 "cs.ATG"
out ModifierList m) {
#line 686 "cs.ATG"
m = new ModifierList();
if (la.kind == 96) {
lexer.NextToken();
#line 688 "cs.ATG"
m.Add(Modifiers.Private, t.Location);
} else if (la.kind == 97) {
lexer.NextToken();
#line 689 "cs.ATG"
m.Add(Modifiers.Protected, t.Location);
if (la.kind == 84) {
lexer.NextToken();
#line 690 "cs.ATG"
m.Add(Modifiers.Internal, t.Location);
}
} else if (la.kind == 84) {
lexer.NextToken();
#line 691 "cs.ATG"
m.Add(Modifiers.Internal, t.Location);
if (la.kind == 97) {
lexer.NextToken();
#line 692 "cs.ATG"
m.Add(Modifiers.Protected, t.Location);
}
} else SynErr(181);
}
示例4: MemberModifiers
void MemberModifiers(
#line 705 "cs.ATG"
ModifierList m) {
while (StartOf(20)) {
switch (la.kind) {
case 49: {
lexer.NextToken();
#line 708 "cs.ATG"
m.Add(Modifiers.Abstract, t.Location);
break;
}
case 71: {
lexer.NextToken();
#line 709 "cs.ATG"
m.Add(Modifiers.Extern, t.Location);
break;
}
case 84: {
lexer.NextToken();
#line 710 "cs.ATG"
m.Add(Modifiers.Internal, t.Location);
break;
}
case 89: {
lexer.NextToken();
#line 711 "cs.ATG"
m.Add(Modifiers.New, t.Location);
break;
}
case 94: {
lexer.NextToken();
#line 712 "cs.ATG"
m.Add(Modifiers.Override, t.Location);
break;
}
case 96: {
lexer.NextToken();
#line 713 "cs.ATG"
m.Add(Modifiers.Private, t.Location);
break;
}
case 97: {
lexer.NextToken();
#line 714 "cs.ATG"
m.Add(Modifiers.Protected, t.Location);
break;
}
case 98: {
lexer.NextToken();
#line 715 "cs.ATG"
m.Add(Modifiers.Public, t.Location);
break;
}
case 99: {
lexer.NextToken();
#line 716 "cs.ATG"
m.Add(Modifiers.ReadOnly, t.Location);
break;
}
case 103: {
lexer.NextToken();
#line 717 "cs.ATG"
m.Add(Modifiers.Sealed, t.Location);
break;
}
case 107: {
lexer.NextToken();
#line 718 "cs.ATG"
m.Add(Modifiers.Static, t.Location);
break;
}
case 74: {
lexer.NextToken();
#line 719 "cs.ATG"
m.Add(Modifiers.Fixed, t.Location);
break;
}
case 119: {
lexer.NextToken();
#line 720 "cs.ATG"
m.Add(Modifiers.Unsafe, t.Location);
break;
}
case 122: {
lexer.NextToken();
#line 721 "cs.ATG"
//.........这里部分代码省略.........