Chromium Code Reviews| 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 "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 // Parse top level of a class and register all functions/fields. | 137 // Parse top level of a class and register all functions/fields. |
| 138 static void ParseClass(const Class& cls); | 138 static void ParseClass(const Class& cls); |
| 139 | 139 |
| 140 static void ParseFunction(ParsedFunction* parsed_function); | 140 static void ParseFunction(ParsedFunction* parsed_function); |
| 141 | 141 |
| 142 // Parse and evaluate the metadata expressions at token_pos in the | 142 // Parse and evaluate the metadata expressions at token_pos in the |
| 143 // class namespace of class cls (which can be the implicit toplevel | 143 // class namespace of class cls (which can be the implicit toplevel |
| 144 // class if the metadata is at the top-level). | 144 // class if the metadata is at the top-level). |
| 145 static RawObject* ParseMetadata(const Class& cls, intptr_t token_pos); | 145 static RawObject* ParseMetadata(const Class& cls, intptr_t token_pos); |
| 146 | 146 |
| 147 static RawObject* ParseFunctionParameters(const Function& func); | |
|
hausner
2013/08/26 15:40:51
Please add a comment that describes what the funct
Michael Lippautz (Google)
2013/08/26 19:45:57
Done.
| |
| 148 | |
| 147 // Format and print a message with source location. | 149 // Format and print a message with source location. |
| 148 // A null script means no source and a negative token_pos means no position. | 150 // A null script means no source and a negative token_pos means no position. |
| 149 static void PrintMessage(const Script& script, | 151 static void PrintMessage(const Script& script, |
| 150 intptr_t token_pos, | 152 intptr_t token_pos, |
| 151 const char* message_header, | 153 const char* message_header, |
| 152 const char* format, ...) PRINTF_ATTRIBUTE(4, 5); | 154 const char* format, ...) PRINTF_ATTRIBUTE(4, 5); |
| 153 | 155 |
| 154 // Build an error object containing a formatted error or warning message. | 156 // Build an error object containing a formatted error or warning message. |
| 155 // A null script means no source and a negative token_pos means no position. | 157 // A null script means no source and a negative token_pos means no position. |
| 156 static RawError* FormatError(const Script& script, | 158 static RawError* FormatError(const Script& script, |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 692 // Each try in this function gets its own try index. | 694 // Each try in this function gets its own try index. |
| 693 intptr_t AllocateTryIndex() { return ++last_used_try_index_; } | 695 intptr_t AllocateTryIndex() { return ++last_used_try_index_; } |
| 694 intptr_t last_used_try_index_; | 696 intptr_t last_used_try_index_; |
| 695 | 697 |
| 696 DISALLOW_COPY_AND_ASSIGN(Parser); | 698 DISALLOW_COPY_AND_ASSIGN(Parser); |
| 697 }; | 699 }; |
| 698 | 700 |
| 699 } // namespace dart | 701 } // namespace dart |
| 700 | 702 |
| 701 #endif // VM_PARSER_H_ | 703 #endif // VM_PARSER_H_ |
| OLD | NEW |