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

Side by Side Diff: runtime/vm/parser.h

Issue 9559001: Fix Issue 1846: Improve error reporting in presence of imports. With this CL: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_PARSER_H_ 5 #ifndef VM_PARSER_H_
6 #define VM_PARSER_H_ 6 #define VM_PARSER_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "vm/ast.h" 10 #include "vm/ast.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 va_list args); 185 va_list args);
186 186
187 // Reports error/warning message at location of current token. 187 // Reports error/warning message at location of current token.
188 void ErrorMsg(const char* msg, ...); 188 void ErrorMsg(const char* msg, ...);
189 void Warning(const char* msg, ...); 189 void Warning(const char* msg, ...);
190 void Unimplemented(const char* msg); 190 void Unimplemented(const char* msg);
191 191
192 // Reports error message at given location. 192 // Reports error message at given location.
193 void ErrorMsg(intptr_t token_index, const char* msg, ...); 193 void ErrorMsg(intptr_t token_index, const char* msg, ...);
194 void Warning(intptr_t token_index, const char* msg, ...); 194 void Warning(intptr_t token_index, const char* msg, ...);
195 // Concatenates two error messages, the previous and the current one.
196 void AppendErrorMsg(
197 const Error& prev_error, intptr_t token_index, const char* format, ...);
198
199 // Same as FormatError, but appends the new error to the 'prev_error'.
200 static RawError* FormatErrorWithAppend(const Error& prev_error,
201 const Script& script,
202 intptr_t token_index,
203 const char* message_header,
204 const char* format,
205 va_list args);
195 206
196 const Instance& EvaluateConstExpr(AstNode* expr); 207 const Instance& EvaluateConstExpr(AstNode* expr);
197 void RunStaticFieldInitializer(const Field& field); 208 void RunStaticFieldInitializer(const Field& field);
198 RawObject* EvaluateConstConstructorCall( 209 RawObject* EvaluateConstConstructorCall(
199 const Class& type_class, 210 const Class& type_class,
200 const AbstractTypeArguments& type_arguments, 211 const AbstractTypeArguments& type_arguments,
201 const Function& constructor, 212 const Function& constructor,
202 ArgumentListNode* arguments); 213 ArgumentListNode* arguments);
203 AstNode* FoldConstExpr(intptr_t expr_pos, AstNode* expr); 214 AstNode* FoldConstExpr(intptr_t expr_pos, AstNode* expr);
204 215
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 // code at all points in the try block where an exit from the block is 475 // code at all points in the try block where an exit from the block is
465 // done using 'return', 'break' or 'continue' statements. 476 // done using 'return', 'break' or 'continue' statements.
466 TryBlocks* try_blocks_list_; 477 TryBlocks* try_blocks_list_;
467 478
468 DISALLOW_COPY_AND_ASSIGN(Parser); 479 DISALLOW_COPY_AND_ASSIGN(Parser);
469 }; 480 };
470 481
471 } // namespace dart 482 } // namespace dart
472 483
473 #endif // VM_PARSER_H_ 484 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698