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

Unified Diff: runtime/vm/parser.h

Issue 9515011: Add support for malformed types and postpone some related errors from compile (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
Index: runtime/vm/parser.h
===================================================================
--- runtime/vm/parser.h (revision 4727)
+++ runtime/vm/parser.h (working copy)
@@ -8,6 +8,7 @@
#include "include/dart_api.h"
#include "vm/ast.h"
+#include "vm/class_finalizer.h"
#include "vm/compiler_stats.h"
#include "vm/scanner.h"
@@ -181,13 +182,15 @@
const char* format,
va_list args);
- // Reports error message at location of current token.
+ // Reports error/warning message at location of current token.
void ErrorMsg(const char* msg, ...);
- void ErrorMsg(intptr_t token_index, const char* msg, ...);
void Warning(const char* msg, ...);
- void Warning(intptr_t token_index, const char* msg, ...);
void Unimplemented(const char* msg);
+ // Reports error message at given location.
+ void ErrorMsg(intptr_t token_index, const char* msg, ...);
+ void Warning(intptr_t token_index, const char* msg, ...);
+
const Instance& EvaluateConstExpr(AstNode* expr);
void RunStaticFieldInitializer(const Field& field);
RawObject* EvaluateConstConstructorCall(
@@ -217,18 +220,14 @@
void ParseLibraryInclude();
void ParseLibraryResource();
- enum TypeResolution {
- kIgnore, // Parsed type is ignored and replaced by Dynamic.
- kDoNotResolve, // Type resolution is postponed.
- kCanResolve, // Type resolution is optional.
- kMustResolve // Type resolution is required.
- };
void ResolveTypeFromClass(const Class& cls,
- TypeResolution type_resolution,
+ ClassFinalizer::TypeFinalization finalization,
AbstractType* type);
- RawAbstractType* ParseType(TypeResolution type_resolution);
+ RawAbstractType* ParseType(ClassFinalizer::TypeFinalization finalization);
void ParseTypeParameters(const Class& cls);
- RawAbstractTypeArguments* ParseTypeArguments(TypeResolution type_resolution);
+ RawAbstractTypeArguments* ParseTypeArguments(
+ Error* malformed_error,
+ ClassFinalizer::TypeFinalization finalization);
void ParseQualIdent(QualIdent* qual_ident);
void ParseMethodOrConstructor(ClassDesc* members, MemberDesc* method);
void ParseFieldDefinition(ClassDesc* members, MemberDesc* field);
@@ -323,7 +322,8 @@
// Add the inlined finally block to the specified node.
void AddFinallyBlockToNode(AstNode* node, InlinedFinallyNode* finally_node);
AstNode* ParseTryStatement(String* label_name);
- RawAbstractType* ParseFinalVarOrType(TypeResolution type_resolution);
+ RawAbstractType* ParseFinalVarOrType(
+ ClassFinalizer::TypeFinalization finalization);
AstNode* ParseVariableDeclaration(const AbstractType& type, bool is_const);
AstNode* ParseVariableDeclarationList();
AstNode* ParseFunctionStatement(bool is_literal);

Powered by Google App Engine
This is Rietveld 408576698