| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/scanner.h" | 5 #include "vm/scanner.h" |
| 6 | 6 |
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/object_store.h" | 10 #include "vm/object_store.h" |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 if (c0_ == '=') { | 744 if (c0_ == '=') { |
| 745 Recognize(Token::kGTE); | 745 Recognize(Token::kGTE); |
| 746 } else if (c0_ == '>') { | 746 } else if (c0_ == '>') { |
| 747 Recognize(Token::kSHR); | 747 Recognize(Token::kSHR); |
| 748 if (c0_ == '=') { | 748 if (c0_ == '=') { |
| 749 Recognize(Token::kASSIGN_SHR); | 749 Recognize(Token::kASSIGN_SHR); |
| 750 } | 750 } |
| 751 } | 751 } |
| 752 break; | 752 break; |
| 753 | 753 |
| 754 case '!': // ! != !== | 754 case '!': // ! != |
| 755 Recognize(Token::kNOT); | 755 Recognize(Token::kNOT); |
| 756 if (c0_ == '=') { | 756 if (c0_ == '=') { |
| 757 Recognize(Token::kNE); | 757 Recognize(Token::kNE); |
| 758 if (c0_ == '=') { | |
| 759 Recognize(Token::kNE_STRICT); | |
| 760 } | |
| 761 } | 758 } |
| 762 break; | 759 break; |
| 763 | 760 |
| 764 case '~': | 761 case '~': |
| 765 Recognize(Token::kBIT_NOT); | 762 Recognize(Token::kBIT_NOT); |
| 766 if (c0_ == '/') { | 763 if (c0_ == '/') { |
| 767 Recognize(Token::kTRUNCDIV); | 764 Recognize(Token::kTRUNCDIV); |
| 768 if (c0_ == '=') { | 765 if (c0_ == '=') { |
| 769 Recognize(Token::kASSIGN_TRUNCDIV); | 766 Recognize(Token::kASSIGN_TRUNCDIV); |
| 770 } | 767 } |
| 771 } | 768 } |
| 772 break; | 769 break; |
| 773 | 770 |
| 774 case '=': // = == === => | 771 case '=': // = == => |
| 775 Recognize(Token::kASSIGN); | 772 Recognize(Token::kASSIGN); |
| 776 if (c0_ == '=') { | 773 if (c0_ == '=') { |
| 777 Recognize(Token::kEQ); | 774 Recognize(Token::kEQ); |
| 778 if (c0_ == '=') { | |
| 779 Recognize(Token::kEQ_STRICT); | |
| 780 } | |
| 781 } else if (c0_ == '>') { | 775 } else if (c0_ == '>') { |
| 782 Recognize(Token::kARROW); | 776 Recognize(Token::kARROW); |
| 783 } | 777 } |
| 784 break; | 778 break; |
| 785 | 779 |
| 786 case '.': // . .. Number | 780 case '.': // . .. Number |
| 787 Recognize(Token::kPERIOD); | 781 Recognize(Token::kPERIOD); |
| 788 if (c0_ == '.') { | 782 if (c0_ == '.') { |
| 789 Recognize(Token::kCASCADE); | 783 Recognize(Token::kCASCADE); |
| 790 } else if (IsDecimalDigit(c0_)) { | 784 } else if (IsDecimalDigit(c0_)) { |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 "%c%#"Px"", kPrivateKeySeparator, key_value); | 961 "%c%#"Px"", kPrivateKeySeparator, key_value); |
| 968 const String& result = String::Handle(String::New(private_key, Heap::kOld)); | 962 const String& result = String::Handle(String::New(private_key, Heap::kOld)); |
| 969 return result.raw(); | 963 return result.raw(); |
| 970 } | 964 } |
| 971 | 965 |
| 972 | 966 |
| 973 void Scanner::InitOnce() { | 967 void Scanner::InitOnce() { |
| 974 } | 968 } |
| 975 | 969 |
| 976 } // namespace dart | 970 } // namespace dart |
| OLD | NEW |