OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_PARSING_PARSING_H_ |
| 6 #define V8_PARSING_PARSING_H_ |
| 7 |
| 8 #include "src/globals.h" |
| 9 |
| 10 namespace v8 { |
| 11 namespace internal { |
| 12 |
| 13 class ParseInfo; |
| 14 |
| 15 namespace parsing { |
| 16 |
| 17 // Parses the top-level source code represented by the parse info and sets its |
| 18 // function literal. Returns false (and deallocates any allocated AST |
| 19 // nodes) if parsing failed. |
| 20 V8_EXPORT_PRIVATE bool ParseProgram(ParseInfo* info); |
| 21 |
| 22 // Like ParseProgram but for an individual function. |
| 23 V8_EXPORT_PRIVATE bool ParseFunction(ParseInfo* info); |
| 24 |
| 25 // If you don't know whether info->is_toplevel() is true or not, use this method |
| 26 // to dispatch to either of the above functions. Prefer to use the above methods |
| 27 // whenever possible. |
| 28 V8_EXPORT_PRIVATE bool ParseAny(ParseInfo* info); |
| 29 |
| 30 } // namespace parsing |
| 31 } // namespace internal |
| 32 } // namespace v8 |
| 33 |
| 34 #endif // V8_PARSING_PARSING_H_ |
OLD | NEW |