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

Side by Side Diff: src/scanner.h

Issue 19300002: ES6: Add support for explicit octal and binary integer literals (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix long lines Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/runtime.cc ('k') | src/scanner.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 } 401 }
402 void SetHarmonyScoping(bool scoping) { 402 void SetHarmonyScoping(bool scoping) {
403 harmony_scoping_ = scoping; 403 harmony_scoping_ = scoping;
404 } 404 }
405 bool HarmonyModules() const { 405 bool HarmonyModules() const {
406 return harmony_modules_; 406 return harmony_modules_;
407 } 407 }
408 void SetHarmonyModules(bool modules) { 408 void SetHarmonyModules(bool modules) {
409 harmony_modules_ = modules; 409 harmony_modules_ = modules;
410 } 410 }
411 411 bool HarmonyNumericLiterals() const {
412 return harmony_numeric_literals_;
413 }
414 void SetHarmonyNumericLiterals(bool numeric_literals) {
415 harmony_numeric_literals_ = numeric_literals;
416 }
412 417
413 // Returns true if there was a line terminator before the peek'ed token, 418 // Returns true if there was a line terminator before the peek'ed token,
414 // possibly inside a multi-line comment. 419 // possibly inside a multi-line comment.
415 bool HasAnyLineTerminatorBeforeNext() const { 420 bool HasAnyLineTerminatorBeforeNext() const {
416 return has_line_terminator_before_next_ || 421 return has_line_terminator_before_next_ ||
417 has_multiline_comment_before_next_; 422 has_multiline_comment_before_next_;
418 } 423 }
419 424
420 // Scans the input as a regular expression pattern, previous 425 // Scans the input as a regular expression pattern, previous
421 // character(s) must be /(=). Returns true if a pattern is scanned. 426 // character(s) must be /(=). Returns true if a pattern is scanned.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 // the current token, and before the next. Does not count newlines 555 // the current token, and before the next. Does not count newlines
551 // inside multiline comments. 556 // inside multiline comments.
552 bool has_line_terminator_before_next_; 557 bool has_line_terminator_before_next_;
553 // Whether there is a multi-line comment that contains a 558 // Whether there is a multi-line comment that contains a
554 // line-terminator after the current token, and before the next. 559 // line-terminator after the current token, and before the next.
555 bool has_multiline_comment_before_next_; 560 bool has_multiline_comment_before_next_;
556 // Whether we scan 'let' as a keyword for harmony block-scoped let bindings. 561 // Whether we scan 'let' as a keyword for harmony block-scoped let bindings.
557 bool harmony_scoping_; 562 bool harmony_scoping_;
558 // Whether we scan 'module', 'import', 'export' as keywords. 563 // Whether we scan 'module', 'import', 'export' as keywords.
559 bool harmony_modules_; 564 bool harmony_modules_;
565 // Whether we scan 0o777 and 0b111 as numbers.
566 bool harmony_numeric_literals_;
560 }; 567 };
561 568
562 } } // namespace v8::internal 569 } } // namespace v8::internal
563 570
564 #endif // V8_SCANNER_H_ 571 #endif // V8_SCANNER_H_
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698