Chromium Code Reviews| Index: runtime/vm/parser.cc |
| =================================================================== |
| --- runtime/vm/parser.cc (revision 12811) |
| +++ runtime/vm/parser.cc (working copy) |
| @@ -4271,7 +4271,18 @@ |
| void Parser::ParseLibraryPart() { |
| - ErrorMsg("library part definitions not implemented"); |
| + const intptr_t source_pos = TokenPos(); |
| + ConsumeToken(); |
|
regis
2012/09/24 23:10:27
What token are you consuming?
ASSERT(CurrentToken(
hausner
2012/09/24 23:18:36
I added a comment instead of an assert. I think we
|
| + if (CurrentToken() != Token::kSTRING) { |
| + ErrorMsg("url expected"); |
| + } |
| + const String& url = *CurrentLiteral(); |
| + ConsumeToken(); |
| + ExpectSemicolon(); |
| + Dart_Handle handle = |
| + CallLibraryTagHandler(kCanonicalizeUrl, source_pos, url); |
| + const String& canon_url = String::CheckedHandle(Api::UnwrapHandle(handle)); |
| + CallLibraryTagHandler(kSourceTag, source_pos, canon_url); |
| } |