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])); }
/// <summary> /// Ads a new initializer /// </summary> /// <param name="initializer">The to add Initializer</param> public void addInitializer(ElementInitializer initializer) { _worldInitializers.Add(initializer); }
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])); }