| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 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 | 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 #include "src/parsing/parsing.h" | 5 #include "src/parsing/parsing.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/objects-inl.h" |
| 10 #include "src/parsing/parse-info.h" | 11 #include "src/parsing/parse-info.h" |
| 11 #include "src/parsing/parser.h" | 12 #include "src/parsing/parser.h" |
| 12 | 13 |
| 13 namespace v8 { | 14 namespace v8 { |
| 14 namespace internal { | 15 namespace internal { |
| 15 namespace parsing { | 16 namespace parsing { |
| 16 | 17 |
| 17 bool ParseProgram(ParseInfo* info) { | 18 bool ParseProgram(ParseInfo* info) { |
| 18 DCHECK(info->is_toplevel()); | 19 DCHECK(info->is_toplevel()); |
| 19 DCHECK_NULL(info->literal()); | 20 DCHECK_NULL(info->literal()); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 return (result != nullptr); | 53 return (result != nullptr); |
| 53 } | 54 } |
| 54 | 55 |
| 55 bool ParseAny(ParseInfo* info) { | 56 bool ParseAny(ParseInfo* info) { |
| 56 return info->is_toplevel() ? ParseProgram(info) : ParseFunction(info); | 57 return info->is_toplevel() ? ParseProgram(info) : ParseFunction(info); |
| 57 } | 58 } |
| 58 | 59 |
| 59 } // namespace parsing | 60 } // namespace parsing |
| 60 } // namespace internal | 61 } // namespace internal |
| 61 } // namespace v8 | 62 } // namespace v8 |
| OLD | NEW |