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

Side by Side Diff: src/parsing/parser.h

Issue 2305523002: [parser] Clean up ParserBase typedefs (Closed)
Patch Set: document Block typedef Created 4 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_PARSER_H_ 5 #ifndef V8_PARSING_PARSER_H_
6 #define V8_PARSING_PARSER_H_ 6 #define V8_PARSING_PARSER_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/parsing/parser-base.h" 10 #include "src/parsing/parser-base.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 const Parameter& at(int i) const { return params[i]; } 137 const Parameter& at(int i) const { return params[i]; }
138 }; 138 };
139 139
140 template <> 140 template <>
141 struct ParserTypes<Parser> { 141 struct ParserTypes<Parser> {
142 typedef ParserBase<Parser> Base; 142 typedef ParserBase<Parser> Base;
143 typedef Parser Impl; 143 typedef Parser Impl;
144 144
145 typedef Variable GeneratorVariable; 145 typedef Variable GeneratorVariable;
146 146
147 typedef v8::internal::AstProperties AstProperties;
148
149 // Return types for traversing functions. 147 // Return types for traversing functions.
150 typedef const AstRawString* Identifier; 148 typedef const AstRawString* Identifier;
151 typedef v8::internal::Expression* Expression; 149 typedef v8::internal::Expression* Expression;
152 typedef Yield* YieldExpression;
153 typedef v8::internal::FunctionLiteral* FunctionLiteral; 150 typedef v8::internal::FunctionLiteral* FunctionLiteral;
154 typedef v8::internal::ClassLiteral* ClassLiteral;
155 typedef v8::internal::Literal* Literal;
156 typedef ObjectLiteral::Property* ObjectLiteralProperty; 151 typedef ObjectLiteral::Property* ObjectLiteralProperty;
157 typedef ZoneList<v8::internal::Expression*>* ExpressionList; 152 typedef ZoneList<v8::internal::Expression*>* ExpressionList;
158 typedef ZoneList<ObjectLiteral::Property*>* PropertyList; 153 typedef ZoneList<ObjectLiteral::Property*>* PropertyList;
159 typedef ParserFormalParameters::Parameter FormalParameter;
160 typedef ParserFormalParameters FormalParameters; 154 typedef ParserFormalParameters FormalParameters;
161 typedef ZoneList<v8::internal::Statement*>* StatementList; 155 typedef ZoneList<v8::internal::Statement*>* StatementList;
162 typedef v8::internal::Block* Block; 156 typedef v8::internal::Block* Block;
163 157
164 // For constructing objects returned by the traversing functions. 158 // For constructing objects returned by the traversing functions.
165 typedef AstNodeFactory Factory; 159 typedef AstNodeFactory Factory;
166 }; 160 };
167 161
168 class Parser : public ParserBase<Parser> { 162 class Parser : public ParserBase<Parser> {
169 public: 163 public:
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 static const int kLiteralTypeSlot = 0; 1055 static const int kLiteralTypeSlot = 0;
1062 static const int kElementsSlot = 1; 1056 static const int kElementsSlot = 1;
1063 1057
1064 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 1058 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
1065 }; 1059 };
1066 1060
1067 } // namespace internal 1061 } // namespace internal
1068 } // namespace v8 1062 } // namespace v8
1069 1063
1070 #endif // V8_PARSING_PARSER_H_ 1064 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698