| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_PARSING_PREPARSER_H | 5 #ifndef V8_PARSING_PREPARSER_H |
| 6 #define V8_PARSING_PREPARSER_H | 6 #define V8_PARSING_PREPARSER_H |
| 7 | 7 |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/parsing/parser-base.h" | 9 #include "src/parsing/parser-base.h" |
| 10 | 10 |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 } | 816 } |
| 817 | 817 |
| 818 // Parses a single function literal, from the opening parentheses before | 818 // Parses a single function literal, from the opening parentheses before |
| 819 // parameters to the closing brace after the body. | 819 // parameters to the closing brace after the body. |
| 820 // Returns a FunctionEntry describing the body of the function in enough | 820 // Returns a FunctionEntry describing the body of the function in enough |
| 821 // detail that it can be lazily compiled. | 821 // detail that it can be lazily compiled. |
| 822 // The scanner is expected to have matched the "function" or "function*" | 822 // The scanner is expected to have matched the "function" or "function*" |
| 823 // keyword and parameters, and have consumed the initial '{'. | 823 // keyword and parameters, and have consumed the initial '{'. |
| 824 // At return, unless an error occurred, the scanner is positioned before the | 824 // At return, unless an error occurred, the scanner is positioned before the |
| 825 // the final '}'. | 825 // the final '}'. |
| 826 PreParseResult PreParseLazyFunction(FunctionKind kind, | 826 PreParseResult PreParseLazyFunction(DeclarationScope* function_scope, |
| 827 DeclarationScope* function_scope, | |
| 828 bool parsing_module, ParserRecorder* log, | 827 bool parsing_module, ParserRecorder* log, |
| 829 bool track_unresolved_variables, | 828 bool track_unresolved_variables, |
| 830 bool may_abort, int* use_counts); | 829 bool may_abort, int* use_counts); |
| 831 | 830 |
| 832 private: | 831 private: |
| 833 // These types form an algebra over syntactic categories that is just | 832 // These types form an algebra over syntactic categories that is just |
| 834 // rich enough to let us recognize and propagate the constructs that | 833 // rich enough to let us recognize and propagate the constructs that |
| 835 // are either being counted in the preparser data, or is important | 834 // are either being counted in the preparser data, or is important |
| 836 // to throw the correct syntax error exceptions. | 835 // to throw the correct syntax error exceptions. |
| 837 | 836 |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1462 function_state_->NextMaterializedLiteralIndex(); | 1461 function_state_->NextMaterializedLiteralIndex(); |
| 1463 function_state_->NextMaterializedLiteralIndex(); | 1462 function_state_->NextMaterializedLiteralIndex(); |
| 1464 } | 1463 } |
| 1465 return EmptyExpression(); | 1464 return EmptyExpression(); |
| 1466 } | 1465 } |
| 1467 | 1466 |
| 1468 } // namespace internal | 1467 } // namespace internal |
| 1469 } // namespace v8 | 1468 } // namespace v8 |
| 1470 | 1469 |
| 1471 #endif // V8_PARSING_PREPARSER_H | 1470 #endif // V8_PARSING_PREPARSER_H |
| OLD | NEW |