Exemple #1
0
void case_496()
#line 3672 "cs-parser.jay"
{
	  	var lt = (LocatedToken) Error_AwaitAsIdentifier (yyVals[-2+yyTop]);
	  	yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location);
	  	lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
Exemple #2
0
 /// <summary>
 /// Ads a new initializer
 /// </summary>
 /// <param name="initializer">The to add Initializer</param>
 public void addInitializer(ElementInitializer initializer)
 {
     _worldInitializers.Add(initializer);
 }
Exemple #3
0
void case_495()
#line 3666 "cs-parser.jay"
{
	  	var lt = (LocatedToken) yyVals[-2+yyTop];
	  	yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location);
	  	lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
void case_475()
#line 4024 "ps-parser.jay"
{
	  	ILiteralConstant lit = yyVals[-2+yyTop] as ILiteralConstant;
		string nm;	  	
	  	if (lit is StringLiteral) {
			nm = ((StringLiteral)lit).Value;
		} else {
	  		if (parsing_playscript || !(lit is IntLiteral || lit is DoubleLiteral || lit is BoolLiteral)) {
			  	report.Error (7019, GetLocation (yyVals[-2+yyTop]), "Must be identifier or string literal");
			  	nm = "err";
			 } else {
				nm = ((Constant)yyVals[-2+yyTop]).GetValueAsLiteral();			 
			 }
		}
	  
	  	yyVal = new ElementInitializer (nm, (Expression)yyVals[0+yyTop], GetLocation(yyVals[-2+yyTop]));
	  	lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }