Beispiel #1
0
	void FormalParameter(
//#line  2948 "VBNET.ATG" 
out ParameterDeclarationExpression p) {

//#line  2950 "VBNET.ATG" 
		AttributeSection section;
		List<AttributeSection> attributes = new List<AttributeSection>();
		TypeReference type = null;
		ParamModifierList mod = new ParamModifierList(this);
		Expression expr = null;
		p = null;
		ArrayList arrayModifiers = null;
		Location startLocation = la.Location;
		
		while (la.kind == 40) {
			AttributeSection(
//#line  2960 "VBNET.ATG" 
out section);

//#line  2960 "VBNET.ATG" 
			attributes.Add(section); 
		}
		while (StartOf(29)) {
			ParameterModifier(
//#line  2961 "VBNET.ATG" 
mod);
		}
		Identifier();

//#line  2962 "VBNET.ATG" 
		string parameterName = t.val; 
		if (
//#line  2963 "VBNET.ATG" 
IsDims()) {
			ArrayTypeModifiers(
//#line  2963 "VBNET.ATG" 
out arrayModifiers);
		}
		if (la.kind == 63) {
			lexer.NextToken();
			TypeName(
//#line  2964 "VBNET.ATG" 
out type);
		}

//#line  2966 "VBNET.ATG" 
		if(type != null) {
		if (arrayModifiers != null) {
			if (type.RankSpecifier != null) {
				Error("array rank only allowed one time");
			} else {
				type.RankSpecifier = (int[])arrayModifiers.ToArray(typeof(int));
			}
		}
		}
		
		if (la.kind == 20) {
			lexer.NextToken();
			Expr(
//#line  2976 "VBNET.ATG" 
out expr);
		}

//#line  2978 "VBNET.ATG" 
		mod.Check();
		p = new ParameterDeclarationExpression(type, parameterName, mod.Modifier, expr);
		p.Attributes = attributes;
		p.StartLocation = startLocation;
		p.EndLocation = t.EndLocation;
		
	}
Beispiel #2
0
	void ParameterModifier(
//#line  3701 "VBNET.ATG" 
ParamModifierList m) {
		if (la.kind == 72) {
			lexer.NextToken();

//#line  3702 "VBNET.ATG" 
			m.Add(ParameterModifiers.In); 
		} else if (la.kind == 69) {
			lexer.NextToken();

//#line  3703 "VBNET.ATG" 
			m.Add(ParameterModifiers.Ref); 
		} else if (la.kind == 174) {
			lexer.NextToken();

//#line  3704 "VBNET.ATG" 
			m.Add(ParameterModifiers.Optional); 
		} else if (la.kind == 182) {
			lexer.NextToken();

//#line  3705 "VBNET.ATG" 
			m.Add(ParameterModifiers.Params); 
		} else SynErr(313);
	}
Beispiel #3
0
	void FormalParameter(
#line  2642 "VBNET.ATG" 
out ParameterDeclarationExpression p) {

#line  2644 "VBNET.ATG" 
		AttributeSection section;
		List<AttributeSection> attributes = new List<AttributeSection>();
		TypeReference type = null;
		ParamModifierList mod = new ParamModifierList(this);
		Expression expr = null;
		p = null;
		ArrayList arrayModifiers = null;
		
		while (la.kind == 28) {
			AttributeSection(
#line  2653 "VBNET.ATG" 
out section);

#line  2653 "VBNET.ATG" 
			attributes.Add(section); 
		}
		while (StartOf(35)) {
			ParameterModifier(
#line  2654 "VBNET.ATG" 
mod);
		}
		Identifier();

#line  2655 "VBNET.ATG" 
		string parameterName = t.val; 
		if (
#line  2656 "VBNET.ATG" 
IsDims()) {
			ArrayTypeModifiers(
#line  2656 "VBNET.ATG" 
out arrayModifiers);
		}
		if (la.kind == 50) {
			lexer.NextToken();
			TypeName(
#line  2657 "VBNET.ATG" 
out type);
		}

#line  2659 "VBNET.ATG" 
		if(type != null) {
		if (arrayModifiers != null) {
			if (type.RankSpecifier != null) {
				Error("array rank only allowed one time");
			} else {
				type.RankSpecifier = (int[])arrayModifiers.ToArray(typeof(int));
			}
		}
		} else {
			type = new TypeReference("System.Object", arrayModifiers == null ? null : (int[])arrayModifiers.ToArray(typeof(int)));
		}
		
		if (la.kind == 10) {
			lexer.NextToken();
			Expr(
#line  2671 "VBNET.ATG" 
out expr);
		}

#line  2673 "VBNET.ATG" 
		mod.Check();
		p = new ParameterDeclarationExpression(type, parameterName, mod.Modifier, expr);
		p.Attributes = attributes;
		
	}
