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

Side by Side Diff: src/scanner.h

Issue 953563002: Implement experimental exponentiation operator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add more tests and fix some bugs Created 5 years, 10 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 // Features shared by parsing and pre-parsing scanners. 5 // Features shared by parsing and pre-parsing scanners.
6 6
7 #ifndef V8_SCANNER_H_ 7 #ifndef V8_SCANNER_H_
8 #define V8_SCANNER_H_ 8 #define V8_SCANNER_H_
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 bool HarmonyClasses() const { 463 bool HarmonyClasses() const {
464 return harmony_classes_; 464 return harmony_classes_;
465 } 465 }
466 void SetHarmonyClasses(bool classes) { 466 void SetHarmonyClasses(bool classes) {
467 harmony_classes_ = classes; 467 harmony_classes_ = classes;
468 } 468 }
469 bool HarmonyTemplates() const { return harmony_templates_; } 469 bool HarmonyTemplates() const { return harmony_templates_; }
470 void SetHarmonyTemplates(bool templates) { harmony_templates_ = templates; } 470 void SetHarmonyTemplates(bool templates) { harmony_templates_ = templates; }
471 bool HarmonyUnicode() const { return harmony_unicode_; } 471 bool HarmonyUnicode() const { return harmony_unicode_; }
472 void SetHarmonyUnicode(bool unicode) { harmony_unicode_ = unicode; } 472 void SetHarmonyUnicode(bool unicode) { harmony_unicode_ = unicode; }
473 bool HarmonyExponentiation() const { return harmony_exponentiation_; }
474 void SetHarmonyExponentiation(bool exp) { harmony_exponentiation_ = exp; }
473 475
474 // Returns true if there was a line terminator before the peek'ed token, 476 // Returns true if there was a line terminator before the peek'ed token,
475 // possibly inside a multi-line comment. 477 // possibly inside a multi-line comment.
476 bool HasAnyLineTerminatorBeforeNext() const { 478 bool HasAnyLineTerminatorBeforeNext() const {
477 return has_line_terminator_before_next_ || 479 return has_line_terminator_before_next_ ||
478 has_multiline_comment_before_next_; 480 has_multiline_comment_before_next_;
479 } 481 }
480 482
481 // Scans the input as a regular expression pattern, previous 483 // Scans the input as a regular expression pattern, previous
482 // character(s) must be /(=). Returns true if a pattern is scanned. 484 // character(s) must be /(=). Returns true if a pattern is scanned.
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 // Whether we scan 'module', 'import', 'export' as keywords. 739 // Whether we scan 'module', 'import', 'export' as keywords.
738 bool harmony_modules_; 740 bool harmony_modules_;
739 // Whether we scan 0o777 and 0b111 as numbers. 741 // Whether we scan 0o777 and 0b111 as numbers.
740 bool harmony_numeric_literals_; 742 bool harmony_numeric_literals_;
741 // Whether we scan 'class', 'extends', 'static' and 'super' as keywords. 743 // Whether we scan 'class', 'extends', 'static' and 'super' as keywords.
742 bool harmony_classes_; 744 bool harmony_classes_;
743 // Whether we scan TEMPLATE_SPAN and TEMPLATE_TAIL 745 // Whether we scan TEMPLATE_SPAN and TEMPLATE_TAIL
744 bool harmony_templates_; 746 bool harmony_templates_;
745 // Whether we allow \u{xxxxx}. 747 // Whether we allow \u{xxxxx}.
746 bool harmony_unicode_; 748 bool harmony_unicode_;
749 // Whether we allow x ** y or x **= y
750 bool harmony_exponentiation_;
747 }; 751 };
748 752
749 } } // namespace v8::internal 753 } } // namespace v8::internal
750 754
751 #endif // V8_SCANNER_H_ 755 #endif // V8_SCANNER_H_
OLDNEW
« src/compiler/typer.cc ('K') | « src/runtime.js ('k') | src/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698