| Index: runtime/vm/parser.cc
|
| diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
|
| index a9666a3e64ddef5934720280b23a13c002acb88e..210e9a6642b58f6bec4fa48902dbb57e8eca3b5b 100644
|
| --- a/runtime/vm/parser.cc
|
| +++ b/runtime/vm/parser.cc
|
| @@ -6409,12 +6409,16 @@ void Parser::ParsePartHeader() {
|
| ReportError("'part of' expected");
|
| }
|
| ConsumeToken();
|
| - // The VM is not required to check that the library name matches the
|
| - // name of the current library, so we ignore it.
|
| - ExpectIdentifier("library name expected");
|
| - while (CurrentToken() == Token::kPERIOD) {
|
| - ConsumeToken();
|
| - ExpectIdentifier("malformed library name");
|
| + // The VM is not required to check that the library name or URI matches the
|
| + // name or URI of the current library, so we ignore them.
|
| + if (CurrentToken() == Token::kSTRING) {
|
| + ParseStringLiteral(false);
|
| + } else {
|
| + ExpectIdentifier("library name expected");
|
| + while (CurrentToken() == Token::kPERIOD) {
|
| + ConsumeToken();
|
| + ExpectIdentifier("malformed library name");
|
| + }
|
| }
|
| ExpectSemicolon();
|
| }
|
|
|