Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: runtime/vm/parser.cc

Issue 12382026: Libraries: update VM to current spec (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 19253)
+++ runtime/vm/parser.cc (working copy)
@@ -4550,9 +4550,6 @@
return;
}
- const bool is_script = (script_.kind() == RawScript::kScriptTag);
- const bool is_library = (script_.kind() == RawScript::kLibraryTag);
- const bool is_patch = (script_.kind() == RawScript::kPatchTag);
ASSERT(script_.kind() != RawScript::kSourceTag);
// We may read metadata tokens that are part of the toplevel
@@ -4562,20 +4559,15 @@
intptr_t metadata_pos = TokenPos();
SkipMetadata();
if (CurrentToken() == Token::kLIBRARY) {
- if (is_patch) {
+ if (is_patch_source()) {
ErrorMsg("patch cannot override library name");
}
ParseLibraryName();
metadata_pos = TokenPos();
SkipMetadata();
- } else if (is_library) {
- ErrorMsg("library name definition expected");
}
while ((CurrentToken() == Token::kIMPORT) ||
(CurrentToken() == Token::kEXPORT)) {
- if (is_script && (CurrentToken() == Token::kEXPORT)) {
- ErrorMsg("export not allowed in scripts");
- }
ParseLibraryImportExport();
metadata_pos = TokenPos();
SkipMetadata();
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698