| 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_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 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 | 1368 |
| 1369 // Producing data during the recursive descent. | 1369 // Producing data during the recursive descent. |
| 1370 PreParserIdentifier GetSymbol(Scanner* scanner); | 1370 PreParserIdentifier GetSymbol(Scanner* scanner); |
| 1371 PreParserIdentifier GetNumberAsSymbol(Scanner* scanner); | 1371 PreParserIdentifier GetNumberAsSymbol(Scanner* scanner); |
| 1372 | 1372 |
| 1373 static PreParserIdentifier GetNextSymbol(Scanner* scanner) { | 1373 static PreParserIdentifier GetNextSymbol(Scanner* scanner) { |
| 1374 return PreParserIdentifier::Default(); | 1374 return PreParserIdentifier::Default(); |
| 1375 } | 1375 } |
| 1376 | 1376 |
| 1377 static PreParserExpression ThisExpression(Scope* scope, | 1377 static PreParserExpression ThisExpression(Scope* scope, |
| 1378 PreParserFactory* factory) { | 1378 PreParserFactory* factory, |
| 1379 int pos) { |
| 1379 return PreParserExpression::This(); | 1380 return PreParserExpression::This(); |
| 1380 } | 1381 } |
| 1381 | 1382 |
| 1382 static PreParserExpression SuperReference(Scope* scope, | 1383 static PreParserExpression SuperReference(Scope* scope, |
| 1383 PreParserFactory* factory) { | 1384 PreParserFactory* factory) { |
| 1384 return PreParserExpression::Super(); | 1385 return PreParserExpression::Super(); |
| 1385 } | 1386 } |
| 1386 | 1387 |
| 1387 static PreParserExpression DefaultConstructor(bool call_super, Scope* scope, | 1388 static PreParserExpression DefaultConstructor(bool call_super, Scope* scope, |
| 1388 int pos, int end_pos) { | 1389 int pos, int end_pos) { |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1843 // '(' Expression ')' | 1844 // '(' Expression ')' |
| 1844 // TemplateLiteral | 1845 // TemplateLiteral |
| 1845 | 1846 |
| 1846 int pos = peek_position(); | 1847 int pos = peek_position(); |
| 1847 ExpressionT result = this->EmptyExpression(); | 1848 ExpressionT result = this->EmptyExpression(); |
| 1848 Token::Value token = peek(); | 1849 Token::Value token = peek(); |
| 1849 switch (token) { | 1850 switch (token) { |
| 1850 case Token::THIS: { | 1851 case Token::THIS: { |
| 1851 Consume(Token::THIS); | 1852 Consume(Token::THIS); |
| 1852 scope_->RecordThisUsage(); | 1853 scope_->RecordThisUsage(); |
| 1853 result = this->ThisExpression(scope_, factory()); | 1854 result = this->ThisExpression(scope_, factory(), pos); |
| 1854 break; | 1855 break; |
| 1855 } | 1856 } |
| 1856 | 1857 |
| 1857 case Token::NULL_LITERAL: | 1858 case Token::NULL_LITERAL: |
| 1858 case Token::TRUE_LITERAL: | 1859 case Token::TRUE_LITERAL: |
| 1859 case Token::FALSE_LITERAL: | 1860 case Token::FALSE_LITERAL: |
| 1860 case Token::NUMBER: | 1861 case Token::NUMBER: |
| 1861 Next(); | 1862 Next(); |
| 1862 result = this->ExpressionFromLiteral(token, pos, scanner(), factory()); | 1863 result = this->ExpressionFromLiteral(token, pos, scanner(), factory()); |
| 1863 break; | 1864 break; |
| (...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3082 *ok = false; | 3083 *ok = false; |
| 3083 return; | 3084 return; |
| 3084 } | 3085 } |
| 3085 has_seen_constructor_ = true; | 3086 has_seen_constructor_ = true; |
| 3086 return; | 3087 return; |
| 3087 } | 3088 } |
| 3088 } | 3089 } |
| 3089 } } // v8::internal | 3090 } } // v8::internal |
| 3090 | 3091 |
| 3091 #endif // V8_PREPARSER_H | 3092 #endif // V8_PREPARSER_H |
| OLD | NEW |