tor-browser

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

regular-definitions-rs-private-method.js (2400B)


      1 // This file was procedurally generated from the following sources:
      2 // - src/class-elements/rs-private-method.case
      3 // - src/class-elements/productions/cls-expr-regular-definitions.template
      4 /*---
      5 description: Valid PrivateName as private method (regular fields defintion)
      6 esid: prod-FieldDefinition
      7 features: [class-methods-private, class-fields-private, class, class-fields-public]
      8 flags: [generated]
      9 info: |
     10    ClassElement :
     11      MethodDefinition
     12      ...
     13      ;
     14 
     15    MethodDefinition :
     16      ClassElementName ( UniqueFormalParameters ) { FunctionBody }
     17      ...
     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    NOTE 3
     49    The sets of code points with Unicode properties "ID_Start" and
     50    "ID_Continue" include, respectively, the code points with Unicode
     51    properties "Other_ID_Start" and "Other_ID_Continue".
     52 
     53 ---*/
     54 
     55 
     56 var C = class {
     57  #$_; #__; #\u{6F}_; #\u2118_; #ZW_\u200C_NJ_; #ZW_\u200D_J_;
     58  #$() {
     59    return this.#$_;
     60  }
     61  #_() {
     62    return this.#__;
     63  }
     64  #\u{6F}() {
     65    return this.#\u{6F}_;
     66  }
     67  #\u2118() {
     68    return this.#\u2118_;
     69  }
     70  #ZW_\u200C_NJ() {
     71    return this.#ZW_\u200C_NJ_;
     72  }
     73  #ZW_\u200D_J() {
     74    return this.#ZW_\u200D_J_;
     75  }
     76 
     77  $(value) {
     78    this.#$_ = value;
     79    return this.#$();
     80  }
     81  _(value) {
     82    this.#__ = value;
     83    return this.#_();
     84  }
     85  \u{6F}(value) {
     86    this.#\u{6F}_ = value;
     87    return this.#\u{6F}();
     88  }
     89  \u2118(value) {
     90    this.#\u2118_ = value;
     91    return this.#\u2118();
     92  }
     93  ZW_\u200C_NJ(value) {
     94    this.#ZW_\u200C_NJ_ = value;
     95    return this.#ZW_\u200C_NJ();
     96  }
     97  ZW_\u200D_J(value) {
     98    this.#ZW_\u200D_J_ = value;
     99    return this.#ZW_\u200D_J();
    100  }
    101 
    102 }
    103 
    104 var c = new C();
    105 
    106 assert.sameValue(c.$(1), 1);
    107 assert.sameValue(c._(1), 1);
    108 assert.sameValue(c.\u{6F}(1), 1);
    109 assert.sameValue(c.\u2118(1), 1);
    110 assert.sameValue(c.ZW_\u200C_NJ(1), 1);
    111 assert.sameValue(c.ZW_\u200D_J(1), 1);
    112 
    113 reportCompare(0, 0);