当前位置: 首页>>代码示例>>C#>>正文


C# ModifierList.Add方法代码示例

本文整理汇总了C#中ModifierList.Add方法的典型用法代码示例。如果您正苦于以下问题:C# ModifierList.Add方法的具体用法?C# ModifierList.Add怎么用?C# ModifierList.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ModifierList的用法示例。


在下文中一共展示了ModifierList.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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);
//.........这里部分代码省略.........
开发者ID:Altaxo,项目名称:Altaxo,代码行数:101,代码来源:Parser.cs

示例2: LocalDeclarationStatement

	void LocalDeclarationStatement(
#line  2724 "VBNET.ATG" 
out Statement statement) {

#line  2726 "VBNET.ATG" 
		ModifierList m = new ModifierList();
		LocalVariableDeclaration localVariableDeclaration;
		bool dimfound = false;
		
		while (la.kind == 75 || la.kind == 92 || la.kind == 189) {
			if (la.kind == 75) {
				lexer.NextToken();

#line  2732 "VBNET.ATG" 
				m.Add(Modifiers.Const, t.Location); 
			} else if (la.kind == 189) {
				lexer.NextToken();

#line  2733 "VBNET.ATG" 
				m.Add(Modifiers.Static, t.Location); 
			} else {
				lexer.NextToken();

#line  2734 "VBNET.ATG" 
				dimfound = true; 
			}
		}

#line  2737 "VBNET.ATG" 
		if(dimfound && (m.Modifier & Modifiers.Const) != 0) {
		Error("Dim is not allowed on constants.");
		}
		
		if(m.isNone && dimfound == false) {
			Error("Const, Dim or Static expected");
		}
		
		localVariableDeclaration = new LocalVariableDeclaration(m.Modifier);
		localVariableDeclaration.StartLocation = t.Location;
		
		VariableDeclarator(
#line  2748 "VBNET.ATG" 
localVariableDeclaration.Variables);
		while (la.kind == 12) {
			lexer.NextToken();
			VariableDeclarator(
#line  2749 "VBNET.ATG" 
localVariableDeclaration.Variables);
		}

#line  2751 "VBNET.ATG" 
		statement = localVariableDeclaration;
		
	}
开发者ID:Adam-Fogle,项目名称:agentralphplugin,代码行数:54,代码来源:Parser.cs

示例3: 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);
//.........这里部分代码省略.........
开发者ID:Altaxo,项目名称:Altaxo,代码行数:101,代码来源:Parser.cs

示例4: 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);
//.........这里部分代码省略.........
开发者ID:Adam-Fogle,项目名称:agentralphplugin,代码行数:101,代码来源:Parser.cs

示例5: TypeModifier

	void TypeModifier(
#line  3362 "VBNET.ATG" 
ModifierList m) {
		switch (la.kind) {
		case 173: {
			lexer.NextToken();

#line  3363 "VBNET.ATG" 
			m.Add(Modifiers.Public, t.Location); 
			break;
		}
		case 172: {
			lexer.NextToken();

#line  3364 "VBNET.ATG" 
			m.Add(Modifiers.Protected, t.Location); 
			break;
		}
		case 112: {
			lexer.NextToken();

#line  3365 "VBNET.ATG" 
			m.Add(Modifiers.Internal, t.Location); 
			break;
		}
		case 170: {
			lexer.NextToken();

#line  3366 "VBNET.ATG" 
			m.Add(Modifiers.Private, t.Location); 
			break;
		}
		case 185: {
			lexer.NextToken();

#line  3367 "VBNET.ATG" 
			m.Add(Modifiers.Static, t.Location); 
			break;
		}
		case 184: {
			lexer.NextToken();

#line  3368 "VBNET.ATG" 
			m.Add(Modifiers.New, t.Location); 
			break;
		}
		case 142: {
			lexer.NextToken();

#line  3369 "VBNET.ATG" 
			m.Add(Modifiers.Abstract, t.Location); 
			break;
		}
		case 152: {
			lexer.NextToken();

#line  3370 "VBNET.ATG" 
			m.Add(Modifiers.Sealed, t.Location); 
			break;
		}
		case 168: {
			lexer.NextToken();

#line  3371 "VBNET.ATG" 
			m.Add(Modifiers.Partial, t.Location); 
			break;
		}
		default: SynErr(230); break;
		}
	}
