| OLD | NEW |
| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 void SkipListLiteral(); | 236 void SkipListLiteral(); |
| 237 void SkipFunctionLiteral(); | 237 void SkipFunctionLiteral(); |
| 238 void SkipStringLiteral(); | 238 void SkipStringLiteral(); |
| 239 void SkipQualIdent(); | 239 void SkipQualIdent(); |
| 240 | 240 |
| 241 void CheckConstructorCallTypeArguments( | 241 void CheckConstructorCallTypeArguments( |
| 242 intptr_t pos, | 242 intptr_t pos, |
| 243 Function& constructor, | 243 Function& constructor, |
| 244 const AbstractTypeArguments& type_arguments); | 244 const AbstractTypeArguments& type_arguments); |
| 245 | 245 |
| 246 // Format an error or warning message into the message_buffer. | |
| 247 // A null script means no source and a negative token_pos means no position. | 246 // A null script means no source and a negative token_pos means no position. |
| 248 static void FormatMessage(const Script& script, | 247 static RawString* FormatMessage(const Script& script, |
| 249 intptr_t token_pos, | 248 intptr_t token_pos, |
| 250 const char* message_header, | 249 const char* message_header, |
| 251 char* message_buffer, | 250 const char* format, |
| 252 intptr_t message_buffer_size, | 251 va_list args); |
| 253 const char* format, | |
| 254 va_list args); | |
| 255 | 252 |
| 256 // Reports error/warning message at location of current token. | 253 // Reports error/warning message at location of current token. |
| 257 void ErrorMsg(const char* msg, ...) PRINTF_ATTRIBUTE(2, 3); | 254 void ErrorMsg(const char* msg, ...) PRINTF_ATTRIBUTE(2, 3); |
| 258 void Warning(const char* msg, ...) PRINTF_ATTRIBUTE(2, 3); | 255 void Warning(const char* msg, ...) PRINTF_ATTRIBUTE(2, 3); |
| 259 void Unimplemented(const char* msg); | 256 void Unimplemented(const char* msg); |
| 260 | 257 |
| 261 // Reports error message at given location. | 258 // Reports error message at given location. |
| 262 void ErrorMsg(intptr_t token_pos, const char* msg, ...) | 259 void ErrorMsg(intptr_t token_pos, const char* msg, ...) |
| 263 PRINTF_ATTRIBUTE(3, 4); | 260 PRINTF_ATTRIBUTE(3, 4); |
| 264 void Warning(intptr_t token_pos, const char* msg, ...) | 261 void Warning(intptr_t token_pos, const char* msg, ...) |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 | 604 |
| 608 // Allocate temporary only once per function. | 605 // Allocate temporary only once per function. |
| 609 LocalVariable* expression_temp_; | 606 LocalVariable* expression_temp_; |
| 610 | 607 |
| 611 DISALLOW_COPY_AND_ASSIGN(Parser); | 608 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 612 }; | 609 }; |
| 613 | 610 |
| 614 } // namespace dart | 611 } // namespace dart |
| 615 | 612 |
| 616 #endif // VM_PARSER_H_ | 613 #endif // VM_PARSER_H_ |
| OLD | NEW |