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

Side by Side Diff: src/parser.h

Issue 997823003: [es6] support rest parameters in arrow functions (alternative) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « src/hydrogen.cc ('k') | src/parser.cc » ('j') | src/preparser.h » ('J')
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_PARSER_H_ 5 #ifndef V8_PARSER_H_
6 #define V8_PARSER_H_ 6 #define V8_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/compiler.h" // TODO(titzer): remove this include dependency 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 V8_INLINE void AddTemplateSpan(TemplateLiteralState* state, bool tail); 810 V8_INLINE void AddTemplateSpan(TemplateLiteralState* state, bool tail);
811 V8_INLINE void AddTemplateExpression(TemplateLiteralState* state, 811 V8_INLINE void AddTemplateExpression(TemplateLiteralState* state,
812 Expression* expression); 812 Expression* expression);
813 V8_INLINE Expression* CloseTemplateLiteral(TemplateLiteralState* state, 813 V8_INLINE Expression* CloseTemplateLiteral(TemplateLiteralState* state,
814 int start, Expression* tag); 814 int start, Expression* tag);
815 V8_INLINE Expression* NoTemplateTag() { return NULL; } 815 V8_INLINE Expression* NoTemplateTag() { return NULL; }
816 V8_INLINE static bool IsTaggedTemplate(const Expression* tag) { 816 V8_INLINE static bool IsTaggedTemplate(const Expression* tag) {
817 return tag != NULL; 817 return tag != NULL;
818 } 818 }
819 819
820 Expression* SpreadExpression(Expression* node) {
821 return node->AsSpread()->expression();
822 }
823
820 private: 824 private:
821 Parser* parser_; 825 Parser* parser_;
822 }; 826 };
823 827
824 828
825 class Parser : public ParserBase<ParserTraits> { 829 class Parser : public ParserBase<ParserTraits> {
826 public: 830 public:
827 explicit Parser(ParseInfo* info); 831 explicit Parser(ParseInfo* info);
828 ~Parser() { 832 ~Parser() {
829 delete reusable_preparser_; 833 delete reusable_preparser_;
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 } 1132 }
1129 1133
1130 1134
1131 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, 1135 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state,
1132 int start, Expression* tag) { 1136 int start, Expression* tag) {
1133 return parser_->CloseTemplateLiteral(state, start, tag); 1137 return parser_->CloseTemplateLiteral(state, start, tag);
1134 } 1138 }
1135 } } // namespace v8::internal 1139 } } // namespace v8::internal
1136 1140
1137 #endif // V8_PARSER_H_ 1141 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/parser.cc » ('j') | src/preparser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698