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

Unified Diff: runtime/vm/parser.h

Issue 10823396: Implement import scope (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.h
===================================================================
--- runtime/vm/parser.h (revision 10922)
+++ runtime/vm/parser.h (working copy)
@@ -206,7 +206,7 @@
void ExpectToken(Token::Kind token_expected);
void ExpectSemicolon();
void UnexpectedToken();
- String* ExpectTypeIdentifier(const char* msg);
+ String* ExpectClassIdentifier(const char* msg);
String* ExpectIdentifier(const char* msg);
bool IsLiteral(const char* literal);
@@ -482,11 +482,30 @@
AstNode** node);
static const bool kResolveLocally = true;
static const bool kResolveIncludingImports = false;
- AstNode* ResolveIdentInLibraryScope(const Library& lib,
- const QualIdent& qual_ident,
- bool resolve_locally);
- AstNode* ResolveIdentInLibraryPrefixScope(const LibraryPrefix& lib_prefix,
- const QualIdent& qual_ident);
+
+ // Resolve a primary identifier in the libary or prefix scope and
+ // generate the corresponding AstNode.
+ AstNode* ResolveIdentInPrefixScope(intptr_t ident_pos,
+ const LibraryPrefix& prefix,
+ const String& ident);
+ AstNode* ResolveIdentInCurrentLibraryScope(intptr_t ident_pos,
+ const String& ident);
+
+ // Find class with the given name in the library or prefix scope.
+ RawClass* ResolveClassInCurrentLibraryScope(intptr_t ident_pos,
+ const String& name);
+ RawClass* ResolveClassInPrefixScope(intptr_t ident_pos,
+ const LibraryPrefix& prefix,
+ const String& name);
+
+ // Find name in the library or prefix scope and return the corresponding
+ // object (field, class, function etc).
+ RawObject* ResolveNameInCurrentLibraryScope(intptr_t ident_pos,
+ const String& ident);
+ RawObject* ResolveNameInPrefixScope(intptr_t ident_pos,
+ const LibraryPrefix& prefix,
+ const String& name);
+
AstNode* ResolveIdent(intptr_t ident_pos,
const String& ident,
bool allow_closure_names);
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698