Beispiel #4
0
	void ParameterModifier(
#line  3355 "VBNET.ATG" 
ParamModifierList m) {
		if (la.kind == 59) {
			lexer.NextToken();

#line  3356 "VBNET.ATG" 
			m.Add(ParameterModifiers.In); 
		} else if (la.kind == 56) {
			lexer.NextToken();

#line  3357 "VBNET.ATG" 
			m.Add(ParameterModifiers.Ref); 
		} else if (la.kind == 160) {
			lexer.NextToken();

#line  3358 "VBNET.ATG" 
			m.Add(ParameterModifiers.Optional); 
		} else if (la.kind == 167) {
			lexer.NextToken();

#line  3359 "VBNET.ATG" 
			m.Add(ParameterModifiers.Params); 
		} else SynErr(270);
	}
Beispiel #5
0
	void ParameterModifier(
#line  2867 "VBNET.ATG" 
ParamModifierList m) {
		if (la.kind == 55) {
			lexer.NextToken();

#line  2868 "VBNET.ATG" 
			m.Add(ParameterModifiers.In); 
		} else if (la.kind == 53) {
			lexer.NextToken();

#line  2869 "VBNET.ATG" 
			m.Add(ParameterModifiers.Ref); 
		} else if (la.kind == 137) {
			lexer.NextToken();

#line  2870 "VBNET.ATG" 
			m.Add(ParameterModifiers.Optional); 
		} else if (la.kind == 143) {
			lexer.NextToken();

#line  2871 "VBNET.ATG" 
			m.Add(ParameterModifiers.Params); 
		} else SynErr(252);
	}
Beispiel #6
0
 public void Add(ParamModifierList m)
 {
     Add(m.cur);
 }
Beispiel #7
0
	void FormalParameter(
#line  2189 "VBNET.ATG" 
out ParameterDeclarationExpression p) {

#line  2191 "VBNET.ATG" 
		TypeReference type = null;
		ParamModifierList mod = new ParamModifierList(this);
		Expression expr = null;
		p = null;ArrayList arrayModifiers = null;
		
		while (StartOf(33)) {
			ParameterModifier(
#line  2196 "VBNET.ATG" 
mod);
		}
		Identifier();

#line  2197 "VBNET.ATG" 
		string parameterName = t.val; 
		if (
#line  2198 "VBNET.ATG" 
IsDims()) {
			ArrayTypeModifiers(
#line  2198 "VBNET.ATG" 
out arrayModifiers);
		}
		if (la.kind == 48) {
			lexer.NextToken();
			TypeName(
#line  2199 "VBNET.ATG" 
out type);
		}

#line  2201 "VBNET.ATG" 
		if(type != null) {
		if (arrayModifiers != null) {
			if (type.RankSpecifier != null) {
				Error("array rank only allowed one time");
			} else {
				type.RankSpecifier = (int[])arrayModifiers.ToArray(typeof(int));
			}
		}
		} else {
			type = new TypeReference("System.Object", arrayModifiers == null ? null : (int[])arrayModifiers.ToArray(typeof(int)));
		}
		
		if (la.kind == 11) {
			lexer.NextToken();
			Expr(
#line  2213 "VBNET.ATG" 
out expr);
		}

#line  2215 "VBNET.ATG" 
		mod.Check();
		p = new ParameterDeclarationExpression(type, parameterName, mod.Modifier, expr);
		
	}
