| Index: src/parser.h
|
| diff --git a/src/parser.h b/src/parser.h
|
| index a34425250f78856a889b730abc68ac3308f0297a..f0f40e6d688cf1eb7f8c43cffc605920a060037f 100644
|
| --- a/src/parser.h
|
| +++ b/src/parser.h
|
| @@ -363,6 +363,7 @@ class ParserTraits {
|
| typedef v8::internal::Expression* Expression;
|
| typedef Yield* YieldExpression;
|
| typedef v8::internal::FunctionLiteral* FunctionLiteral;
|
| + typedef v8::internal::ClassLiteral* ClassLiteral;
|
| typedef v8::internal::Literal* Literal;
|
| typedef ObjectLiteral::Property* ObjectLiteralProperty;
|
| typedef ZoneList<v8::internal::Expression*>* ExpressionList;
|
| @@ -401,6 +402,10 @@ class ParserTraits {
|
|
|
| static bool IsIdentifier(Expression* expression);
|
|
|
| + bool IsPrototype(const AstRawString* identifier) const;
|
| +
|
| + bool IsConstructor(const AstRawString* identifier) const;
|
| +
|
| static const AstRawString* AsIdentifier(Expression* expression) {
|
| DCHECK(IsIdentifier(expression));
|
| return expression->AsVariableProxy()->raw_name();
|
| @@ -518,6 +523,8 @@ class ParserTraits {
|
| return NULL;
|
| }
|
| static ObjectLiteralProperty* EmptyObjectLiteralProperty() { return NULL; }
|
| + static FunctionLiteral* EmptyFunctionLiteral() { return NULL; }
|
| + static ClassLiteral* EmptyClassLiteral() { return NULL; }
|
|
|
| // Used in error return values.
|
| static ZoneList<Expression*>* NullExpressionList() {
|
| @@ -695,6 +702,8 @@ class Parser : public ParserBase<ParserTraits> {
|
| Statement* ParseStatement(ZoneList<const AstRawString*>* labels, bool* ok);
|
| Statement* ParseFunctionDeclaration(ZoneList<const AstRawString*>* names,
|
| bool* ok);
|
| + Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names,
|
| + bool* ok);
|
| Statement* ParseNativeDeclaration(bool* ok);
|
| Block* ParseBlock(ZoneList<const AstRawString*>* labels, bool* ok);
|
| Block* ParseVariableStatement(VariableDeclarationContext var_context,
|
|
|