tor-browser

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

wrapped-in-sc-grammar-privatename-identifier-semantics-stringvalue.js (2420B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/class-elements/grammar-privatename-identifier-semantics-stringvalue.case
      3 // - src/class-elements/productions/cls-decl-wrapped-in-sc.template
      4 /*---
      5 description: PrivateName Static Semantics, StringValue (fields definition wrapped in semicolons)
      6 esid: prod-FieldDefinition
      7 features: [class-fields-private, class, class-fields-public]
      8 flags: [generated]
      9 info: |
     10    ClassElement :
     11      MethodDefinition
     12      static MethodDefinition
     13      FieldDefinition ;
     14      ;
     15 
     16    FieldDefinition :
     17      ClassElementName Initializer _opt
     18 
     19    ClassElementName :
     20      PropertyName
     21      PrivateName
     22 
     23    PrivateName ::
     24      # IdentifierName
     25 
     26    IdentifierName ::
     27      IdentifierStart
     28      IdentifierName IdentifierPart
     29 
     30    IdentifierStart ::
     31      UnicodeIDStart
     32      $
     33      _
     34      \ UnicodeEscapeSequence
     35 
     36    IdentifierPart::
     37      UnicodeIDContinue
     38      $
     39      \ UnicodeEscapeSequence
     40      <ZWNJ> <ZWJ>
     41 
     42    UnicodeIDStart::
     43      any Unicode code point with the Unicode property "ID_Start"
     44 
     45    UnicodeIDContinue::
     46      any Unicode code point with the Unicode property "ID_Continue"
     47 
     48 
     49    NOTE 3
     50    The sets of code points with Unicode properties "ID_Start" and
     51    "ID_Continue" include, respectively, the code points with Unicode
     52    properties "Other_ID_Start" and "Other_ID_Continue".
     53 
     54 
     55    1. Return the String value consisting of the sequence of code
     56      units corresponding to PrivateName. In determining the sequence
     57      any occurrences of \ UnicodeEscapeSequence are first replaced
     58      with the code point represented by the UnicodeEscapeSequence
     59      and then the code points of the entire PrivateName are converted
     60      to code units by UTF16Encoding (10.1.1) each code point.
     61 
     62 ---*/
     63 
     64 
     65 class C {
     66  ;;;;
     67  ;;;;;;#\u{6F};
     68  #\u2118;
     69  #ZW_\u200C_NJ;
     70  #ZW_\u200D_J;;;;;;;;
     71  ;;;;
     72  o(value) {
     73    this.#o = value;
     74    return this.#o;
     75  }
     76  (value) {
     77    this.#℘ = value;
     78    return this.#℘;
     79  }
     80  ZW_‌_NJ(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
     81    this.#ZW__NJ = value;
     82    return this.#ZW__NJ;
     83  }
     84  ZW_‍_J(value) { // DO NOT CHANGE THE NAME OF THIS METHOD
     85    this.#ZW__J = value;
     86    return this.#ZW__J;
     87  }
     88 }
     89 
     90 var c = new C();
     91 
     92 assert.sameValue(c.o(1), 1);
     93 assert.sameValue(c.(1), 1);
     94 assert.sameValue(c.ZW_‌_NJ(1), 1);
     95 assert.sameValue(c.ZW_‍_J(1), 1);
     96 
     97 reportCompare(0, 0);