X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=mcs%2Fmcs%2Fcs-parser.jay;h=a9748379086bbde75a62e2c78329576af82f3755;hb=440a7c06af698fb611825258a0a015d7d3d6176b;hp=fb6a3e87873597f165ac3c175682518293449355;hpb=a1d39d9b02ea634f8ba27b1df262f8047b07f363;p=mono.git diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay index fb6a3e87873..a9748379086 100644 --- a/mcs/mcs/cs-parser.jay +++ b/mcs/mcs/cs-parser.jay @@ -1829,9 +1829,9 @@ property_declaration accessor_declarations { lexer.PropertyParsing = false; - + if (doc_support) - current_property.DocComment = ConsumeStoredComment (); + current_property.DocComment = ConsumeStoredComment (); } CLOSE_BRACE { @@ -1893,6 +1893,9 @@ opt_property_initializer lbag.AppendToMember (current_property, GetLocation ($1), GetLocation ($4)); end_block (GetLocation ($4)); current_local_parameters = null; + + if (doc_support) + Lexer.doc_state = XmlCommentState.Allowed; } ; @@ -3348,10 +3351,16 @@ boolean_literal interpolated_string : INTERPOLATED_STRING interpolations INTERPOLATED_STRING_END { + if (lang_version < LanguageVersion.V_6) + FeatureIsNotAvailable (GetLocation ($1), "interpolated strings"); + $$ = new InterpolatedString ((StringLiteral) $1, (List) $2, (StringLiteral) $3); } | INTERPOLATED_STRING_END { + if (lang_version < LanguageVersion.V_6) + FeatureIsNotAvailable (GetLocation ($1), "interpolated strings"); + $$ = new InterpolatedString ((StringLiteral) $1, null, null); } ; @@ -3915,7 +3924,10 @@ array_creation_expression $$ = new ArrayCreation ((FullNamedExpression) $2, (List) $4, new ComposedTypeSpecifier (((List) $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 @@ -3923,7 +3935,9 @@ array_creation_expression 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 {