Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: src/parsing/parsing.h

Issue 2534393002: Split parsing of functions and top-level code into two separate methods (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/parsing/parsing.h
diff --git a/src/parsing/parsing.h b/src/parsing/parsing.h
new file mode 100644
index 0000000000000000000000000000000000000000..025ce43a53d46b8767f3452c7a493a4035968321
--- /dev/null
+++ b/src/parsing/parsing.h
@@ -0,0 +1,27 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_PARSING_PARSING_H_
+#define V8_PARSING_PARSING_H_
+
+namespace v8 {
+namespace internal {
+
+class ParseInfo;
+
+namespace parsing {
+
+// Parses the top-level source code represented by the parse info and sets its
+// function literal. Returns false (and deallocates any allocated AST
+// nodes) if parsing failed.
+bool ParseProgram(ParseInfo* info);
+
+// Like ParseProgram but for an individual function.
+bool ParseFunction(ParseInfo* info);
+
+} // namespace parsing
+} // namespace internal
+} // namespace v8
+
+#endif // V8_PARSING_PARSING_H_

Powered by Google App Engine
This is Rietveld 408576698