Beispiel #8
0
	void ParameterModifier(
#line  3713 "VBNET.ATG" 
ParamModifierList m) {
		if (la.kind == 74) {
			lexer.NextToken();

#line  3714 "VBNET.ATG" 
			m.Add(ParameterModifiers.In); 
		} else if (la.kind == 71) {
			lexer.NextToken();

#line  3715 "VBNET.ATG" 
			m.Add(ParameterModifiers.Ref); 
		} else if (la.kind == 177) {
			lexer.NextToken();

#line  3716 "VBNET.ATG" 
			m.Add(ParameterModifiers.Optional); 
		} else if (la.kind == 185) {
			lexer.NextToken();

#line  3717 "VBNET.ATG" 
			m.Add(ParameterModifiers.Params); 
		} else SynErr(317);
	}
Beispiel #9
0
	void ParameterModifier(
#line  3695 "VBNET.ATG" 
ParamModifierList m) {
		if (la.kind == 72) {
			lexer.NextToken();

#line  3696 "VBNET.ATG" 
			m.Add(ParameterModifiers.In); 
		} else if (la.kind == 69) {
			lexer.NextToken();

#line  3697 "VBNET.ATG" 
			m.Add(ParameterModifiers.Ref); 
		} else if (la.kind == 174) {
			lexer.NextToken();

#line  3698 "VBNET.ATG" 
			m.Add(ParameterModifiers.Optional); 
		} else if (la.kind == 182) {
			lexer.NextToken();

#line  3699 "VBNET.ATG" 
			m.Add(ParameterModifiers.Params); 
		} else SynErr(313);
	}
 public void Add(ParamModifierList m)
 {
     Add(m.cur);
 }
Beispiel #11
0
	void FormalParameter(
#line  2883 "VBNET.ATG" 
out ParameterDeclarationExpression p) {

#line  2885 "VBNET.ATG" 
		AttributeSection section;
		List<AttributeSection> attributes = new List<AttributeSection>();
		TypeReference type = null;
		ParamModifierList mod = new ParamModifierList(this);
		Expression expr = null;
		p = null;
		ArrayList arrayModifiers = null;
		
		while (la.kind == 40) {
			AttributeSection(
#line  2894 "VBNET.ATG" 
out section);

#line  2894 "VBNET.ATG" 
			attributes.Add(section); 
		}
		while (StartOf(48)) {
			ParameterModifier(
#line  2895 "VBNET.ATG" 
mod);
		}
		Identifier();

#line  2896 "VBNET.ATG" 
		string parameterName = t.val; 
		if (
#line  2897 "VBNET.ATG" 
IsDims()) {
			ArrayTypeModifiers(
#line  2897 "VBNET.ATG" 
out arrayModifiers);
		}
		if (la.kind == 63) {
			lexer.NextToken();
			TypeName(
#line  2898 "VBNET.ATG" 
out type);
		}

#line  2900 "VBNET.ATG" 
		if(type != null) {
		if (arrayModifiers != null) {
			if (type.RankSpecifier != null) {
				Error("array rank only allowed one time");
			} else {
				type.RankSpecifier = (int[])arrayModifiers.ToArray(typeof(int));
			}
		}
		}
		
		if (la.kind == 20) {
			lexer.NextToken();
			Expr(
#line  2910 "VBNET.ATG" 
out expr);
		}

#line  2912 "VBNET.ATG" 
		mod.Check();
		p = new ParameterDeclarationExpression(type, parameterName, mod.Modifier, expr);
		p.Attributes = attributes;
		
	}