tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

u-surrogate-pairs-atom-escape-char-class.js (841B)


      1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-atomescape
      5 es6id: 21.2.2.9
      6 description: >
      7  Support for surrogate pairs within patterns match by the CharacterClassEscape
      8  AtomEscape
      9 info: |
     10  The production AtomEscape :: CharacterClassEscape evaluates as follows:
     11 
     12  1. Evaluate CharacterClassEscape to obtain a CharSet A.
     13  2. Call CharacterSetMatcher(A, false) and return its Matcher result. 
     14 
     15  Runtime Semantics: CharacterSetMatcher Abstract Operation
     16 
     17  1. Return an internal Matcher closure that takes two arguments, a State x and
     18     a Continuation c, and performs the following steps when evaluated:
     19     [...]
     20     d. Let cc be Canonicalize(ch).
     21     [...]
     22 ---*/
     23 
     24 assert(/^\S$/u.test('\ud800\udc00'));
     25 
     26 reportCompare(0, 0);