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

Side by Side Diff: src/preparser.h

Issue 1184373002: [parser] parse `CalllExpression TemplateLiteral` production (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | test/mjsunit/es6/templates.js » ('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_PREPARSER_H 5 #ifndef V8_PREPARSER_H
6 #define V8_PREPARSER_H 6 #define V8_PREPARSER_H
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 3077 matching lines...) Expand 10 before | Expand all | Expand 10 after
3088 BindingPatternUnexpectedToken(classifier); 3088 BindingPatternUnexpectedToken(classifier);
3089 Consume(Token::PERIOD); 3089 Consume(Token::PERIOD);
3090 int pos = position(); 3090 int pos = position();
3091 IdentifierT name = ParseIdentifierName(CHECK_OK); 3091 IdentifierT name = ParseIdentifierName(CHECK_OK);
3092 result = factory()->NewProperty( 3092 result = factory()->NewProperty(
3093 result, factory()->NewStringLiteral(name, pos), pos); 3093 result, factory()->NewStringLiteral(name, pos), pos);
3094 if (fni_ != NULL) this->PushLiteralName(fni_, name); 3094 if (fni_ != NULL) this->PushLiteralName(fni_, name);
3095 break; 3095 break;
3096 } 3096 }
3097 3097
3098 case Token::TEMPLATE_SPAN:
3099 case Token::TEMPLATE_TAIL: {
3100 BindingPatternUnexpectedToken(classifier);
3101 result = ParseTemplateLiteral(result, position(), classifier, CHECK_OK);
3102 break;
3103 }
3104
3098 default: 3105 default:
3099 return result; 3106 return result;
3100 } 3107 }
3101 } 3108 }
3102 } 3109 }
3103 3110
3104 3111
3105 template <class Traits> 3112 template <class Traits>
3106 typename ParserBase<Traits>::ExpressionT 3113 typename ParserBase<Traits>::ExpressionT
3107 ParserBase<Traits>::ParseMemberWithNewPrefixesExpression( 3114 ParserBase<Traits>::ParseMemberWithNewPrefixesExpression(
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
3857 *ok = false; 3864 *ok = false;
3858 return; 3865 return;
3859 } 3866 }
3860 has_seen_constructor_ = true; 3867 has_seen_constructor_ = true;
3861 return; 3868 return;
3862 } 3869 }
3863 } 3870 }
3864 } } // v8::internal 3871 } } // v8::internal
3865 3872
3866 #endif // V8_PREPARSER_H 3873 #endif // V8_PREPARSER_H
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/es6/templates.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698