开发者ID:Adam-Fogle,项目名称:agentralphplugin,代码行数:70,代码来源:Parser.cs

示例6: AccessorModifiers

	void AccessorModifiers(
#line  681 "cs.ATG" 
out ModifierList m) {

#line  682 "cs.ATG" 
		m = new ModifierList(); 
		if (la.kind == 96) {
			lexer.NextToken();

#line  684 "cs.ATG" 
			m.Add(Modifiers.Private, t.Location); 
		} else if (la.kind == 97) {
			lexer.NextToken();

#line  685 "cs.ATG" 
			m.Add(Modifiers.Protected, t.Location); 
			if (la.kind == 84) {
				lexer.NextToken();

#line  686 "cs.ATG" 
				m.Add(Modifiers.Internal, t.Location); 
			}
		} else if (la.kind == 84) {
			lexer.NextToken();

#line  687 "cs.ATG" 
			m.Add(Modifiers.Internal, t.Location); 
			if (la.kind == 97) {
				lexer.NextToken();

#line  688 "cs.ATG" 
				m.Add(Modifiers.Protected, t.Location); 
			}
		} else SynErr(181);
	}
开发者ID:mgagne-atman,项目名称:Projects,代码行数:35,代码来源:Parser.cs

示例7: MemberModifier

	void MemberModifier(
#line  3374 "VBNET.ATG" 
ModifierList m) {
		switch (la.kind) {
		case 142: {
			lexer.NextToken();

#line  3375 "VBNET.ATG" 
			m.Add(Modifiers.Abstract, t.Location);
			break;
		}
		case 89: {
			lexer.NextToken();

#line  3376 "VBNET.ATG" 
			m.Add(Modifiers.Default, t.Location);
			break;
		}
		case 112: {
			lexer.NextToken();

#line  3377 "VBNET.ATG" 
			m.Add(Modifiers.Internal, t.Location);
			break;
		}
		case 184: {
			lexer.NextToken();

#line  3378 "VBNET.ATG" 
			m.Add(Modifiers.New, t.Location);
			break;
		}
		case 166: {
			lexer.NextToken();

#line  3379 "VBNET.ATG" 
			m.Add(Modifiers.Override, t.Location);
			break;
		}
		case 143: {
			lexer.NextToken();

#line  3380 "VBNET.ATG" 
			m.Add(Modifiers.Abstract, t.Location);
			break;
		}
		case 170: {
			lexer.NextToken();

#line  3381 "VBNET.ATG" 
			m.Add(Modifiers.Private, t.Location);
			break;
		}
		case 172: {
			lexer.NextToken();

#line  3382 "VBNET.ATG" 
			m.Add(Modifiers.Protected, t.Location);
			break;
		}
		case 173: {
			lexer.NextToken();

#line  3383 "VBNET.ATG" 
			m.Add(Modifiers.Public, t.Location);
			break;
		}
		case 152: {
			lexer.NextToken();

#line  3384 "VBNET.ATG" 
			m.Add(Modifiers.Sealed, t.Location);
			break;
		}
		case 153: {
			lexer.NextToken();

#line  3385 "VBNET.ATG" 
			m.Add(Modifiers.Sealed, t.Location);
			break;
		}
		case 185: {
			lexer.NextToken();

#line  3386 "VBNET.ATG" 
			m.Add(Modifiers.Static, t.Location);
			break;
		}
		case 165: {
			lexer.NextToken();

#line  3387 "VBNET.ATG" 
			m.Add(Modifiers.Virtual, t.Location);
			break;
		}
		case 164: {
			lexer.NextToken();

#line  3388 "VBNET.ATG" 
			m.Add(Modifiers.Overloads, t.Location);
//.........这里部分代码省略.........
开发者ID:Adam-Fogle,项目名称:agentralphplugin,代码行数:101,代码来源:Parser.cs

示例8: 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);
//.........这里部分代码省略.........
开发者ID:almazik,项目名称:ILSpy,代码行数:101,代码来源:Parser.cs

示例9: 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);
//.........这里部分代码省略.........
开发者ID:almazik,项目名称:ILSpy,代码行数:101,代码来源:Parser.cs

示例10: MemberModifier

	void MemberModifier(
#line  3732 "VBNET.ATG" 
ModifierList m) {
		switch (la.kind) {
		case 159: {
			lexer.NextToken();

#line  3733 "VBNET.ATG" 
			m.Add(Modifiers.Abstract, t.Location);
			break;
		}
		case 104: {
			lexer.NextToken();

#line  3734 "VBNET.ATG" 
			m.Add(Modifiers.Default, t.Location);
			break;
		}
		case 127: {
			lexer.NextToken();

#line  3735 "VBNET.ATG" 
			m.Add(Modifiers.Internal, t.Location);
			break;
		}
		case 202: {
			lexer.NextToken();

#line  3736 "VBNET.ATG" 
			m.Add(Modifiers.New, t.Location);
			break;
		}
		case 184: {
			lexer.NextToken();

#line  3737 "VBNET.ATG" 
			m.Add(Modifiers.Override, t.Location);
			break;
		}
		case 160: {
			lexer.NextToken();

#line  3738 "VBNET.ATG" 
			m.Add(Modifiers.Abstract, t.Location);
			break;
		}
		case 188: {
			lexer.NextToken();

#line  3739 "VBNET.ATG" 
			m.Add(Modifiers.Private, t.Location);
			break;
		}
		case 190: {
			lexer.NextToken();

#line  3740 "VBNET.ATG" 
			m.Add(Modifiers.Protected, t.Location);
			break;
		}
		case 191: {
			lexer.NextToken();

#line  3741 "VBNET.ATG" 
			m.Add(Modifiers.Public, t.Location);
			break;
		}
		case 169: {
			lexer.NextToken();

#line  3742 "VBNET.ATG" 
			m.Add(Modifiers.Sealed, t.Location);
			break;
		}
		case 170: {
			lexer.NextToken();

#line  3743 "VBNET.ATG" 
			m.Add(Modifiers.Sealed, t.Location);
			break;
		}
		case 203: {
			lexer.NextToken();

#line  3744 "VBNET.ATG" 
			m.Add(Modifiers.Static, t.Location);
			break;
		}
		case 183: {
			lexer.NextToken();

#line  3745 "VBNET.ATG" 
			m.Add(Modifiers.Virtual, t.Location);
			break;
		}
		case 182: {
			lexer.NextToken();

#line  3746 "VBNET.ATG" 
			m.Add(Modifiers.Overloads, t.Location);
//.........这里部分代码省略.........
开发者ID:BooMWax,项目名称:SharpDevelop,代码行数:101,代码来源:Parser.cs

示例11: TypeModifier

	void TypeModifier(
#line  3720 "VBNET.ATG" 
ModifierList m) {
		switch (la.kind) {
		case 191: {
			lexer.NextToken();

#line  3721 "VBNET.ATG" 
			m.Add(Modifiers.Public, t.Location); 
			break;
		}
		case 190: {
			lexer.NextToken();

#line  3722 "VBNET.ATG" 
			m.Add(Modifiers.Protected, t.Location); 
			break;
		}
		case 127: {
			lexer.NextToken();

#line  3723 "VBNET.ATG" 
			m.Add(Modifiers.Internal, t.Location); 
			break;
		}
		case 188: {
			lexer.NextToken();

#line  3724 "VBNET.ATG" 
			m.Add(Modifiers.Private, t.Location); 
			break;
		}
		case 203: {
			lexer.NextToken();

#line  3725 "VBNET.ATG" 
			m.Add(Modifiers.Static, t.Location); 
			break;
		}
		case 202: {
			lexer.NextToken();

#line  3726 "VBNET.ATG" 
			m.Add(Modifiers.New, t.Location); 
			break;
		}
		case 159: {
			lexer.NextToken();

#line  3727 "VBNET.ATG" 
			m.Add(Modifiers.Abstract, t.Location); 
			break;
		}
		case 169: {
			lexer.NextToken();

#line  3728 "VBNET.ATG" 
			m.Add(Modifiers.Sealed, t.Location); 
			break;
		}
		case 186: {
			lexer.NextToken();

#line  3729 "VBNET.ATG" 
			m.Add(Modifiers.Partial, t.Location); 
			break;
		}
		default: SynErr(253); break;
		}
	}
开发者ID:BooMWax,项目名称:SharpDevelop,代码行数:70,代码来源:Parser.cs

示例12: CreateModifiersList

        private IModifierList CreateModifiersList(string kind)
        {
            ModifierList list = new ModifierList(kind);

            switch (kind)
            {
                case "MemberAccess":
                    list.Add(Keywords.Public, ModifierVisibilityCondition.Unique);
                    list.Add(Keywords.Protected, ModifierVisibilityCondition.Unique);
                    list.Add(Keywords.Internal, ModifierVisibilityCondition.Unique);
                    list.Add(Keywords.ProtectedInternal, ModifierVisibilityCondition.Unique);
                    list.Add(Keywords.Private, ModifierVisibilityCondition.Unique);
                    break;

                case "ConstructorAccess":
                    list.Add(Keywords.Public, ModifierVisibilityCondition.StaticCtor);
                    list.Add(Keywords.Protected, ModifierVisibilityCondition.StaticCtor);
                    list.Add(Keywords.Internal, ModifierVisibilityCondition.StaticCtor);
                    list.Add(Keywords.ProtectedInternal, ModifierVisibilityCondition.StaticCtor);
                    list.Add(Keywords.Private, ModifierVisibilityCondition.StaticCtor);
                    break;

                case "ClassAccess":
                    list.Add(Keywords.Public, ModifierVisibilityCondition.Unique);
                    list.Add(Keywords.Internal, ModifierVisibilityCondition.Unique);

                    list.Add(Keywords.Protected, ModifierVisibilityCondition.NestedClass);
                    list.Add(Keywords.ProtectedInternal, ModifierVisibilityCondition.NestedClass);
                    list.Add(Keywords.Private, ModifierVisibilityCondition.NestedClass);
                    list.Add(Keywords.New, ModifierVisibilityCondition.NestedClass);
                    break;

                case "ClassInherit":
                    list.Add(Keywords.Abstract, ModifierVisibilityCondition.Unique);
                    list.Add(Keywords.Sealed, ModifierVisibilityCondition.Unique);
                    list.Add(Keywords.Static, ModifierVisibilityCondition.Unique);
                    break;

                case "Abstract":
                    break;

                case "Extern":
                    list.Add(Keywords.Extern, ModifierVisibilityCondition.Unique);
                    break;

                case "New":
                    list.Add(Keywords.New, ModifierVisibilityCondition.Unique);
                    break;

                case "MethodInheritance":
                    list.Add(Keywords.Abstract, ModifierVisibilityCondition.Unique);
                    list.Add(Keywords.Virtual, ModifierVisibilityCondition.Unique);
                    list.Add(Keywords.Override, ModifierVisibilityCondition.Unique);
                    list.Add(Keywords.SealedOverride, ModifierVisibilityCondition.Unique);
                    list.Add(Keywords.Static, ModifierVisibilityCondition.Unique);
                    break;

                case "Partial":
                    list.Add(Keywords.Partial, ModifierVisibilityCondition.Unique);
                    break;

                case "Static":
                    list.Add(Keywords.Static, ModifierVisibilityCondition.Unique);
                    break;

                case "Virtual":
                    break;

                case "MethodNew":
                    list.Add(Keywords.New, ModifierVisibilityCondition.Unique);
                    //list.AddRuleForModifier(Keywords.New, new MethodModifier_New_AllowedRule());
                    break;
                case "MethodNonPrivate":
                    list.Add(Keywords.Public, ModifierVisibilityCondition.Unique);
                    //list.AddRuleForModifier(Keywords.Public, new MethodModifier_nonPrivate_AllowedRule());
                    list.Add(Keywords.Protected, ModifierVisibilityCondition.Unique);
                    //list.AddRuleForModifier(Keywords.Protected, new MethodModifier_nonPrivate_AllowedRule());
                    list.Add(Keywords.Internal, ModifierVisibilityCondition.Unique);
                    //list.AddRuleForModifier(Keywords.Internal, new MethodModifier_nonPrivate_AllowedRule());
                    list.Add(Keywords.ProtectedInternal, ModifierVisibilityCondition.Unique);
                    //list.AddRuleForModifier(Keywords.ProtectedInternal, new MethodModifier_nonPrivate_AllowedRule());
                    break;
                case "MethodPrivate":
                    list.Add(Keywords.Private, ModifierVisibilityCondition.Unique);
                    //list.AddRuleForModifier(Keywords.Private, new MethodModifier_Private_AllowedRule());
                    break;
                case "MethodVirtual":
                    list.Add(Keywords.Virtual, ModifierVisibilityCondition.Unique);
                    //list.AddRuleForModifier(Keywords.Virtual, new MethodModifier_Virtual_AllowedRule());
                    break;
                case "MethodOverride":
                    list.Add(Keywords.Override, ModifierVisibilityCondition.Unique);
                    list.Add(Keywords.SealedOverride, ModifierVisibilityCondition.Unique);
                    //list.AddRuleForModifier(Keywords.MethodInheritance, new MethodModifier_Override_AllowedRule());
                    //list.AddRuleForModifier(Keywords.SealedOverride, new MethodModifier_Override_AllowedRule());
                    break;
                case "MethodAbstract":
                    list.Add(Keywords.Abstract, ModifierVisibilityCondition.Unique);
                    //list.AddRuleForModifier(Keywords.Abstract, new MethodModifier_Abstract_AllowedRule());
                    break;
//.........这里部分代码省略.........
开发者ID:Ju2ender,项目名称:csharp-e,代码行数:101,代码来源:ModifierListFactory.cs

示例13: MemberModifier

	void MemberModifier(
#line  2843 "VBNET.ATG" 
ModifierList m) {
		switch (la.kind) {
		case 122: {
			lexer.NextToken();

#line  2844 "VBNET.ATG" 
			m.Add(Modifiers.Abstract, t.Location);
			break;
		}
		case 79: {
			lexer.NextToken();

#line  2845 "VBNET.ATG" 
			m.Add(Modifiers.Default, t.Location);
			break;
		}
		case 99: {
			lexer.NextToken();

#line  2846 "VBNET.ATG" 
			m.Add(Modifiers.Internal, t.Location);
			break;
		}
		case 157: {
			lexer.NextToken();

#line  2847 "VBNET.ATG" 
			m.Add(Modifiers.New, t.Location);
			break;
		}
		case 142: {
			lexer.NextToken();

#line  2848 "VBNET.ATG" 
			m.Add(Modifiers.Override, t.Location);
			break;
		}
		case 123: {
			lexer.NextToken();

#line  2849 "VBNET.ATG" 
			m.Add(Modifiers.Abstract, t.Location);
			break;
		}
		case 145: {
			lexer.NextToken();

#line  2850 "VBNET.ATG" 
			m.Add(Modifiers.Private, t.Location);
			break;
		}
		case 147: {
			lexer.NextToken();

#line  2851 "VBNET.ATG" 
			m.Add(Modifiers.Protected, t.Location);
			break;
		}
		case 148: {
			lexer.NextToken();

#line  2852 "VBNET.ATG" 
			m.Add(Modifiers.Public, t.Location);
			break;
		}
		case 131: {
			lexer.NextToken();

#line  2853 "VBNET.ATG" 
			m.Add(Modifiers.Sealed, t.Location);
			break;
		}
		case 132: {
			lexer.NextToken();

#line  2854 "VBNET.ATG" 
			m.Add(Modifiers.Sealed, t.Location);
			break;
		}
		case 158: {
			lexer.NextToken();

#line  2855 "VBNET.ATG" 
			m.Add(Modifiers.Static, t.Location);
			break;
		}
		case 141: {
			lexer.NextToken();

#line  2856 "VBNET.ATG" 
			m.Add(Modifiers.Virtual, t.Location);
			break;
		}
		case 140: {
			lexer.NextToken();

#line  2857 "VBNET.ATG" 
			m.Add(Modifiers.Overloads, t.Location);
//.........这里部分代码省略.........
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:101,代码来源:Parser.cs

示例14: TypeModifier

	void TypeModifier(
#line  691 "cs.ATG" 
ModifierList m) {
		switch (la.kind) {
		case 89: {
			lexer.NextToken();

#line  693 "cs.ATG" 
			m.Add(Modifiers.New, t.Location); 
			break;
		}
		case 98: {
			lexer.NextToken();

#line  694 "cs.ATG" 
			m.Add(Modifiers.Public, t.Location); 
			break;
		}
		case 97: {
			lexer.NextToken();

#line  695 "cs.ATG" 
			m.Add(Modifiers.Protected, t.Location); 
			break;
		}
		case 84: {
			lexer.NextToken();

#line  696 "cs.ATG" 
			m.Add(Modifiers.Internal, t.Location); 
			break;
		}
		case 96: {
			lexer.NextToken();

#line  697 "cs.ATG" 
			m.Add(Modifiers.Private, t.Location); 
			break;
		}
		case 119: {
			lexer.NextToken();

#line  698 "cs.ATG" 
			m.Add(Modifiers.Unsafe, t.Location); 
			break;
		}
		case 49: {
			lexer.NextToken();

#line  699 "cs.ATG" 
			m.Add(Modifiers.Abstract, t.Location); 
			break;
		}
		case 103: {
			lexer.NextToken();

#line  700 "cs.ATG" 
			m.Add(Modifiers.Sealed, t.Location); 
			break;
		}
		case 107: {
			lexer.NextToken();

#line  701 "cs.ATG" 
			m.Add(Modifiers.Static, t.Location); 
			break;
		}
		case 126: {
			lexer.NextToken();

#line  702 "cs.ATG" 
			m.Add(Modifiers.Partial, t.Location); 
			break;
		}
		default: SynErr(151); break;
		}
	}
开发者ID:mgagne-atman,项目名称:Projects,代码行数:77,代码来源:Parser.cs

示例15: TypeModifier

	void TypeModifier(
//#line  3708 "VBNET.ATG" 
ModifierList m) {
		switch (la.kind) {
		case 188: {
			lexer.NextToken();

//#line  3709 "VBNET.ATG" 
			m.Add(Modifiers.Public, t.Location); 
			break;
		}
		case 187: {
			lexer.NextToken();

//#line  3710 "VBNET.ATG" 
			m.Add(Modifiers.Protected, t.Location); 
			break;
		}
		case 125: {
			lexer.NextToken();

//#line  3711 "VBNET.ATG" 
			m.Add(Modifiers.Internal, t.Location); 
			break;
		}
		case 185: {
			lexer.NextToken();

//#line  3712 "VBNET.ATG" 
			m.Add(Modifiers.Private, t.Location); 
			break;
		}
		case 200: {
			lexer.NextToken();

//#line  3713 "VBNET.ATG" 
			m.Add(Modifiers.Static, t.Location); 
			break;
		}
		case 199: {
			lexer.NextToken();

//#line  3714 "VBNET.ATG" 
			m.Add(Modifiers.New, t.Location); 
			break;
		}
		case 156: {
			lexer.NextToken();

//#line  3715 "VBNET.ATG" 
			m.Add(Modifiers.Abstract, t.Location); 
			break;
		}
		case 166: {
			lexer.NextToken();

//#line  3716 "VBNET.ATG" 
			m.Add(Modifiers.Sealed, t.Location); 
			break;
		}
		case 183: {
			lexer.NextToken();

//#line  3717 "VBNET.ATG" 
			m.Add(Modifiers.Partial, t.Location); 
			break;
		}
		default: SynErr(249); break;
		}
	}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:70,代码来源:Parser.cs


注:本文中的ModifierList.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。