interpolated_string
: INTERPOLATED_STRING interpolations INTERPOLATED_STRING_END
{
+ if (lang_version < LanguageVersion.V_6)
+ FeatureIsNotAvailable (GetLocation ($1), "interpolated strings");
+
$$ = new InterpolatedString ((StringLiteral) $1, (List<Expression>) $2, (StringLiteral) $3);
}
| INTERPOLATED_STRING_END
{
+ if (lang_version < LanguageVersion.V_6)
+ FeatureIsNotAvailable (GetLocation ($1), "interpolated strings");
+
$$ = new InterpolatedString ((StringLiteral) $1, null, null);
}
;
$$ = new ArrayCreation ((FullNamedExpression) $2, (List<Expression>) $4,
new ComposedTypeSpecifier (((List<Expression>) $4).Count, GetLocation ($3)) {
Next = (ComposedTypeSpecifier) $6
- }, (ArrayInitializer) $7, GetLocation ($1));
+ }, (ArrayInitializer) $7, GetLocation ($1)) {
+ NoEmptyInterpolation = true
+ };
+
lbag.AddLocation ($$, GetLocation ($3), GetLocation ($5));
}
| NEW new_expr_type rank_specifiers opt_array_initializer
if ($4 == null)
report.Error (1586, GetLocation ($1), "Array creation must have array size or array initializer");
- $$ = new ArrayCreation ((FullNamedExpression) $2, (ComposedTypeSpecifier) $3, (ArrayInitializer) $4, GetLocation ($1));
+ $$ = new ArrayCreation ((FullNamedExpression) $2, (ComposedTypeSpecifier) $3, (ArrayInitializer) $4, GetLocation ($1)) {
+ NoEmptyInterpolation = true
+ };
}
| NEW rank_specifier array_initializer
{