| 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_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/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 bool IsEvalOrArguments(const AstRawString* identifier) const; | 400 bool IsEvalOrArguments(const AstRawString* identifier) const; |
| 401 bool IsUndefined(const AstRawString* identifier) const; | 401 bool IsUndefined(const AstRawString* identifier) const; |
| 402 bool IsAwait(const AstRawString* identifier) const; | 402 bool IsAwait(const AstRawString* identifier) const; |
| 403 V8_INLINE bool IsFutureStrictReserved(const AstRawString* identifier) const; | 403 V8_INLINE bool IsFutureStrictReserved(const AstRawString* identifier) const; |
| 404 | 404 |
| 405 // Returns true if the expression is of type "this.foo". | 405 // Returns true if the expression is of type "this.foo". |
| 406 static bool IsThisProperty(Expression* expression); | 406 static bool IsThisProperty(Expression* expression); |
| 407 | 407 |
| 408 static bool IsIdentifier(Expression* expression); | 408 static bool IsIdentifier(Expression* expression); |
| 409 | 409 |
| 410 bool IsPrototype(const AstRawString* identifier) const; | |
| 411 | |
| 412 bool IsConstructor(const AstRawString* identifier) const; | |
| 413 | |
| 414 static const AstRawString* AsIdentifier(Expression* expression) { | 410 static const AstRawString* AsIdentifier(Expression* expression) { |
| 415 DCHECK(IsIdentifier(expression)); | 411 DCHECK(IsIdentifier(expression)); |
| 416 return expression->AsVariableProxy()->raw_name(); | 412 return expression->AsVariableProxy()->raw_name(); |
| 417 } | 413 } |
| 418 | 414 |
| 415 bool IsPrototype(const AstRawString* identifier) const; |
| 416 |
| 417 bool IsConstructor(const AstRawString* identifier) const; |
| 418 |
| 419 bool IsDirectEvalCall(Expression* expression) { | 419 bool IsDirectEvalCall(Expression* expression) { |
| 420 if (!expression->IsCall()) return false; | 420 if (!expression->IsCall()) return false; |
| 421 expression = expression->AsCall()->expression(); | 421 expression = expression->AsCall()->expression(); |
| 422 return IsIdentifier(expression) && IsEval(AsIdentifier(expression)); | 422 return IsIdentifier(expression) && IsEval(AsIdentifier(expression)); |
| 423 } | 423 } |
| 424 | 424 |
| 425 static bool IsBoilerplateProperty(ObjectLiteral::Property* property) { | 425 static bool IsBoilerplateProperty(ObjectLiteral::Property* property) { |
| 426 return ObjectLiteral::IsBoilerplateProperty(property); | 426 return ObjectLiteral::IsBoilerplateProperty(property); |
| 427 } | 427 } |
| 428 | 428 |
| (...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 | 1352 |
| 1353 Expression* ParserTraits::RewriteYieldStar(Expression* generator, | 1353 Expression* ParserTraits::RewriteYieldStar(Expression* generator, |
| 1354 Expression* iterable, int pos) { | 1354 Expression* iterable, int pos) { |
| 1355 return parser_->RewriteYieldStar(generator, iterable, pos); | 1355 return parser_->RewriteYieldStar(generator, iterable, pos); |
| 1356 } | 1356 } |
| 1357 | 1357 |
| 1358 } // namespace internal | 1358 } // namespace internal |
| 1359 } // namespace v8 | 1359 } // namespace v8 |
| 1360 | 1360 |
| 1361 #endif // V8_PARSING_PARSER_H_ | 1361 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |