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/parsing/scanner.h" | 7 #include "src/parsing/scanner.h" |
8 | 8 |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1430 flag = RegExp::kIgnoreCase; | 1430 flag = RegExp::kIgnoreCase; |
1431 break; | 1431 break; |
1432 case 'm': | 1432 case 'm': |
1433 flag = RegExp::kMultiline; | 1433 flag = RegExp::kMultiline; |
1434 break; | 1434 break; |
1435 case 'u': | 1435 case 'u': |
1436 if (!FLAG_harmony_unicode_regexps) return Nothing<RegExp::Flags>(); | 1436 if (!FLAG_harmony_unicode_regexps) return Nothing<RegExp::Flags>(); |
1437 flag = RegExp::kUnicode; | 1437 flag = RegExp::kUnicode; |
1438 break; | 1438 break; |
1439 case 'y': | 1439 case 'y': |
1440 if (!FLAG_harmony_regexps) return Nothing<RegExp::Flags>(); | |
1441 flag = RegExp::kSticky; | 1440 flag = RegExp::kSticky; |
1442 break; | 1441 break; |
1443 default: | 1442 default: |
1444 return Nothing<RegExp::Flags>(); | 1443 return Nothing<RegExp::Flags>(); |
1445 } | 1444 } |
1446 if (flags & flag) return Nothing<RegExp::Flags>(); | 1445 if (flags & flag) return Nothing<RegExp::Flags>(); |
1447 AddLiteralCharAdvance(); | 1446 AddLiteralCharAdvance(); |
1448 flags |= flag; | 1447 flags |= flag; |
1449 } | 1448 } |
1450 literal.Complete(); | 1449 literal.Complete(); |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 backing_store_.Add(static_cast<uint8_t>((one_byte_length >> 7) | 0x80u)); | 1686 backing_store_.Add(static_cast<uint8_t>((one_byte_length >> 7) | 0x80u)); |
1688 } | 1687 } |
1689 backing_store_.Add(static_cast<uint8_t>(one_byte_length & 0x7f)); | 1688 backing_store_.Add(static_cast<uint8_t>(one_byte_length & 0x7f)); |
1690 | 1689 |
1691 backing_store_.AddBlock(bytes); | 1690 backing_store_.AddBlock(bytes); |
1692 return backing_store_.EndSequence().start(); | 1691 return backing_store_.EndSequence().start(); |
1693 } | 1692 } |
1694 | 1693 |
1695 } // namespace internal | 1694 } // namespace internal |
1696 } // namespace v8 | 1695 } // namespace v8 |
OLD | NEW |