OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 switch (c) { | 442 switch (c) { |
443 case 0x09: | 443 case 0x09: |
444 case 0x0A: | 444 case 0x0A: |
445 case 0x0B: | 445 case 0x0B: |
446 case 0x0C: | 446 case 0x0C: |
447 case 0x0d: | 447 case 0x0d: |
448 case 0x20: | 448 case 0x20: |
449 case 0xA0: | 449 case 0xA0: |
450 case 0x2028: | 450 case 0x2028: |
451 case 0x2029: | 451 case 0x2029: |
| 452 case 0xFEFF: |
452 return true; | 453 return true; |
453 default: | 454 default: |
454 return unibrow::Space::Is(c); | 455 return unibrow::Space::Is(c); |
455 } | 456 } |
456 } | 457 } |
457 | 458 |
458 | 459 |
459 static bool NotWhiteSpace(uc16 c) { | 460 static bool NotWhiteSpace(uc16 c) { |
460 return !IsWhiteSpace(c); | 461 return !IsWhiteSpace(c); |
461 } | 462 } |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1825 bool in_second = CharacterInSet(&l2, i); | 1826 bool in_second = CharacterInSet(&l2, i); |
1826 CHECK((in_first || in_second) == CharacterInSet(&all, i)); | 1827 CHECK((in_first || in_second) == CharacterInSet(&all, i)); |
1827 } | 1828 } |
1828 } | 1829 } |
1829 | 1830 |
1830 | 1831 |
1831 TEST(Graph) { | 1832 TEST(Graph) { |
1832 V8::Initialize(NULL); | 1833 V8::Initialize(NULL); |
1833 Execute("\\b\\w+\\b", false, true, true); | 1834 Execute("\\b\\w+\\b", false, true, true); |
1834 } | 1835 } |
OLD | NEW |