| OLD | NEW | 
|    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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  443   // characters, but works for seeking forward until simple delimiter |  443   // characters, but works for seeking forward until simple delimiter | 
|  444   // tokens, which is what it is used for. |  444   // tokens, which is what it is used for. | 
|  445   void SeekForward(int pos); |  445   void SeekForward(int pos); | 
|  446  |  446  | 
|  447   bool HarmonyModules() const { |  447   bool HarmonyModules() const { | 
|  448     return harmony_modules_; |  448     return harmony_modules_; | 
|  449   } |  449   } | 
|  450   void SetHarmonyModules(bool modules) { |  450   void SetHarmonyModules(bool modules) { | 
|  451     harmony_modules_ = modules; |  451     harmony_modules_ = modules; | 
|  452   } |  452   } | 
|  453   bool HarmonyNumericLiterals() const { |  | 
|  454     return harmony_numeric_literals_; |  | 
|  455   } |  | 
|  456   void SetHarmonyNumericLiterals(bool numeric_literals) { |  | 
|  457     harmony_numeric_literals_ = numeric_literals; |  | 
|  458   } |  | 
|  459   bool HarmonyClasses() const { |  453   bool HarmonyClasses() const { | 
|  460     return harmony_classes_; |  454     return harmony_classes_; | 
|  461   } |  455   } | 
|  462   void SetHarmonyClasses(bool classes) { |  456   void SetHarmonyClasses(bool classes) { | 
|  463     harmony_classes_ = classes; |  457     harmony_classes_ = classes; | 
|  464   } |  458   } | 
|  465   bool HarmonyUnicode() const { return harmony_unicode_; } |  459   bool HarmonyUnicode() const { return harmony_unicode_; } | 
|  466   void SetHarmonyUnicode(bool unicode) { harmony_unicode_ = unicode; } |  460   void SetHarmonyUnicode(bool unicode) { harmony_unicode_ = unicode; } | 
|  467  |  461  | 
|  468   // Returns true if there was a line terminator before the peek'ed token, |  462   // Returns true if there was a line terminator before the peek'ed token, | 
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  732  |  726  | 
|  733   // Whether there is a line terminator whitespace character after |  727   // Whether there is a line terminator whitespace character after | 
|  734   // the current token, and  before the next. Does not count newlines |  728   // the current token, and  before the next. Does not count newlines | 
|  735   // inside multiline comments. |  729   // inside multiline comments. | 
|  736   bool has_line_terminator_before_next_; |  730   bool has_line_terminator_before_next_; | 
|  737   // Whether there is a multi-line comment that contains a |  731   // Whether there is a multi-line comment that contains a | 
|  738   // line-terminator after the current token, and before the next. |  732   // line-terminator after the current token, and before the next. | 
|  739   bool has_multiline_comment_before_next_; |  733   bool has_multiline_comment_before_next_; | 
|  740   // Whether we scan 'module', 'import', 'export' as keywords. |  734   // Whether we scan 'module', 'import', 'export' as keywords. | 
|  741   bool harmony_modules_; |  735   bool harmony_modules_; | 
|  742   // Whether we scan 0o777 and 0b111 as numbers. |  | 
|  743   bool harmony_numeric_literals_; |  | 
|  744   // Whether we scan 'class', 'extends', 'static' and 'super' as keywords. |  736   // Whether we scan 'class', 'extends', 'static' and 'super' as keywords. | 
|  745   bool harmony_classes_; |  737   bool harmony_classes_; | 
|  746   // Whether we allow \u{xxxxx}. |  738   // Whether we allow \u{xxxxx}. | 
|  747   bool harmony_unicode_; |  739   bool harmony_unicode_; | 
|  748 }; |  740 }; | 
|  749  |  741  | 
|  750 } }  // namespace v8::internal |  742 } }  // namespace v8::internal | 
|  751  |  743  | 
|  752 #endif  // V8_SCANNER_H_ |  744 #endif  // V8_SCANNER_H_ | 
| OLD | NEW |