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

Side by Side Diff: src/scanner.h

Issue 8226017: Introduce collective --harmony flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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/preparser.cc ('k') | src/scanner.cc » ('j') | src/v8.cc » ('J')
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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 // Returns the location of the last seen octal literal 502 // Returns the location of the last seen octal literal
503 Location octal_position() const { return octal_pos_; } 503 Location octal_position() const { return octal_pos_; }
504 void clear_octal_position() { octal_pos_ = Location::invalid(); } 504 void clear_octal_position() { octal_pos_ = Location::invalid(); }
505 505
506 // Seek forward to the given position. This operation does not 506 // Seek forward to the given position. This operation does not
507 // work in general, for instance when there are pushed back 507 // work in general, for instance when there are pushed back
508 // characters, but works for seeking forward until simple delimiter 508 // characters, but works for seeking forward until simple delimiter
509 // tokens, which is what it is used for. 509 // tokens, which is what it is used for.
510 void SeekForward(int pos); 510 void SeekForward(int pos);
511 511
512 bool HarmonyBlockScoping() const { 512 bool HarmonyScoping() const {
513 return harmony_block_scoping_; 513 return harmony_scoping_;
514 } 514 }
515 void SetHarmonyBlockScoping(bool block_scoping) { 515 void SetHarmonyScoping(bool block_scoping) {
516 harmony_block_scoping_ = block_scoping; 516 harmony_scoping_ = block_scoping;
517 } 517 }
518 518
519 519
520 protected: 520 protected:
521 bool SkipWhiteSpace(); 521 bool SkipWhiteSpace();
522 Token::Value SkipSingleLineComment(); 522 Token::Value SkipSingleLineComment();
523 Token::Value SkipMultiLineComment(); 523 Token::Value SkipMultiLineComment();
524 524
525 // Scans a single JavaScript token. 525 // Scans a single JavaScript token.
526 void Scan(); 526 void Scan();
(...skipping 22 matching lines...) Expand all
549 549
550 // Whether there is a line terminator whitespace character after 550 // Whether there is a line terminator whitespace character after
551 // the current token, and before the next. Does not count newlines 551 // the current token, and before the next. Does not count newlines
552 // inside multiline comments. 552 // inside multiline comments.
553 bool has_line_terminator_before_next_; 553 bool has_line_terminator_before_next_;
554 // Whether there is a multi-line comment that contains a 554 // Whether there is a multi-line comment that contains a
555 // line-terminator after the current token, and before the next. 555 // line-terminator after the current token, and before the next.
556 bool has_multiline_comment_before_next_; 556 bool has_multiline_comment_before_next_;
557 // Whether we scan 'let' as a keyword for harmony block scoped 557 // Whether we scan 'let' as a keyword for harmony block scoped
558 // let bindings. 558 // let bindings.
559 bool harmony_block_scoping_; 559 bool harmony_scoping_;
560 }; 560 };
561 561
562 } } // namespace v8::internal 562 } } // namespace v8::internal
563 563
564 #endif // V8_SCANNER_H_ 564 #endif // V8_SCANNER_H_
OLDNEW
« no previous file with comments | « src/preparser.cc ('k') | src/scanner.cc » ('j') | src/v8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698