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 #include "src/scanner.h" | 7 #include "src/scanner.h" |
8 | 8 |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 return cp; | 1107 return cp; |
1108 } | 1108 } |
1109 return ScanHexNumber<capture_raw>(4); | 1109 return ScanHexNumber<capture_raw>(4); |
1110 } | 1110 } |
1111 | 1111 |
1112 | 1112 |
1113 // ---------------------------------------------------------------------------- | 1113 // ---------------------------------------------------------------------------- |
1114 // Keyword Matcher | 1114 // Keyword Matcher |
1115 | 1115 |
1116 #define KEYWORDS(KEYWORD_GROUP, KEYWORD) \ | 1116 #define KEYWORDS(KEYWORD_GROUP, KEYWORD) \ |
| 1117 KEYWORD_GROUP('a') \ |
| 1118 KEYWORD("async", Token::ASYNC) \ |
1117 KEYWORD_GROUP('b') \ | 1119 KEYWORD_GROUP('b') \ |
1118 KEYWORD("break", Token::BREAK) \ | 1120 KEYWORD("break", Token::BREAK) \ |
1119 KEYWORD_GROUP('c') \ | 1121 KEYWORD_GROUP('c') \ |
1120 KEYWORD("case", Token::CASE) \ | 1122 KEYWORD("case", Token::CASE) \ |
1121 KEYWORD("catch", Token::CATCH) \ | 1123 KEYWORD("catch", Token::CATCH) \ |
1122 KEYWORD("class", Token::CLASS) \ | 1124 KEYWORD("class", Token::CLASS) \ |
1123 KEYWORD("const", Token::CONST) \ | 1125 KEYWORD("const", Token::CONST) \ |
1124 KEYWORD("continue", Token::CONTINUE) \ | 1126 KEYWORD("continue", Token::CONTINUE) \ |
1125 KEYWORD_GROUP('d') \ | 1127 KEYWORD_GROUP('d') \ |
1126 KEYWORD("debugger", Token::DEBUGGER) \ | 1128 KEYWORD("debugger", Token::DEBUGGER) \ |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1633 backing_store_.Add(static_cast<uint8_t>((one_byte_length >> 7) | 0x80u)); | 1635 backing_store_.Add(static_cast<uint8_t>((one_byte_length >> 7) | 0x80u)); |
1634 } | 1636 } |
1635 backing_store_.Add(static_cast<uint8_t>(one_byte_length & 0x7f)); | 1637 backing_store_.Add(static_cast<uint8_t>(one_byte_length & 0x7f)); |
1636 | 1638 |
1637 backing_store_.AddBlock(bytes); | 1639 backing_store_.AddBlock(bytes); |
1638 return backing_store_.EndSequence().start(); | 1640 return backing_store_.EndSequence().start(); |
1639 } | 1641 } |
1640 | 1642 |
1641 } // namespace internal | 1643 } // namespace internal |
1642 } // namespace v8 | 1644 } // namespace v8 |
OLD | NEW |