Best JavaScript code snippet using wpt
webidl-tokenizer-for-of.js
Source:webidl-tokenizer-for-of.js
1// These regular expressions use the sticky flag so they will only match at2// the current location (ie. the offset of lastIndex).3const tokenRe = {4 // This expression uses a lookahead assertion to catch false matches5 // against integers early.6 "decimal": /-?(?=[0-9]*\.|[0-9]+[eE])(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y,7 "integer": /-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y,8 "identifier": /[_-]?[A-Za-z][0-9A-Z_a-z-]*/y,9 "string": /"[^"]*"/y,10 "whitespace": /[\t\n\r ]+/y,11 "comment": /((\/(\/.*|\*([^*]|\*[^/])*\*\/)[\t\n\r ]*)+)/y,12 "other": /[^\t\n\r 0-9A-Za-z]/y13};14const stringTypes = [15 "ByteString",16 "DOMString",17 "USVString"18];19"use strict";20const argumentNameKeywords = [21 "async",22 "attribute",23 "callback",24 "const",25 "constructor",26 "deleter",27 "dictionary",28 "enum",29 "getter",30 "includes",31 "inherit",32 "interface",33 "iterable",34 "maplike",35 "namespace",36 "partial",37 "required",38 "setlike",39 "setter",40 "static",41 "stringifier",42 "typedef",43 "unrestricted"44];45const nonRegexTerminals = [46 "-Infinity",47 "FrozenArray",48 "Infinity",49 "NaN",50 "Promise",51 "async",52 "boolean",53 "byte",54 "constructor",55 "double",56 "false",57 "float",58 "long",59 "mixin",60 "null",61 "octet",62 "optional",63 "or",64 "readonly",65 "record",66 "sequence",67 "short",68 "true",69 "unsigned",70 "void"71].concat(argumentNameKeywords, stringTypes);72const punctuations = [73 "(",74 ")",75 ",",76 "...",77 ":",78 ";",79 "<",80 "=",81 ">",82 "?",83 "[",84 "]",85 "{",86 "}"87];88const reserved = [89 // "constructor" is now a keyword90 "_constructor",91 "toString",92 "_toString",93];94/**95 * @param {string} str96 */97function tokenise(str) {98 const tokens = [];99 let lastCharIndex = 0;100 let trivia = "";101 let line = 1;102 let index = 0;103 while (lastCharIndex < str.length) {104 const nextChar = str.charAt(lastCharIndex);105 let result = -1;106 if (/[\t\n\r ]/.test(nextChar)) {107 result = attemptTokenMatch("whitespace", { noFlushTrivia: true });108 } else if (nextChar === '/') {109 result = attemptTokenMatch("comment", { noFlushTrivia: true });110 }111 if (result !== -1) {112 const currentTrivia = tokens.pop().value;113 line += (currentTrivia.match(/\n/g) || []).length;114 trivia += currentTrivia;115 index -= 1;116 } else if (/[-0-9.A-Z_a-z]/.test(nextChar)) {117 result = attemptTokenMatch("decimal");118 if (result === -1) {119 result = attemptTokenMatch("integer");120 }121 if (result === -1) {122 result = attemptTokenMatch("identifier");123 const lastIndex = tokens.length - 1;124 const token = tokens[lastIndex];125 if (result !== -1) {126 if (reserved.includes(token.value)) {127 const message = `${Object(_productions_helpers_js__WEBPACK_IMPORTED_MODULE_1__["unescape"])(token.value)} is a reserved identifier and must not be used.`;128 throw new WebIDLParseError(Object(_error_js__WEBPACK_IMPORTED_MODULE_0__["syntaxError"])(tokens, lastIndex, null, message));129 } else if (nonRegexTerminals.includes(token.value)) {130 token.type = token.value;131 }132 }133 }134 } else if (nextChar === '"') {135 result = attemptTokenMatch("string");136 }137 for (const punctuation of punctuations) {138 if (str.startsWith(punctuation, lastCharIndex)) {139 tokens.push({ type: punctuation, value: punctuation, trivia, line, index });140 trivia = "";141 lastCharIndex += punctuation.length;142 result = lastCharIndex;143 break;144 }145 }146 // other as the last try147 if (result === -1) {148 result = attemptTokenMatch("other");149 }150 if (result === -1) {151 throw new Error("Token stream not progressing");152 }153 lastCharIndex = result;154 index += 1;155 }156 // remaining trivia as eof157 tokens.push({158 type: "eof",159 value: "",160 trivia161 });162 return tokens;163 /**164 * @param {keyof tokenRe} type165 * @param {object} [options]166 * @param {boolean} [options.noFlushTrivia]167 */168 function attemptTokenMatch(type, { noFlushTrivia } = {}) {169 const re = tokenRe[type];170 re.lastIndex = lastCharIndex;171 const result = re.exec(str);172 if (result) {173 tokens.push({ type, value: result[0], trivia, line, index });174 if (!noFlushTrivia) {175 trivia = "";176 }177 return re.lastIndex;178 }179 return -1;180 }181}182class Tokeniser {183 /**184 * @param {string} idl185 */186 constructor(idl) {187 this.source = tokenise(idl);188 this.position = 0;189 }190 /**191 * @param {string} type192 */193 probe(type) {194 return this.source.length > this.position && this.source[this.position].type === type;195 }196 /**197 * @param {...string} candidates198 */199 consume(...candidates) {200 for (const type of candidates) {201 if (!this.probe(type)) continue;202 const token = this.source[this.position];203 this.position++;204 return token;205 }206 }207 /**208 * @param {number} position209 */210 unconsume(position) {211 this.position = position;212 }213}214noInline(Tokeniser.prototype.consume);215let content = `// Content was automatically extracted by Reffy into reffy-reports216// (https://github.com/tidoust/reffy-reports)217// Source: Web Cryptography API (https://w3c.github.io/webcrypto/Overview.html)218partial interface mixin WindowOrWorkerGlobalScope {219 [SameObject] readonly attribute Crypto crypto;220};221[Exposed=(Window,Worker)]222interface Crypto {223 [SecureContext] readonly attribute SubtleCrypto subtle;224 ArrayBufferView getRandomValues(ArrayBufferView array);225};226typedef (object or DOMString) AlgorithmIdentifier;227typedef AlgorithmIdentifier HashAlgorithmIdentifier;228dictionary Algorithm {229 required DOMString name;230};231dictionary KeyAlgorithm {232 required DOMString name;233};234enum KeyType { "public", "private", "secret" };235enum KeyUsage { "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", "unwrapKey" };236[SecureContext,Exposed=(Window,Worker)]237interface CryptoKey {238 readonly attribute KeyType type;239 readonly attribute boolean extractable;240 readonly attribute object algorithm;241 readonly attribute object usages;242};243enum KeyFormat { "raw", "spki", "pkcs8", "jwk" };244[SecureContext,Exposed=(Window,Worker)]245interface SubtleCrypto {246 Promise<any> encrypt(AlgorithmIdentifier algorithm,247 CryptoKey key,248 BufferSource data);249 Promise<any> decrypt(AlgorithmIdentifier algorithm,250 CryptoKey key,251 BufferSource data);252 Promise<any> sign(AlgorithmIdentifier algorithm,253 CryptoKey key,254 BufferSource data);255 Promise<any> verify(AlgorithmIdentifier algorithm,256 CryptoKey key,257 BufferSource signature,258 BufferSource data);259 Promise<any> digest(AlgorithmIdentifier algorithm,260 BufferSource data);261 Promise<any> generateKey(AlgorithmIdentifier algorithm,262 boolean extractable,263 sequence<KeyUsage> keyUsages );264 Promise<any> deriveKey(AlgorithmIdentifier algorithm,265 CryptoKey baseKey,266 AlgorithmIdentifier derivedKeyType,267 boolean extractable,268 sequence<KeyUsage> keyUsages );269 Promise<ArrayBuffer> deriveBits(AlgorithmIdentifier algorithm,270 CryptoKey baseKey,271 unsigned long length);272 Promise<CryptoKey> importKey(KeyFormat format,273 (BufferSource or JsonWebKey) keyData,274 AlgorithmIdentifier algorithm,275 boolean extractable,276 sequence<KeyUsage> keyUsages );277 Promise<any> exportKey(KeyFormat format, CryptoKey key);278 Promise<any> wrapKey(KeyFormat format,279 CryptoKey key,280 CryptoKey wrappingKey,281 AlgorithmIdentifier wrapAlgorithm);282 Promise<CryptoKey> unwrapKey(KeyFormat format,283 BufferSource wrappedKey,284 CryptoKey unwrappingKey,285 AlgorithmIdentifier unwrapAlgorithm,286 AlgorithmIdentifier unwrappedKeyAlgorithm,287 boolean extractable,288 sequence<KeyUsage> keyUsages );289};290dictionary RsaOtherPrimesInfo {291 // The following fields are defined in Section 6.3.2.7 of JSON Web Algorithms292 DOMString r;293 DOMString d;294 DOMString t;295};296dictionary JsonWebKey {297 // The following fields are defined in Section 3.1 of JSON Web Key298 DOMString kty;299 DOMString use;300 sequence<DOMString> key_ops;301 DOMString alg;302 // The following fields are defined in JSON Web Key Parameters Registration303 boolean ext;304 // The following fields are defined in Section 6 of JSON Web Algorithms305 DOMString crv;306 DOMString x;307 DOMString y;308 DOMString d;309 DOMString n;310 DOMString e;311 DOMString p;312 DOMString q;313 DOMString dp;314 DOMString dq;315 DOMString qi;316 sequence<RsaOtherPrimesInfo> oth;317 DOMString k;318};319typedef Uint8Array BigInteger;320dictionary CryptoKeyPair {321 CryptoKey publicKey;322 CryptoKey privateKey;323};324dictionary RsaKeyGenParams : Algorithm {325 // The length, in bits, of the RSA modulus326 required [EnforceRange] unsigned long modulusLength;327 // The RSA public exponent328 required BigInteger publicExponent;329};330dictionary RsaHashedKeyGenParams : RsaKeyGenParams {331 // The hash algorithm to use332 required HashAlgorithmIdentifier hash;333};334dictionary RsaKeyAlgorithm : KeyAlgorithm {335 // The length, in bits, of the RSA modulus336 required unsigned long modulusLength;337 // The RSA public exponent338 required BigInteger publicExponent;339};340dictionary RsaHashedKeyAlgorithm : RsaKeyAlgorithm {341 // The hash algorithm that is used with this key342 required KeyAlgorithm hash;343};344dictionary RsaHashedImportParams : Algorithm {345 // The hash algorithm to use346 required HashAlgorithmIdentifier hash;347};348dictionary RsaPssParams : Algorithm {349 // The desired length of the random salt350 required [EnforceRange] unsigned long saltLength;351};352dictionary RsaOaepParams : Algorithm {353 // The optional label/application data to associate with the message354 BufferSource label;355};356dictionary EcdsaParams : Algorithm {357 // The hash algorithm to use358 required HashAlgorithmIdentifier hash;359};360typedef DOMString NamedCurve;361dictionary EcKeyGenParams : Algorithm {362 // A named curve363 required NamedCurve namedCurve;364};365dictionary EcKeyAlgorithm : KeyAlgorithm {366 // The named curve that the key uses367 required NamedCurve namedCurve;368};369dictionary EcKeyImportParams : Algorithm {370 // A named curve371 required NamedCurve namedCurve;372};373dictionary EcdhKeyDeriveParams : Algorithm {374 // The peer's EC public key.375 required CryptoKey public;376};377dictionary AesCtrParams : Algorithm {378 // The initial value of the counter block. counter MUST be 16 bytes379 // (the AES block size). The counter bits are the rightmost length380 // bits of the counter block. The rest of the counter block is for381 // the nonce. The counter bits are incremented using the standard382 // incrementing function specified in NIST SP 800-38A Appendix B.1:383 // the counter bits are interpreted as a big-endian integer and384 // incremented by one.385 required BufferSource counter;386 // The length, in bits, of the rightmost part of the counter block387 // that is incremented.388 required [EnforceRange] octet length;389};390dictionary AesKeyAlgorithm : KeyAlgorithm {391 // The length, in bits, of the key.392 required unsigned short length;393};394dictionary AesKeyGenParams : Algorithm {395 // The length, in bits, of the key.396 required [EnforceRange] unsigned short length;397};398dictionary AesDerivedKeyParams : Algorithm {399 // The length, in bits, of the key.400 required [EnforceRange] unsigned short length;401};402dictionary AesCbcParams : Algorithm {403 // The initialization vector. MUST be 16 bytes.404 required BufferSource iv;405};406dictionary AesGcmParams : Algorithm {407 // The initialization vector to use. May be up to 2^64-1 bytes long.408 required BufferSource iv;409 // The additional authentication data to include.410 BufferSource additionalData;411 // The desired length of the authentication tag. May be 0 - 128.412 [EnforceRange] octet tagLength;413};414dictionary HmacImportParams : Algorithm {415 // The inner hash function to use.416 required HashAlgorithmIdentifier hash;417 // The length (in bits) of the key.418 [EnforceRange] unsigned long length;419};420dictionary HmacKeyAlgorithm : KeyAlgorithm {421 // The inner hash function to use.422 required KeyAlgorithm hash;423 // The length (in bits) of the key.424 required unsigned long length;425};426dictionary HmacKeyGenParams : Algorithm {427 // The inner hash function to use.428 required HashAlgorithmIdentifier hash;429 // The length (in bits) of the key to generate. If unspecified, the430 // recommended length will be used, which is the size of the associated hash function's block431 // size.432 [EnforceRange] unsigned long length;433};434dictionary HkdfParams : Algorithm {435 // The algorithm to use with HMAC (e.g.: SHA-256)436 required HashAlgorithmIdentifier hash;437 // A bit string that corresponds to the salt used in the extract step.438 required BufferSource salt;439 // A bit string that corresponds to the context and application specific context for the derived keying material.440 required BufferSource info;441};442dictionary Pbkdf2Params : Algorithm {443 required BufferSource salt;444 required [EnforceRange] unsigned long iterations;445 required HashAlgorithmIdentifier hash;446};`447let tokeniser = new Tokeniser(content);448tokeniser.consume(...["["]);449tokeniser.consume(...["callback"]);450tokeniser.consume(...["interface"]);451tokeniser.consume(...["partial"]);452tokeniser.consume(...["dictionary"]);453tokeniser.consume(...["interface"]);454tokeniser.consume(...["mixin"]);455tokeniser.consume(...["identifier"]);456tokeniser.consume(...["{"]);457tokeniser.consume(...["}"]);458tokeniser.consume(...["["]);459tokeniser.consume(...["identifier"]);460tokeniser.consume(...["="]);461tokeniser.consume(...["("]);462tokeniser.consume(...[","]);463tokeniser.consume(...["]"]);464tokeniser.consume(...["const"]);465tokeniser.consume(...["stringifier"]);466tokeniser.consume(...["readonly"]);467tokeniser.consume(...["attribute"]);468tokeniser.consume(...["["]);469tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);470tokeniser.consume(...["unsigned"]);471tokeniser.consume(...["short", "long"]);472tokeniser.consume(...["unrestricted"]);473tokeniser.consume(...["float", "double"]);474tokeniser.consume(...["boolean", "byte", "octet"]);475tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);476tokeniser.consume(...["?"]);477tokeniser.consume(...["identifier", "async", "required"]);478tokeniser.consume(...[";"]);479tokeniser.consume(...["}"]);480tokeniser.consume(...[";"]);481tokeniser.consume(...["["]);482tokeniser.consume(...["identifier"]);483tokeniser.consume(...["="]);484tokeniser.consume(...["identifier", "decimal", "integer", "string"]);485tokeniser.consume(...["("]);486tokeniser.consume(...["identifier"]);487tokeniser.consume(...[","]);488tokeniser.consume(...["identifier"]);489tokeniser.consume(...[","]);490tokeniser.consume(...[")"]);491tokeniser.consume(...[","]);492tokeniser.consume(...["]"]);493tokeniser.consume(...["callback"]);494tokeniser.consume(...["interface"]);495tokeniser.consume(...["mixin"]);496tokeniser.consume(...["identifier"]);497tokeniser.consume(...[":"]);498tokeniser.consume(...["{"]);499tokeniser.consume(...["}"]);500tokeniser.consume(...["["]);501tokeniser.consume(...["identifier"]);502tokeniser.consume(...["="]);503tokeniser.consume(...["("]);504tokeniser.consume(...[","]);505tokeniser.consume(...["]"]);506tokeniser.consume(...["const"]);507tokeniser.consume(...["constructor"]);508tokeniser.consume(...["static"]);509tokeniser.consume(...["stringifier"]);510tokeniser.consume(...["readonly"]);511tokeniser.consume(...["maplike", "setlike"]);512tokeniser.unconsume(30);513tokeniser.consume(...["inherit"]);514tokeniser.consume(...["readonly"]);515tokeniser.consume(...["attribute"]);516tokeniser.consume(...["["]);517tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);518tokeniser.consume(...["unsigned"]);519tokeniser.consume(...["short", "long"]);520tokeniser.consume(...["unrestricted"]);521tokeniser.consume(...["float", "double"]);522tokeniser.consume(...["boolean", "byte", "octet"]);523tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);524tokeniser.consume(...["?"]);525tokeniser.consume(...["identifier", "async", "required"]);526tokeniser.consume(...[";"]);527tokeniser.consume(...["}"]);528tokeniser.consume(...["["]);529tokeniser.consume(...["const"]);530tokeniser.consume(...["constructor"]);531tokeniser.consume(...["static"]);532tokeniser.consume(...["stringifier"]);533tokeniser.consume(...["readonly"]);534tokeniser.consume(...["async"]);535tokeniser.consume(...["iterable", "maplike", "setlike"]);536tokeniser.unconsume(35);537tokeniser.consume(...["inherit"]);538tokeniser.consume(...["readonly"]);539tokeniser.consume(...["attribute"]);540tokeniser.unconsume(35);541tokeniser.consume(...["getter", "setter", "deleter"]);542tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);543tokeniser.consume(...["unsigned"]);544tokeniser.consume(...["short", "long"]);545tokeniser.consume(...["unrestricted"]);546tokeniser.consume(...["float", "double"]);547tokeniser.consume(...["boolean", "byte", "octet"]);548tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);549tokeniser.consume(...["?"]);550tokeniser.consume(...["identifier", "includes"]);551tokeniser.consume(...["("]);552tokeniser.consume(...["["]);553tokeniser.consume(...["optional"]);554tokeniser.consume(...["["]);555tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);556tokeniser.consume(...["unsigned"]);557tokeniser.consume(...["short", "long"]);558tokeniser.consume(...["unrestricted"]);559tokeniser.consume(...["float", "double"]);560tokeniser.consume(...["boolean", "byte", "octet"]);561tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);562tokeniser.consume(...["?"]);563tokeniser.consume(...["..."]);564tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);565tokeniser.consume(...[","]);566tokeniser.consume(...[")"]);567tokeniser.consume(...[";"]);568tokeniser.consume(...["}"]);569tokeniser.consume(...[";"]);570tokeniser.consume(...["["]);571tokeniser.consume(...["callback"]);572tokeniser.consume(...["interface"]);573tokeniser.consume(...["partial"]);574tokeniser.consume(...["dictionary"]);575tokeniser.consume(...["enum"]);576tokeniser.consume(...["typedef"]);577tokeniser.consume(...["["]);578tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);579tokeniser.consume(...["unsigned"]);580tokeniser.consume(...["short", "long"]);581tokeniser.consume(...["unrestricted"]);582tokeniser.consume(...["float", "double"]);583tokeniser.consume(...["boolean", "byte", "octet"]);584tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);585tokeniser.consume(...["("]);586tokeniser.consume(...["["]);587tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);588tokeniser.consume(...["unsigned"]);589tokeniser.consume(...["short", "long"]);590tokeniser.consume(...["unrestricted"]);591tokeniser.consume(...["float", "double"]);592tokeniser.consume(...["boolean", "byte", "octet"]);593tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);594tokeniser.consume(...["?"]);595tokeniser.consume(...["or"]);596tokeniser.consume(...["["]);597tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);598tokeniser.consume(...["unsigned"]);599tokeniser.consume(...["short", "long"]);600tokeniser.consume(...["unrestricted"]);601tokeniser.consume(...["float", "double"]);602tokeniser.consume(...["boolean", "byte", "octet"]);603tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);604tokeniser.consume(...["?"]);605tokeniser.consume(...["or"]);606tokeniser.consume(...[")"]);607tokeniser.consume(...["?"]);608tokeniser.consume(...["identifier"]);609tokeniser.consume(...[";"]);610tokeniser.consume(...["["]);611tokeniser.consume(...["callback"]);612tokeniser.consume(...["interface"]);613tokeniser.consume(...["partial"]);614tokeniser.consume(...["dictionary"]);615tokeniser.consume(...["enum"]);616tokeniser.consume(...["typedef"]);617tokeniser.consume(...["["]);618tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);619tokeniser.consume(...["unsigned"]);620tokeniser.consume(...["short", "long"]);621tokeniser.consume(...["unrestricted"]);622tokeniser.consume(...["float", "double"]);623tokeniser.consume(...["boolean", "byte", "octet"]);624tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);625tokeniser.consume(...["?"]);626tokeniser.consume(...["identifier"]);627tokeniser.consume(...[";"]);628tokeniser.consume(...["["]);629tokeniser.consume(...["callback"]);630tokeniser.consume(...["interface"]);631tokeniser.consume(...["partial"]);632tokeniser.consume(...["dictionary"]);633tokeniser.consume(...["identifier"]);634tokeniser.consume(...[":"]);635tokeniser.consume(...["{"]);636tokeniser.consume(...["}"]);637tokeniser.consume(...["["]);638tokeniser.consume(...["["]);639tokeniser.consume(...["required"]);640tokeniser.consume(...["["]);641tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);642tokeniser.consume(...["unsigned"]);643tokeniser.consume(...["short", "long"]);644tokeniser.consume(...["unrestricted"]);645tokeniser.consume(...["float", "double"]);646tokeniser.consume(...["boolean", "byte", "octet"]);647tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);648tokeniser.consume(...["?"]);649tokeniser.consume(...["identifier"]);650tokeniser.consume(...["="]);651tokeniser.consume(...[";"]);652tokeniser.consume(...["}"]);653tokeniser.consume(...[";"]);654tokeniser.consume(...["["]);655tokeniser.consume(...["callback"]);656tokeniser.consume(...["interface"]);657tokeniser.consume(...["partial"]);658tokeniser.consume(...["dictionary"]);659tokeniser.consume(...["identifier"]);660tokeniser.consume(...[":"]);661tokeniser.consume(...["{"]);662tokeniser.consume(...["}"]);663tokeniser.consume(...["["]);664tokeniser.consume(...["["]);665tokeniser.consume(...["required"]);666tokeniser.consume(...["["]);667tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);668tokeniser.consume(...["unsigned"]);669tokeniser.consume(...["short", "long"]);670tokeniser.consume(...["unrestricted"]);671tokeniser.consume(...["float", "double"]);672tokeniser.consume(...["boolean", "byte", "octet"]);673tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);674tokeniser.consume(...["?"]);675tokeniser.consume(...["identifier"]);676tokeniser.consume(...["="]);677tokeniser.consume(...[";"]);678tokeniser.consume(...["}"]);679tokeniser.consume(...[";"]);680tokeniser.consume(...["["]);681tokeniser.consume(...["callback"]);682tokeniser.consume(...["interface"]);683tokeniser.consume(...["partial"]);684tokeniser.consume(...["dictionary"]);685tokeniser.consume(...["enum"]);686tokeniser.consume(...["identifier"]);687tokeniser.consume(...["{"]);688tokeniser.consume(...["string"]);689tokeniser.consume(...[","]);690tokeniser.consume(...["string"]);691tokeniser.consume(...[","]);692tokeniser.consume(...["string"]);693tokeniser.consume(...[","]);694tokeniser.consume(...["}"]);695tokeniser.consume(...[";"]);696tokeniser.consume(...["["]);697tokeniser.consume(...["callback"]);698tokeniser.consume(...["interface"]);699tokeniser.consume(...["partial"]);700tokeniser.consume(...["dictionary"]);701tokeniser.consume(...["enum"]);702tokeniser.consume(...["identifier"]);703tokeniser.consume(...["{"]);704tokeniser.consume(...["string"]);705tokeniser.consume(...[","]);706tokeniser.consume(...["string"]);707tokeniser.consume(...[","]);708tokeniser.consume(...["string"]);709tokeniser.consume(...[","]);710tokeniser.consume(...["string"]);711tokeniser.consume(...[","]);712tokeniser.consume(...["string"]);713tokeniser.consume(...[","]);714tokeniser.consume(...["string"]);715tokeniser.consume(...[","]);716tokeniser.consume(...["string"]);717tokeniser.consume(...[","]);718tokeniser.consume(...["string"]);719tokeniser.consume(...[","]);720tokeniser.consume(...["}"]);721tokeniser.consume(...[";"]);722tokeniser.consume(...["["]);723tokeniser.consume(...["identifier"]);724tokeniser.consume(...["="]);725tokeniser.consume(...["("]);726tokeniser.consume(...[","]);727tokeniser.consume(...["identifier"]);728tokeniser.consume(...["="]);729tokeniser.consume(...["identifier", "decimal", "integer", "string"]);730tokeniser.consume(...["("]);731tokeniser.consume(...["identifier"]);732tokeniser.consume(...[","]);733tokeniser.consume(...["identifier"]);734tokeniser.consume(...[","]);735tokeniser.consume(...[")"]);736tokeniser.consume(...[","]);737tokeniser.consume(...["]"]);738tokeniser.consume(...["callback"]);739tokeniser.consume(...["interface"]);740tokeniser.consume(...["mixin"]);741tokeniser.consume(...["identifier"]);742tokeniser.consume(...[":"]);743tokeniser.consume(...["{"]);744tokeniser.consume(...["}"]);745tokeniser.consume(...["["]);746tokeniser.consume(...["const"]);747tokeniser.consume(...["constructor"]);748tokeniser.consume(...["static"]);749tokeniser.consume(...["stringifier"]);750tokeniser.consume(...["readonly"]);751tokeniser.consume(...["maplike", "setlike"]);752tokeniser.unconsume(118);753tokeniser.consume(...["inherit"]);754tokeniser.consume(...["readonly"]);755tokeniser.consume(...["attribute"]);756tokeniser.consume(...["["]);757tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);758tokeniser.consume(...["unsigned"]);759tokeniser.consume(...["short", "long"]);760tokeniser.consume(...["unrestricted"]);761tokeniser.consume(...["float", "double"]);762tokeniser.consume(...["boolean", "byte", "octet"]);763tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);764tokeniser.consume(...["?"]);765tokeniser.consume(...["identifier", "async", "required"]);766tokeniser.consume(...[";"]);767tokeniser.consume(...["}"]);768tokeniser.consume(...["["]);769tokeniser.consume(...["const"]);770tokeniser.consume(...["constructor"]);771tokeniser.consume(...["static"]);772tokeniser.consume(...["stringifier"]);773tokeniser.consume(...["readonly"]);774tokeniser.consume(...["maplike", "setlike"]);775tokeniser.unconsume(123);776tokeniser.consume(...["inherit"]);777tokeniser.consume(...["readonly"]);778tokeniser.consume(...["attribute"]);779tokeniser.consume(...["["]);780tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);781tokeniser.consume(...["unsigned"]);782tokeniser.consume(...["short", "long"]);783tokeniser.consume(...["unrestricted"]);784tokeniser.consume(...["float", "double"]);785tokeniser.consume(...["boolean", "byte", "octet"]);786tokeniser.consume(...["?"]);787tokeniser.consume(...["identifier", "async", "required"]);788tokeniser.consume(...[";"]);789tokeniser.consume(...["}"]);790tokeniser.consume(...["["]);791tokeniser.consume(...["const"]);792tokeniser.consume(...["constructor"]);793tokeniser.consume(...["static"]);794tokeniser.consume(...["stringifier"]);795tokeniser.consume(...["readonly"]);796tokeniser.consume(...["maplike", "setlike"]);797tokeniser.unconsume(128);798tokeniser.consume(...["inherit"]);799tokeniser.consume(...["readonly"]);800tokeniser.consume(...["attribute"]);801tokeniser.consume(...["["]);802tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);803tokeniser.consume(...["unsigned"]);804tokeniser.consume(...["short", "long"]);805tokeniser.consume(...["unrestricted"]);806tokeniser.consume(...["float", "double"]);807tokeniser.consume(...["boolean", "byte", "octet"]);808tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);809tokeniser.consume(...["?"]);810tokeniser.consume(...["identifier", "async", "required"]);811tokeniser.consume(...[";"]);812tokeniser.consume(...["}"]);813tokeniser.consume(...["["]);814tokeniser.consume(...["const"]);815tokeniser.consume(...["constructor"]);816tokeniser.consume(...["static"]);817tokeniser.consume(...["stringifier"]);818tokeniser.consume(...["readonly"]);819tokeniser.consume(...["maplike", "setlike"]);820tokeniser.unconsume(133);821tokeniser.consume(...["inherit"]);822tokeniser.consume(...["readonly"]);823tokeniser.consume(...["attribute"]);824tokeniser.consume(...["["]);825tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);826tokeniser.consume(...["unsigned"]);827tokeniser.consume(...["short", "long"]);828tokeniser.consume(...["unrestricted"]);829tokeniser.consume(...["float", "double"]);830tokeniser.consume(...["boolean", "byte", "octet"]);831tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);832tokeniser.consume(...["?"]);833tokeniser.consume(...["identifier", "async", "required"]);834tokeniser.consume(...[";"]);835tokeniser.consume(...["}"]);836tokeniser.consume(...[";"]);837tokeniser.consume(...["["]);838tokeniser.consume(...["callback"]);839tokeniser.consume(...["interface"]);840tokeniser.consume(...["partial"]);841tokeniser.consume(...["dictionary"]);842tokeniser.consume(...["enum"]);843tokeniser.consume(...["identifier"]);844tokeniser.consume(...["{"]);845tokeniser.consume(...["string"]);846tokeniser.consume(...[","]);847tokeniser.consume(...["string"]);848tokeniser.consume(...[","]);849tokeniser.consume(...["string"]);850tokeniser.consume(...[","]);851tokeniser.consume(...["string"]);852tokeniser.consume(...[","]);853tokeniser.consume(...["}"]);854tokeniser.consume(...[";"]);855tokeniser.consume(...["["]);856tokeniser.consume(...["identifier"]);857tokeniser.consume(...["="]);858tokeniser.consume(...["("]);859tokeniser.consume(...[","]);860tokeniser.consume(...["identifier"]);861tokeniser.consume(...["="]);862tokeniser.consume(...["identifier", "decimal", "integer", "string"]);863tokeniser.consume(...["("]);864tokeniser.consume(...["identifier"]);865tokeniser.consume(...[","]);866tokeniser.consume(...["identifier"]);867tokeniser.consume(...[","]);868tokeniser.consume(...[")"]);869tokeniser.consume(...[","]);870tokeniser.consume(...["]"]);871tokeniser.consume(...["callback"]);872tokeniser.consume(...["interface"]);873tokeniser.consume(...["mixin"]);874tokeniser.consume(...["identifier"]);875tokeniser.consume(...[":"]);876tokeniser.consume(...["{"]);877tokeniser.consume(...["}"]);878tokeniser.consume(...["["]);879tokeniser.consume(...["const"]);880tokeniser.consume(...["constructor"]);881tokeniser.consume(...["static"]);882tokeniser.consume(...["stringifier"]);883tokeniser.consume(...["readonly"]);884tokeniser.consume(...["async"]);885tokeniser.consume(...["iterable", "maplike", "setlike"]);886tokeniser.unconsume(166);887tokeniser.consume(...["inherit"]);888tokeniser.consume(...["readonly"]);889tokeniser.consume(...["attribute"]);890tokeniser.unconsume(166);891tokeniser.consume(...["getter", "setter", "deleter"]);892tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);893tokeniser.consume(...["<"]);894tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);895tokeniser.consume(...["unsigned"]);896tokeniser.consume(...["short", "long"]);897tokeniser.consume(...["unrestricted"]);898tokeniser.consume(...["float", "double"]);899tokeniser.consume(...["boolean", "byte", "octet"]);900tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);901tokeniser.consume(...["?"]);902tokeniser.consume(...[">"]);903tokeniser.consume(...["?"]);904tokeniser.consume(...["identifier", "includes"]);905tokeniser.consume(...["("]);906tokeniser.consume(...["["]);907tokeniser.consume(...["optional"]);908tokeniser.consume(...["["]);909tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);910tokeniser.consume(...["unsigned"]);911tokeniser.consume(...["short", "long"]);912tokeniser.consume(...["unrestricted"]);913tokeniser.consume(...["float", "double"]);914tokeniser.consume(...["boolean", "byte", "octet"]);915tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);916tokeniser.consume(...["?"]);917tokeniser.consume(...["..."]);918tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);919tokeniser.consume(...[","]);920tokeniser.consume(...["["]);921tokeniser.consume(...["optional"]);922tokeniser.consume(...["["]);923tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);924tokeniser.consume(...["unsigned"]);925tokeniser.consume(...["short", "long"]);926tokeniser.consume(...["unrestricted"]);927tokeniser.consume(...["float", "double"]);928tokeniser.consume(...["boolean", "byte", "octet"]);929tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);930tokeniser.consume(...["?"]);931tokeniser.consume(...["..."]);932tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);933tokeniser.consume(...[","]);934tokeniser.consume(...["["]);935tokeniser.consume(...["optional"]);936tokeniser.consume(...["["]);937tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);938tokeniser.consume(...["unsigned"]);939tokeniser.consume(...["short", "long"]);940tokeniser.consume(...["unrestricted"]);941tokeniser.consume(...["float", "double"]);942tokeniser.consume(...["boolean", "byte", "octet"]);943tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);944tokeniser.consume(...["?"]);945tokeniser.consume(...["..."]);946tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);947tokeniser.consume(...[","]);948tokeniser.consume(...[")"]);949tokeniser.consume(...[";"]);950tokeniser.consume(...["}"]);951tokeniser.consume(...["["]);952tokeniser.consume(...["const"]);953tokeniser.consume(...["constructor"]);954tokeniser.consume(...["static"]);955tokeniser.consume(...["stringifier"]);956tokeniser.consume(...["readonly"]);957tokeniser.consume(...["async"]);958tokeniser.consume(...["iterable", "maplike", "setlike"]);959tokeniser.unconsume(182);960tokeniser.consume(...["inherit"]);961tokeniser.consume(...["readonly"]);962tokeniser.consume(...["attribute"]);963tokeniser.unconsume(182);964tokeniser.consume(...["getter", "setter", "deleter"]);965tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);966tokeniser.consume(...["<"]);967tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);968tokeniser.consume(...["unsigned"]);969tokeniser.consume(...["short", "long"]);970tokeniser.consume(...["unrestricted"]);971tokeniser.consume(...["float", "double"]);972tokeniser.consume(...["boolean", "byte", "octet"]);973tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);974tokeniser.consume(...["?"]);975tokeniser.consume(...[">"]);976tokeniser.consume(...["?"]);977tokeniser.consume(...["identifier", "includes"]);978tokeniser.consume(...["("]);979tokeniser.consume(...["["]);980tokeniser.consume(...["optional"]);981tokeniser.consume(...["["]);982tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);983tokeniser.consume(...["unsigned"]);984tokeniser.consume(...["short", "long"]);985tokeniser.consume(...["unrestricted"]);986tokeniser.consume(...["float", "double"]);987tokeniser.consume(...["boolean", "byte", "octet"]);988tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);989tokeniser.consume(...["?"]);990tokeniser.consume(...["..."]);991tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);992tokeniser.consume(...[","]);993tokeniser.consume(...["["]);994tokeniser.consume(...["optional"]);995tokeniser.consume(...["["]);996tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);997tokeniser.consume(...["unsigned"]);998tokeniser.consume(...["short", "long"]);999tokeniser.consume(...["unrestricted"]);1000tokeniser.consume(...["float", "double"]);1001tokeniser.consume(...["boolean", "byte", "octet"]);1002tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1003tokeniser.consume(...["?"]);1004tokeniser.consume(...["..."]);1005tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1006tokeniser.consume(...[","]);1007tokeniser.consume(...["["]);1008tokeniser.consume(...["optional"]);1009tokeniser.consume(...["["]);1010tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1011tokeniser.consume(...["unsigned"]);1012tokeniser.consume(...["short", "long"]);1013tokeniser.consume(...["unrestricted"]);1014tokeniser.consume(...["float", "double"]);1015tokeniser.consume(...["boolean", "byte", "octet"]);1016tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1017tokeniser.consume(...["?"]);1018tokeniser.consume(...["..."]);1019tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1020tokeniser.consume(...[","]);1021tokeniser.consume(...[")"]);1022tokeniser.consume(...[";"]);1023tokeniser.consume(...["}"]);1024tokeniser.consume(...["["]);1025tokeniser.consume(...["const"]);1026tokeniser.consume(...["constructor"]);1027tokeniser.consume(...["static"]);1028tokeniser.consume(...["stringifier"]);1029tokeniser.consume(...["readonly"]);1030tokeniser.consume(...["async"]);1031tokeniser.consume(...["iterable", "maplike", "setlike"]);1032tokeniser.unconsume(198);1033tokeniser.consume(...["inherit"]);1034tokeniser.consume(...["readonly"]);1035tokeniser.consume(...["attribute"]);1036tokeniser.unconsume(198);1037tokeniser.consume(...["getter", "setter", "deleter"]);1038tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1039tokeniser.consume(...["<"]);1040tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1041tokeniser.consume(...["unsigned"]);1042tokeniser.consume(...["short", "long"]);1043tokeniser.consume(...["unrestricted"]);1044tokeniser.consume(...["float", "double"]);1045tokeniser.consume(...["boolean", "byte", "octet"]);1046tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1047tokeniser.consume(...["?"]);1048tokeniser.consume(...[">"]);1049tokeniser.consume(...["?"]);1050tokeniser.consume(...["identifier", "includes"]);1051tokeniser.consume(...["("]);1052tokeniser.consume(...["["]);1053tokeniser.consume(...["optional"]);1054tokeniser.consume(...["["]);1055tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1056tokeniser.consume(...["unsigned"]);1057tokeniser.consume(...["short", "long"]);1058tokeniser.consume(...["unrestricted"]);1059tokeniser.consume(...["float", "double"]);1060tokeniser.consume(...["boolean", "byte", "octet"]);1061tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1062tokeniser.consume(...["?"]);1063tokeniser.consume(...["..."]);1064tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1065tokeniser.consume(...[","]);1066tokeniser.consume(...["["]);1067tokeniser.consume(...["optional"]);1068tokeniser.consume(...["["]);1069tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1070tokeniser.consume(...["unsigned"]);1071tokeniser.consume(...["short", "long"]);1072tokeniser.consume(...["unrestricted"]);1073tokeniser.consume(...["float", "double"]);1074tokeniser.consume(...["boolean", "byte", "octet"]);1075tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1076tokeniser.consume(...["?"]);1077tokeniser.consume(...["..."]);1078tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1079tokeniser.consume(...[","]);1080tokeniser.consume(...["["]);1081tokeniser.consume(...["optional"]);1082tokeniser.consume(...["["]);1083tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1084tokeniser.consume(...["unsigned"]);1085tokeniser.consume(...["short", "long"]);1086tokeniser.consume(...["unrestricted"]);1087tokeniser.consume(...["float", "double"]);1088tokeniser.consume(...["boolean", "byte", "octet"]);1089tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1090tokeniser.consume(...["?"]);1091tokeniser.consume(...["..."]);1092tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1093tokeniser.consume(...[","]);1094tokeniser.consume(...[")"]);1095tokeniser.consume(...[";"]);1096tokeniser.consume(...["}"]);1097tokeniser.consume(...["["]);1098tokeniser.consume(...["const"]);1099tokeniser.consume(...["constructor"]);1100tokeniser.consume(...["static"]);1101tokeniser.consume(...["stringifier"]);1102tokeniser.consume(...["readonly"]);1103tokeniser.consume(...["async"]);1104tokeniser.consume(...["iterable", "maplike", "setlike"]);1105tokeniser.unconsume(214);1106tokeniser.consume(...["inherit"]);1107tokeniser.consume(...["readonly"]);1108tokeniser.consume(...["attribute"]);1109tokeniser.unconsume(214);1110tokeniser.consume(...["getter", "setter", "deleter"]);1111tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1112tokeniser.consume(...["<"]);1113tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1114tokeniser.consume(...["unsigned"]);1115tokeniser.consume(...["short", "long"]);1116tokeniser.consume(...["unrestricted"]);1117tokeniser.consume(...["float", "double"]);1118tokeniser.consume(...["boolean", "byte", "octet"]);1119tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1120tokeniser.consume(...["?"]);1121tokeniser.consume(...[">"]);1122tokeniser.consume(...["?"]);1123tokeniser.consume(...["identifier", "includes"]);1124tokeniser.consume(...["("]);1125tokeniser.consume(...["["]);1126tokeniser.consume(...["optional"]);1127tokeniser.consume(...["["]);1128tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1129tokeniser.consume(...["unsigned"]);1130tokeniser.consume(...["short", "long"]);1131tokeniser.consume(...["unrestricted"]);1132tokeniser.consume(...["float", "double"]);1133tokeniser.consume(...["boolean", "byte", "octet"]);1134tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1135tokeniser.consume(...["?"]);1136tokeniser.consume(...["..."]);1137tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1138tokeniser.consume(...[","]);1139tokeniser.consume(...["["]);1140tokeniser.consume(...["optional"]);1141tokeniser.consume(...["["]);1142tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1143tokeniser.consume(...["unsigned"]);1144tokeniser.consume(...["short", "long"]);1145tokeniser.consume(...["unrestricted"]);1146tokeniser.consume(...["float", "double"]);1147tokeniser.consume(...["boolean", "byte", "octet"]);1148tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1149tokeniser.consume(...["?"]);1150tokeniser.consume(...["..."]);1151tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1152tokeniser.consume(...[","]);1153tokeniser.consume(...["["]);1154tokeniser.consume(...["optional"]);1155tokeniser.consume(...["["]);1156tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1157tokeniser.consume(...["unsigned"]);1158tokeniser.consume(...["short", "long"]);1159tokeniser.consume(...["unrestricted"]);1160tokeniser.consume(...["float", "double"]);1161tokeniser.consume(...["boolean", "byte", "octet"]);1162tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1163tokeniser.consume(...["?"]);1164tokeniser.consume(...["..."]);1165tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1166tokeniser.consume(...[","]);1167tokeniser.consume(...["["]);1168tokeniser.consume(...["optional"]);1169tokeniser.consume(...["["]);1170tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1171tokeniser.consume(...["unsigned"]);1172tokeniser.consume(...["short", "long"]);1173tokeniser.consume(...["unrestricted"]);1174tokeniser.consume(...["float", "double"]);1175tokeniser.consume(...["boolean", "byte", "octet"]);1176tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1177tokeniser.consume(...["?"]);1178tokeniser.consume(...["..."]);1179tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1180tokeniser.consume(...[","]);1181tokeniser.consume(...[")"]);1182tokeniser.consume(...[";"]);1183tokeniser.consume(...["}"]);1184tokeniser.consume(...["["]);1185tokeniser.consume(...["const"]);1186tokeniser.consume(...["constructor"]);1187tokeniser.consume(...["static"]);1188tokeniser.consume(...["stringifier"]);1189tokeniser.consume(...["readonly"]);1190tokeniser.consume(...["async"]);1191tokeniser.consume(...["iterable", "maplike", "setlike"]);1192tokeniser.unconsume(233);1193tokeniser.consume(...["inherit"]);1194tokeniser.consume(...["readonly"]);1195tokeniser.consume(...["attribute"]);1196tokeniser.unconsume(233);1197tokeniser.consume(...["getter", "setter", "deleter"]);1198tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1199tokeniser.consume(...["<"]);1200tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1201tokeniser.consume(...["unsigned"]);1202tokeniser.consume(...["short", "long"]);1203tokeniser.consume(...["unrestricted"]);1204tokeniser.consume(...["float", "double"]);1205tokeniser.consume(...["boolean", "byte", "octet"]);1206tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1207tokeniser.consume(...["?"]);1208tokeniser.consume(...[">"]);1209tokeniser.consume(...["?"]);1210tokeniser.consume(...["identifier", "includes"]);1211tokeniser.consume(...["("]);1212tokeniser.consume(...["["]);1213tokeniser.consume(...["optional"]);1214tokeniser.consume(...["["]);1215tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1216tokeniser.consume(...["unsigned"]);1217tokeniser.consume(...["short", "long"]);1218tokeniser.consume(...["unrestricted"]);1219tokeniser.consume(...["float", "double"]);1220tokeniser.consume(...["boolean", "byte", "octet"]);1221tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1222tokeniser.consume(...["?"]);1223tokeniser.consume(...["..."]);1224tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1225tokeniser.consume(...[","]);1226tokeniser.consume(...["["]);1227tokeniser.consume(...["optional"]);1228tokeniser.consume(...["["]);1229tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1230tokeniser.consume(...["unsigned"]);1231tokeniser.consume(...["short", "long"]);1232tokeniser.consume(...["unrestricted"]);1233tokeniser.consume(...["float", "double"]);1234tokeniser.consume(...["boolean", "byte", "octet"]);1235tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1236tokeniser.consume(...["?"]);1237tokeniser.consume(...["..."]);1238tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1239tokeniser.consume(...[","]);1240tokeniser.consume(...[")"]);1241tokeniser.consume(...[";"]);1242tokeniser.consume(...["}"]);1243tokeniser.consume(...["["]);1244tokeniser.consume(...["const"]);1245tokeniser.consume(...["constructor"]);1246tokeniser.consume(...["static"]);1247tokeniser.consume(...["stringifier"]);1248tokeniser.consume(...["readonly"]);1249tokeniser.consume(...["async"]);1250tokeniser.consume(...["iterable", "maplike", "setlike"]);1251tokeniser.unconsume(246);1252tokeniser.consume(...["inherit"]);1253tokeniser.consume(...["readonly"]);1254tokeniser.consume(...["attribute"]);1255tokeniser.unconsume(246);1256tokeniser.consume(...["getter", "setter", "deleter"]);1257tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1258tokeniser.consume(...["<"]);1259tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1260tokeniser.consume(...["unsigned"]);1261tokeniser.consume(...["short", "long"]);1262tokeniser.consume(...["unrestricted"]);1263tokeniser.consume(...["float", "double"]);1264tokeniser.consume(...["boolean", "byte", "octet"]);1265tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1266tokeniser.consume(...["?"]);1267tokeniser.consume(...[">"]);1268tokeniser.consume(...["?"]);1269tokeniser.consume(...["identifier", "includes"]);1270tokeniser.consume(...["("]);1271tokeniser.consume(...["["]);1272tokeniser.consume(...["optional"]);1273tokeniser.consume(...["["]);1274tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1275tokeniser.consume(...["unsigned"]);1276tokeniser.consume(...["short", "long"]);1277tokeniser.consume(...["unrestricted"]);1278tokeniser.consume(...["float", "double"]);1279tokeniser.consume(...["boolean", "byte", "octet"]);1280tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1281tokeniser.consume(...["?"]);1282tokeniser.consume(...["..."]);1283tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1284tokeniser.consume(...[","]);1285tokeniser.consume(...["["]);1286tokeniser.consume(...["optional"]);1287tokeniser.consume(...["["]);1288tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1289tokeniser.consume(...["unsigned"]);1290tokeniser.consume(...["short", "long"]);1291tokeniser.consume(...["unrestricted"]);1292tokeniser.consume(...["float", "double"]);1293tokeniser.consume(...["boolean", "byte", "octet"]);1294tokeniser.consume(...["?"]);1295tokeniser.consume(...["..."]);1296tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1297tokeniser.consume(...[","]);1298tokeniser.consume(...["["]);1299tokeniser.consume(...["optional"]);1300tokeniser.consume(...["["]);1301tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1302tokeniser.consume(...["<"]);1303tokeniser.consume(...["["]);1304tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1305tokeniser.consume(...["unsigned"]);1306tokeniser.consume(...["short", "long"]);1307tokeniser.consume(...["unrestricted"]);1308tokeniser.consume(...["float", "double"]);1309tokeniser.consume(...["boolean", "byte", "octet"]);1310tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1311tokeniser.consume(...["?"]);1312tokeniser.consume(...[">"]);1313tokeniser.consume(...["?"]);1314tokeniser.consume(...["..."]);1315tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1316tokeniser.consume(...[","]);1317tokeniser.consume(...[")"]);1318tokeniser.consume(...[";"]);1319tokeniser.consume(...["}"]);1320tokeniser.consume(...["["]);1321tokeniser.consume(...["const"]);1322tokeniser.consume(...["constructor"]);1323tokeniser.consume(...["static"]);1324tokeniser.consume(...["stringifier"]);1325tokeniser.consume(...["readonly"]);1326tokeniser.consume(...["async"]);1327tokeniser.consume(...["iterable", "maplike", "setlike"]);1328tokeniser.unconsume(265);1329tokeniser.consume(...["inherit"]);1330tokeniser.consume(...["readonly"]);1331tokeniser.consume(...["attribute"]);1332tokeniser.unconsume(265);1333tokeniser.consume(...["getter", "setter", "deleter"]);1334tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1335tokeniser.consume(...["<"]);1336tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1337tokeniser.consume(...["unsigned"]);1338tokeniser.consume(...["short", "long"]);1339tokeniser.consume(...["unrestricted"]);1340tokeniser.consume(...["float", "double"]);1341tokeniser.consume(...["boolean", "byte", "octet"]);1342tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1343tokeniser.consume(...["?"]);1344tokeniser.consume(...[">"]);1345tokeniser.consume(...["?"]);1346tokeniser.consume(...["identifier", "includes"]);1347tokeniser.consume(...["("]);1348tokeniser.consume(...["["]);1349tokeniser.consume(...["optional"]);1350tokeniser.consume(...["["]);1351tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1352tokeniser.consume(...["unsigned"]);1353tokeniser.consume(...["short", "long"]);1354tokeniser.consume(...["unrestricted"]);1355tokeniser.consume(...["float", "double"]);1356tokeniser.consume(...["boolean", "byte", "octet"]);1357tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1358tokeniser.consume(...["?"]);1359tokeniser.consume(...["..."]);1360tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1361tokeniser.consume(...[","]);1362tokeniser.consume(...["["]);1363tokeniser.consume(...["optional"]);1364tokeniser.consume(...["["]);1365tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1366tokeniser.consume(...["unsigned"]);1367tokeniser.consume(...["short", "long"]);1368tokeniser.consume(...["unrestricted"]);1369tokeniser.consume(...["float", "double"]);1370tokeniser.consume(...["boolean", "byte", "octet"]);1371tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1372tokeniser.consume(...["?"]);1373tokeniser.consume(...["..."]);1374tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1375tokeniser.consume(...[","]);1376tokeniser.consume(...["["]);1377tokeniser.consume(...["optional"]);1378tokeniser.consume(...["["]);1379tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1380tokeniser.consume(...["unsigned"]);1381tokeniser.consume(...["short", "long"]);1382tokeniser.consume(...["unrestricted"]);1383tokeniser.consume(...["float", "double"]);1384tokeniser.consume(...["boolean", "byte", "octet"]);1385tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1386tokeniser.consume(...["?"]);1387tokeniser.consume(...["..."]);1388tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1389tokeniser.consume(...[","]);1390tokeniser.consume(...["["]);1391tokeniser.consume(...["optional"]);1392tokeniser.consume(...["["]);1393tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1394tokeniser.consume(...["unsigned"]);1395tokeniser.consume(...["short", "long"]);1396tokeniser.consume(...["unrestricted"]);1397tokeniser.consume(...["float", "double"]);1398tokeniser.consume(...["boolean", "byte", "octet"]);1399tokeniser.consume(...["?"]);1400tokeniser.consume(...["..."]);1401tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1402tokeniser.consume(...[","]);1403tokeniser.consume(...["["]);1404tokeniser.consume(...["optional"]);1405tokeniser.consume(...["["]);1406tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1407tokeniser.consume(...["<"]);1408tokeniser.consume(...["["]);1409tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1410tokeniser.consume(...["unsigned"]);1411tokeniser.consume(...["short", "long"]);1412tokeniser.consume(...["unrestricted"]);1413tokeniser.consume(...["float", "double"]);1414tokeniser.consume(...["boolean", "byte", "octet"]);1415tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1416tokeniser.consume(...["?"]);1417tokeniser.consume(...[">"]);1418tokeniser.consume(...["?"]);1419tokeniser.consume(...["..."]);1420tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1421tokeniser.consume(...[","]);1422tokeniser.consume(...[")"]);1423tokeniser.consume(...[";"]);1424tokeniser.consume(...["}"]);1425tokeniser.consume(...["["]);1426tokeniser.consume(...["const"]);1427tokeniser.consume(...["constructor"]);1428tokeniser.consume(...["static"]);1429tokeniser.consume(...["stringifier"]);1430tokeniser.consume(...["readonly"]);1431tokeniser.consume(...["async"]);1432tokeniser.consume(...["iterable", "maplike", "setlike"]);1433tokeniser.unconsume(290);1434tokeniser.consume(...["inherit"]);1435tokeniser.consume(...["readonly"]);1436tokeniser.consume(...["attribute"]);1437tokeniser.unconsume(290);1438tokeniser.consume(...["getter", "setter", "deleter"]);1439tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1440tokeniser.consume(...["<"]);1441tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1442tokeniser.consume(...["unsigned"]);1443tokeniser.consume(...["short", "long"]);1444tokeniser.consume(...["unrestricted"]);1445tokeniser.consume(...["float", "double"]);1446tokeniser.consume(...["boolean", "byte", "octet"]);1447tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1448tokeniser.consume(...["?"]);1449tokeniser.consume(...[">"]);1450tokeniser.consume(...["?"]);1451tokeniser.consume(...["identifier", "includes"]);1452tokeniser.consume(...["("]);1453tokeniser.consume(...["["]);1454tokeniser.consume(...["optional"]);1455tokeniser.consume(...["["]);1456tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1457tokeniser.consume(...["unsigned"]);1458tokeniser.consume(...["short", "long"]);1459tokeniser.consume(...["unrestricted"]);1460tokeniser.consume(...["float", "double"]);1461tokeniser.consume(...["boolean", "byte", "octet"]);1462tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1463tokeniser.consume(...["?"]);1464tokeniser.consume(...["..."]);1465tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1466tokeniser.consume(...[","]);1467tokeniser.consume(...["["]);1468tokeniser.consume(...["optional"]);1469tokeniser.consume(...["["]);1470tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1471tokeniser.consume(...["unsigned"]);1472tokeniser.consume(...["short", "long"]);1473tokeniser.consume(...["unrestricted"]);1474tokeniser.consume(...["float", "double"]);1475tokeniser.consume(...["boolean", "byte", "octet"]);1476tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1477tokeniser.consume(...["?"]);1478tokeniser.consume(...["..."]);1479tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1480tokeniser.consume(...[","]);1481tokeniser.consume(...["["]);1482tokeniser.consume(...["optional"]);1483tokeniser.consume(...["["]);1484tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1485tokeniser.consume(...["unsigned"]);1486tokeniser.consume(...["short", "long"]);1487tokeniser.consume(...["long"]);1488tokeniser.consume(...["?"]);1489tokeniser.consume(...["..."]);1490tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1491tokeniser.consume(...[","]);1492tokeniser.consume(...[")"]);1493tokeniser.consume(...[";"]);1494tokeniser.consume(...["}"]);1495tokeniser.consume(...["["]);1496tokeniser.consume(...["const"]);1497tokeniser.consume(...["constructor"]);1498tokeniser.consume(...["static"]);1499tokeniser.consume(...["stringifier"]);1500tokeniser.consume(...["readonly"]);1501tokeniser.consume(...["async"]);1502tokeniser.consume(...["iterable", "maplike", "setlike"]);1503tokeniser.unconsume(307);1504tokeniser.consume(...["inherit"]);1505tokeniser.consume(...["readonly"]);1506tokeniser.consume(...["attribute"]);1507tokeniser.unconsume(307);1508tokeniser.consume(...["getter", "setter", "deleter"]);1509tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1510tokeniser.consume(...["<"]);1511tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1512tokeniser.consume(...["unsigned"]);1513tokeniser.consume(...["short", "long"]);1514tokeniser.consume(...["unrestricted"]);1515tokeniser.consume(...["float", "double"]);1516tokeniser.consume(...["boolean", "byte", "octet"]);1517tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1518tokeniser.consume(...["?"]);1519tokeniser.consume(...[">"]);1520tokeniser.consume(...["?"]);1521tokeniser.consume(...["identifier", "includes"]);1522tokeniser.consume(...["("]);1523tokeniser.consume(...["["]);1524tokeniser.consume(...["optional"]);1525tokeniser.consume(...["["]);1526tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1527tokeniser.consume(...["unsigned"]);1528tokeniser.consume(...["short", "long"]);1529tokeniser.consume(...["unrestricted"]);1530tokeniser.consume(...["float", "double"]);1531tokeniser.consume(...["boolean", "byte", "octet"]);1532tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1533tokeniser.consume(...["?"]);1534tokeniser.consume(...["..."]);1535tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1536tokeniser.consume(...[","]);1537tokeniser.consume(...["["]);1538tokeniser.consume(...["optional"]);1539tokeniser.consume(...["["]);1540tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1541tokeniser.consume(...["unsigned"]);1542tokeniser.consume(...["short", "long"]);1543tokeniser.consume(...["unrestricted"]);1544tokeniser.consume(...["float", "double"]);1545tokeniser.consume(...["boolean", "byte", "octet"]);1546tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1547tokeniser.consume(...["("]);1548tokeniser.consume(...["["]);1549tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1550tokeniser.consume(...["unsigned"]);1551tokeniser.consume(...["short", "long"]);1552tokeniser.consume(...["unrestricted"]);1553tokeniser.consume(...["float", "double"]);1554tokeniser.consume(...["boolean", "byte", "octet"]);1555tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1556tokeniser.consume(...["?"]);1557tokeniser.consume(...["or"]);1558tokeniser.consume(...["["]);1559tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1560tokeniser.consume(...["unsigned"]);1561tokeniser.consume(...["short", "long"]);1562tokeniser.consume(...["unrestricted"]);1563tokeniser.consume(...["float", "double"]);1564tokeniser.consume(...["boolean", "byte", "octet"]);1565tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1566tokeniser.consume(...["?"]);1567tokeniser.consume(...["or"]);1568tokeniser.consume(...[")"]);1569tokeniser.consume(...["?"]);1570tokeniser.consume(...["..."]);1571tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1572tokeniser.consume(...[","]);1573tokeniser.consume(...["["]);1574tokeniser.consume(...["optional"]);1575tokeniser.consume(...["["]);1576tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1577tokeniser.consume(...["unsigned"]);1578tokeniser.consume(...["short", "long"]);1579tokeniser.consume(...["unrestricted"]);1580tokeniser.consume(...["float", "double"]);1581tokeniser.consume(...["boolean", "byte", "octet"]);1582tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1583tokeniser.consume(...["?"]);1584tokeniser.consume(...["..."]);1585tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1586tokeniser.consume(...[","]);1587tokeniser.consume(...["["]);1588tokeniser.consume(...["optional"]);1589tokeniser.consume(...["["]);1590tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1591tokeniser.consume(...["unsigned"]);1592tokeniser.consume(...["short", "long"]);1593tokeniser.consume(...["unrestricted"]);1594tokeniser.consume(...["float", "double"]);1595tokeniser.consume(...["boolean", "byte", "octet"]);1596tokeniser.consume(...["?"]);1597tokeniser.consume(...["..."]);1598tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1599tokeniser.consume(...[","]);1600tokeniser.consume(...["["]);1601tokeniser.consume(...["optional"]);1602tokeniser.consume(...["["]);1603tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1604tokeniser.consume(...["<"]);1605tokeniser.consume(...["["]);1606tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1607tokeniser.consume(...["unsigned"]);1608tokeniser.consume(...["short", "long"]);1609tokeniser.consume(...["unrestricted"]);1610tokeniser.consume(...["float", "double"]);1611tokeniser.consume(...["boolean", "byte", "octet"]);1612tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1613tokeniser.consume(...["?"]);1614tokeniser.consume(...[">"]);1615tokeniser.consume(...["?"]);1616tokeniser.consume(...["..."]);1617tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1618tokeniser.consume(...[","]);1619tokeniser.consume(...[")"]);1620tokeniser.consume(...[";"]);1621tokeniser.consume(...["}"]);1622tokeniser.consume(...["["]);1623tokeniser.consume(...["const"]);1624tokeniser.consume(...["constructor"]);1625tokeniser.consume(...["static"]);1626tokeniser.consume(...["stringifier"]);1627tokeniser.consume(...["readonly"]);1628tokeniser.consume(...["async"]);1629tokeniser.consume(...["iterable", "maplike", "setlike"]);1630tokeniser.unconsume(336);1631tokeniser.consume(...["inherit"]);1632tokeniser.consume(...["readonly"]);1633tokeniser.consume(...["attribute"]);1634tokeniser.unconsume(336);1635tokeniser.consume(...["getter", "setter", "deleter"]);1636tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1637tokeniser.consume(...["<"]);1638tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1639tokeniser.consume(...["unsigned"]);1640tokeniser.consume(...["short", "long"]);1641tokeniser.consume(...["unrestricted"]);1642tokeniser.consume(...["float", "double"]);1643tokeniser.consume(...["boolean", "byte", "octet"]);1644tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1645tokeniser.consume(...["?"]);1646tokeniser.consume(...[">"]);1647tokeniser.consume(...["?"]);1648tokeniser.consume(...["identifier", "includes"]);1649tokeniser.consume(...["("]);1650tokeniser.consume(...["["]);1651tokeniser.consume(...["optional"]);1652tokeniser.consume(...["["]);1653tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1654tokeniser.consume(...["unsigned"]);1655tokeniser.consume(...["short", "long"]);1656tokeniser.consume(...["unrestricted"]);1657tokeniser.consume(...["float", "double"]);1658tokeniser.consume(...["boolean", "byte", "octet"]);1659tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1660tokeniser.consume(...["?"]);1661tokeniser.consume(...["..."]);1662tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1663tokeniser.consume(...[","]);1664tokeniser.consume(...["["]);1665tokeniser.consume(...["optional"]);1666tokeniser.consume(...["["]);1667tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1668tokeniser.consume(...["unsigned"]);1669tokeniser.consume(...["short", "long"]);1670tokeniser.consume(...["unrestricted"]);1671tokeniser.consume(...["float", "double"]);1672tokeniser.consume(...["boolean", "byte", "octet"]);1673tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1674tokeniser.consume(...["?"]);1675tokeniser.consume(...["..."]);1676tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1677tokeniser.consume(...[","]);1678tokeniser.consume(...[")"]);1679tokeniser.consume(...[";"]);1680tokeniser.consume(...["}"]);1681tokeniser.consume(...["["]);1682tokeniser.consume(...["const"]);1683tokeniser.consume(...["constructor"]);1684tokeniser.consume(...["static"]);1685tokeniser.consume(...["stringifier"]);1686tokeniser.consume(...["readonly"]);1687tokeniser.consume(...["async"]);1688tokeniser.consume(...["iterable", "maplike", "setlike"]);1689tokeniser.unconsume(349);1690tokeniser.consume(...["inherit"]);1691tokeniser.consume(...["readonly"]);1692tokeniser.consume(...["attribute"]);1693tokeniser.unconsume(349);1694tokeniser.consume(...["getter", "setter", "deleter"]);1695tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1696tokeniser.consume(...["<"]);1697tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1698tokeniser.consume(...["unsigned"]);1699tokeniser.consume(...["short", "long"]);1700tokeniser.consume(...["unrestricted"]);1701tokeniser.consume(...["float", "double"]);1702tokeniser.consume(...["boolean", "byte", "octet"]);1703tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1704tokeniser.consume(...["?"]);1705tokeniser.consume(...[">"]);1706tokeniser.consume(...["?"]);1707tokeniser.consume(...["identifier", "includes"]);1708tokeniser.consume(...["("]);1709tokeniser.consume(...["["]);1710tokeniser.consume(...["optional"]);1711tokeniser.consume(...["["]);1712tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1713tokeniser.consume(...["unsigned"]);1714tokeniser.consume(...["short", "long"]);1715tokeniser.consume(...["unrestricted"]);1716tokeniser.consume(...["float", "double"]);1717tokeniser.consume(...["boolean", "byte", "octet"]);1718tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1719tokeniser.consume(...["?"]);1720tokeniser.consume(...["..."]);1721tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1722tokeniser.consume(...[","]);1723tokeniser.consume(...["["]);1724tokeniser.consume(...["optional"]);1725tokeniser.consume(...["["]);1726tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1727tokeniser.consume(...["unsigned"]);1728tokeniser.consume(...["short", "long"]);1729tokeniser.consume(...["unrestricted"]);1730tokeniser.consume(...["float", "double"]);1731tokeniser.consume(...["boolean", "byte", "octet"]);1732tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1733tokeniser.consume(...["?"]);1734tokeniser.consume(...["..."]);1735tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1736tokeniser.consume(...[","]);1737tokeniser.consume(...["["]);1738tokeniser.consume(...["optional"]);1739tokeniser.consume(...["["]);1740tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1741tokeniser.consume(...["unsigned"]);1742tokeniser.consume(...["short", "long"]);1743tokeniser.consume(...["unrestricted"]);1744tokeniser.consume(...["float", "double"]);1745tokeniser.consume(...["boolean", "byte", "octet"]);1746tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1747tokeniser.consume(...["?"]);1748tokeniser.consume(...["..."]);1749tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1750tokeniser.consume(...[","]);1751tokeniser.consume(...["["]);1752tokeniser.consume(...["optional"]);1753tokeniser.consume(...["["]);1754tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1755tokeniser.consume(...["unsigned"]);1756tokeniser.consume(...["short", "long"]);1757tokeniser.consume(...["unrestricted"]);1758tokeniser.consume(...["float", "double"]);1759tokeniser.consume(...["boolean", "byte", "octet"]);1760tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1761tokeniser.consume(...["?"]);1762tokeniser.consume(...["..."]);1763tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1764tokeniser.consume(...[","]);1765tokeniser.consume(...[")"]);1766tokeniser.consume(...[";"]);1767tokeniser.consume(...["}"]);1768tokeniser.consume(...["["]);1769tokeniser.consume(...["const"]);1770tokeniser.consume(...["constructor"]);1771tokeniser.consume(...["static"]);1772tokeniser.consume(...["stringifier"]);1773tokeniser.consume(...["readonly"]);1774tokeniser.consume(...["async"]);1775tokeniser.consume(...["iterable", "maplike", "setlike"]);1776tokeniser.unconsume(368);1777tokeniser.consume(...["inherit"]);1778tokeniser.consume(...["readonly"]);1779tokeniser.consume(...["attribute"]);1780tokeniser.unconsume(368);1781tokeniser.consume(...["getter", "setter", "deleter"]);1782tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1783tokeniser.consume(...["<"]);1784tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1785tokeniser.consume(...["unsigned"]);1786tokeniser.consume(...["short", "long"]);1787tokeniser.consume(...["unrestricted"]);1788tokeniser.consume(...["float", "double"]);1789tokeniser.consume(...["boolean", "byte", "octet"]);1790tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1791tokeniser.consume(...["?"]);1792tokeniser.consume(...[">"]);1793tokeniser.consume(...["?"]);1794tokeniser.consume(...["identifier", "includes"]);1795tokeniser.consume(...["("]);1796tokeniser.consume(...["["]);1797tokeniser.consume(...["optional"]);1798tokeniser.consume(...["["]);1799tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1800tokeniser.consume(...["unsigned"]);1801tokeniser.consume(...["short", "long"]);1802tokeniser.consume(...["unrestricted"]);1803tokeniser.consume(...["float", "double"]);1804tokeniser.consume(...["boolean", "byte", "octet"]);1805tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1806tokeniser.consume(...["?"]);1807tokeniser.consume(...["..."]);1808tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1809tokeniser.consume(...[","]);1810tokeniser.consume(...["["]);1811tokeniser.consume(...["optional"]);1812tokeniser.consume(...["["]);1813tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1814tokeniser.consume(...["unsigned"]);1815tokeniser.consume(...["short", "long"]);1816tokeniser.consume(...["unrestricted"]);1817tokeniser.consume(...["float", "double"]);1818tokeniser.consume(...["boolean", "byte", "octet"]);1819tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1820tokeniser.consume(...["?"]);1821tokeniser.consume(...["..."]);1822tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1823tokeniser.consume(...[","]);1824tokeniser.consume(...["["]);1825tokeniser.consume(...["optional"]);1826tokeniser.consume(...["["]);1827tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1828tokeniser.consume(...["unsigned"]);1829tokeniser.consume(...["short", "long"]);1830tokeniser.consume(...["unrestricted"]);1831tokeniser.consume(...["float", "double"]);1832tokeniser.consume(...["boolean", "byte", "octet"]);1833tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1834tokeniser.consume(...["?"]);1835tokeniser.consume(...["..."]);1836tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1837tokeniser.consume(...[","]);1838tokeniser.consume(...["["]);1839tokeniser.consume(...["optional"]);1840tokeniser.consume(...["["]);1841tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1842tokeniser.consume(...["unsigned"]);1843tokeniser.consume(...["short", "long"]);1844tokeniser.consume(...["unrestricted"]);1845tokeniser.consume(...["float", "double"]);1846tokeniser.consume(...["boolean", "byte", "octet"]);1847tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1848tokeniser.consume(...["?"]);1849tokeniser.consume(...["..."]);1850tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1851tokeniser.consume(...[","]);1852tokeniser.consume(...["["]);1853tokeniser.consume(...["optional"]);1854tokeniser.consume(...["["]);1855tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1856tokeniser.consume(...["unsigned"]);1857tokeniser.consume(...["short", "long"]);1858tokeniser.consume(...["unrestricted"]);1859tokeniser.consume(...["float", "double"]);1860tokeniser.consume(...["boolean", "byte", "octet"]);1861tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1862tokeniser.consume(...["?"]);1863tokeniser.consume(...["..."]);1864tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1865tokeniser.consume(...[","]);1866tokeniser.consume(...["["]);1867tokeniser.consume(...["optional"]);1868tokeniser.consume(...["["]);1869tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1870tokeniser.consume(...["unsigned"]);1871tokeniser.consume(...["short", "long"]);1872tokeniser.consume(...["unrestricted"]);1873tokeniser.consume(...["float", "double"]);1874tokeniser.consume(...["boolean", "byte", "octet"]);1875tokeniser.consume(...["?"]);1876tokeniser.consume(...["..."]);1877tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1878tokeniser.consume(...[","]);1879tokeniser.consume(...["["]);1880tokeniser.consume(...["optional"]);1881tokeniser.consume(...["["]);1882tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1883tokeniser.consume(...["<"]);1884tokeniser.consume(...["["]);1885tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1886tokeniser.consume(...["unsigned"]);1887tokeniser.consume(...["short", "long"]);1888tokeniser.consume(...["unrestricted"]);1889tokeniser.consume(...["float", "double"]);1890tokeniser.consume(...["boolean", "byte", "octet"]);1891tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1892tokeniser.consume(...["?"]);1893tokeniser.consume(...[">"]);1894tokeniser.consume(...["?"]);1895tokeniser.consume(...["..."]);1896tokeniser.consume(...["identifier", "async", "attribute", "callback", "const", "constructor", "deleter", "dictionary", "enum", "getter", "includes", "inherit", "interface", "iterable", "maplike", "namespace", "partial", "required", "setlike", "setter", "static", "stringifier", "typedef", "unrestricted"]);1897tokeniser.consume(...[","]);1898tokeniser.consume(...[")"]);1899tokeniser.consume(...[";"]);1900tokeniser.consume(...["}"]);1901tokeniser.consume(...[";"]);1902tokeniser.consume(...["["]);1903tokeniser.consume(...["callback"]);1904tokeniser.consume(...["interface"]);1905tokeniser.consume(...["partial"]);1906tokeniser.consume(...["dictionary"]);1907tokeniser.consume(...["identifier"]);1908tokeniser.consume(...[":"]);1909tokeniser.consume(...["{"]);1910tokeniser.consume(...["}"]);1911tokeniser.consume(...["["]);1912tokeniser.consume(...["["]);1913tokeniser.consume(...["required"]);1914tokeniser.consume(...["["]);1915tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1916tokeniser.consume(...["unsigned"]);1917tokeniser.consume(...["short", "long"]);1918tokeniser.consume(...["unrestricted"]);1919tokeniser.consume(...["float", "double"]);1920tokeniser.consume(...["boolean", "byte", "octet"]);1921tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1922tokeniser.consume(...["?"]);1923tokeniser.consume(...["identifier"]);1924tokeniser.consume(...["="]);1925tokeniser.consume(...[";"]);1926tokeniser.consume(...["}"]);1927tokeniser.consume(...["["]);1928tokeniser.consume(...["["]);1929tokeniser.consume(...["required"]);1930tokeniser.consume(...["["]);1931tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1932tokeniser.consume(...["unsigned"]);1933tokeniser.consume(...["short", "long"]);1934tokeniser.consume(...["unrestricted"]);1935tokeniser.consume(...["float", "double"]);1936tokeniser.consume(...["boolean", "byte", "octet"]);1937tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1938tokeniser.consume(...["?"]);1939tokeniser.consume(...["identifier"]);1940tokeniser.consume(...["="]);1941tokeniser.consume(...[";"]);1942tokeniser.consume(...["}"]);1943tokeniser.consume(...["["]);1944tokeniser.consume(...["["]);1945tokeniser.consume(...["required"]);1946tokeniser.consume(...["["]);1947tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1948tokeniser.consume(...["unsigned"]);1949tokeniser.consume(...["short", "long"]);1950tokeniser.consume(...["unrestricted"]);1951tokeniser.consume(...["float", "double"]);1952tokeniser.consume(...["boolean", "byte", "octet"]);1953tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1954tokeniser.consume(...["?"]);1955tokeniser.consume(...["identifier"]);1956tokeniser.consume(...["="]);1957tokeniser.consume(...[";"]);1958tokeniser.consume(...["}"]);1959tokeniser.consume(...[";"]);1960tokeniser.consume(...["["]);1961tokeniser.consume(...["callback"]);1962tokeniser.consume(...["interface"]);1963tokeniser.consume(...["partial"]);1964tokeniser.consume(...["dictionary"]);1965tokeniser.consume(...["identifier"]);1966tokeniser.consume(...[":"]);1967tokeniser.consume(...["{"]);1968tokeniser.consume(...["}"]);1969tokeniser.consume(...["["]);1970tokeniser.consume(...["["]);1971tokeniser.consume(...["required"]);1972tokeniser.consume(...["["]);1973tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1974tokeniser.consume(...["unsigned"]);1975tokeniser.consume(...["short", "long"]);1976tokeniser.consume(...["unrestricted"]);1977tokeniser.consume(...["float", "double"]);1978tokeniser.consume(...["boolean", "byte", "octet"]);1979tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1980tokeniser.consume(...["?"]);1981tokeniser.consume(...["identifier"]);1982tokeniser.consume(...["="]);1983tokeniser.consume(...[";"]);1984tokeniser.consume(...["}"]);1985tokeniser.consume(...["["]);1986tokeniser.consume(...["["]);1987tokeniser.consume(...["required"]);1988tokeniser.consume(...["["]);1989tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);1990tokeniser.consume(...["unsigned"]);1991tokeniser.consume(...["short", "long"]);1992tokeniser.consume(...["unrestricted"]);1993tokeniser.consume(...["float", "double"]);1994tokeniser.consume(...["boolean", "byte", "octet"]);1995tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);1996tokeniser.consume(...["?"]);1997tokeniser.consume(...["identifier"]);1998tokeniser.consume(...["="]);1999tokeniser.consume(...[";"]);2000tokeniser.consume(...["}"]);2001tokeniser.consume(...["["]);2002tokeniser.consume(...["["]);2003tokeniser.consume(...["required"]);2004tokeniser.consume(...["["]);2005tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2006tokeniser.consume(...["<"]);2007tokeniser.consume(...["["]);2008tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2009tokeniser.consume(...["unsigned"]);2010tokeniser.consume(...["short", "long"]);2011tokeniser.consume(...["unrestricted"]);2012tokeniser.consume(...["float", "double"]);2013tokeniser.consume(...["boolean", "byte", "octet"]);2014tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2015tokeniser.consume(...["?"]);2016tokeniser.consume(...[">"]);2017tokeniser.consume(...["?"]);2018tokeniser.consume(...["identifier"]);2019tokeniser.consume(...["="]);2020tokeniser.consume(...[";"]);2021tokeniser.consume(...["}"]);2022tokeniser.consume(...["["]);2023tokeniser.consume(...["["]);2024tokeniser.consume(...["required"]);2025tokeniser.consume(...["["]);2026tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2027tokeniser.consume(...["unsigned"]);2028tokeniser.consume(...["short", "long"]);2029tokeniser.consume(...["unrestricted"]);2030tokeniser.consume(...["float", "double"]);2031tokeniser.consume(...["boolean", "byte", "octet"]);2032tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2033tokeniser.consume(...["?"]);2034tokeniser.consume(...["identifier"]);2035tokeniser.consume(...["="]);2036tokeniser.consume(...[";"]);2037tokeniser.consume(...["}"]);2038tokeniser.consume(...["["]);2039tokeniser.consume(...["["]);2040tokeniser.consume(...["required"]);2041tokeniser.consume(...["["]);2042tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2043tokeniser.consume(...["unsigned"]);2044tokeniser.consume(...["short", "long"]);2045tokeniser.consume(...["unrestricted"]);2046tokeniser.consume(...["float", "double"]);2047tokeniser.consume(...["boolean", "byte", "octet"]);2048tokeniser.consume(...["?"]);2049tokeniser.consume(...["identifier"]);2050tokeniser.consume(...["="]);2051tokeniser.consume(...[";"]);2052tokeniser.consume(...["}"]);2053tokeniser.consume(...["["]);2054tokeniser.consume(...["["]);2055tokeniser.consume(...["required"]);2056tokeniser.consume(...["["]);2057tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2058tokeniser.consume(...["unsigned"]);2059tokeniser.consume(...["short", "long"]);2060tokeniser.consume(...["unrestricted"]);2061tokeniser.consume(...["float", "double"]);2062tokeniser.consume(...["boolean", "byte", "octet"]);2063tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2064tokeniser.consume(...["?"]);2065tokeniser.consume(...["identifier"]);2066tokeniser.consume(...["="]);2067tokeniser.consume(...[";"]);2068tokeniser.consume(...["}"]);2069tokeniser.consume(...["["]);2070tokeniser.consume(...["["]);2071tokeniser.consume(...["required"]);2072tokeniser.consume(...["["]);2073tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2074tokeniser.consume(...["unsigned"]);2075tokeniser.consume(...["short", "long"]);2076tokeniser.consume(...["unrestricted"]);2077tokeniser.consume(...["float", "double"]);2078tokeniser.consume(...["boolean", "byte", "octet"]);2079tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2080tokeniser.consume(...["?"]);2081tokeniser.consume(...["identifier"]);2082tokeniser.consume(...["="]);2083tokeniser.consume(...[";"]);2084tokeniser.consume(...["}"]);2085tokeniser.consume(...["["]);2086tokeniser.consume(...["["]);2087tokeniser.consume(...["required"]);2088tokeniser.consume(...["["]);2089tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2090tokeniser.consume(...["unsigned"]);2091tokeniser.consume(...["short", "long"]);2092tokeniser.consume(...["unrestricted"]);2093tokeniser.consume(...["float", "double"]);2094tokeniser.consume(...["boolean", "byte", "octet"]);2095tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2096tokeniser.consume(...["?"]);2097tokeniser.consume(...["identifier"]);2098tokeniser.consume(...["="]);2099tokeniser.consume(...[";"]);2100tokeniser.consume(...["}"]);2101tokeniser.consume(...["["]);2102tokeniser.consume(...["["]);2103tokeniser.consume(...["required"]);2104tokeniser.consume(...["["]);2105tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2106tokeniser.consume(...["unsigned"]);2107tokeniser.consume(...["short", "long"]);2108tokeniser.consume(...["unrestricted"]);2109tokeniser.consume(...["float", "double"]);2110tokeniser.consume(...["boolean", "byte", "octet"]);2111tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2112tokeniser.consume(...["?"]);2113tokeniser.consume(...["identifier"]);2114tokeniser.consume(...["="]);2115tokeniser.consume(...[";"]);2116tokeniser.consume(...["}"]);2117tokeniser.consume(...["["]);2118tokeniser.consume(...["["]);2119tokeniser.consume(...["required"]);2120tokeniser.consume(...["["]);2121tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2122tokeniser.consume(...["unsigned"]);2123tokeniser.consume(...["short", "long"]);2124tokeniser.consume(...["unrestricted"]);2125tokeniser.consume(...["float", "double"]);2126tokeniser.consume(...["boolean", "byte", "octet"]);2127tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2128tokeniser.consume(...["?"]);2129tokeniser.consume(...["identifier"]);2130tokeniser.consume(...["="]);2131tokeniser.consume(...[";"]);2132tokeniser.consume(...["}"]);2133tokeniser.consume(...["["]);2134tokeniser.consume(...["["]);2135tokeniser.consume(...["required"]);2136tokeniser.consume(...["["]);2137tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2138tokeniser.consume(...["unsigned"]);2139tokeniser.consume(...["short", "long"]);2140tokeniser.consume(...["unrestricted"]);2141tokeniser.consume(...["float", "double"]);2142tokeniser.consume(...["boolean", "byte", "octet"]);2143tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2144tokeniser.consume(...["?"]);2145tokeniser.consume(...["identifier"]);2146tokeniser.consume(...["="]);2147tokeniser.consume(...[";"]);2148tokeniser.consume(...["}"]);2149tokeniser.consume(...["["]);2150tokeniser.consume(...["["]);2151tokeniser.consume(...["required"]);2152tokeniser.consume(...["["]);2153tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2154tokeniser.consume(...["unsigned"]);2155tokeniser.consume(...["short", "long"]);2156tokeniser.consume(...["unrestricted"]);2157tokeniser.consume(...["float", "double"]);2158tokeniser.consume(...["boolean", "byte", "octet"]);2159tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2160tokeniser.consume(...["?"]);2161tokeniser.consume(...["identifier"]);2162tokeniser.consume(...["="]);2163tokeniser.consume(...[";"]);2164tokeniser.consume(...["}"]);2165tokeniser.consume(...["["]);2166tokeniser.consume(...["["]);2167tokeniser.consume(...["required"]);2168tokeniser.consume(...["["]);2169tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2170tokeniser.consume(...["unsigned"]);2171tokeniser.consume(...["short", "long"]);2172tokeniser.consume(...["unrestricted"]);2173tokeniser.consume(...["float", "double"]);2174tokeniser.consume(...["boolean", "byte", "octet"]);2175tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2176tokeniser.consume(...["?"]);2177tokeniser.consume(...["identifier"]);2178tokeniser.consume(...["="]);2179tokeniser.consume(...[";"]);2180tokeniser.consume(...["}"]);2181tokeniser.consume(...["["]);2182tokeniser.consume(...["["]);2183tokeniser.consume(...["required"]);2184tokeniser.consume(...["["]);2185tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2186tokeniser.consume(...["unsigned"]);2187tokeniser.consume(...["short", "long"]);2188tokeniser.consume(...["unrestricted"]);2189tokeniser.consume(...["float", "double"]);2190tokeniser.consume(...["boolean", "byte", "octet"]);2191tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2192tokeniser.consume(...["?"]);2193tokeniser.consume(...["identifier"]);2194tokeniser.consume(...["="]);2195tokeniser.consume(...[";"]);2196tokeniser.consume(...["}"]);2197tokeniser.consume(...["["]);2198tokeniser.consume(...["["]);2199tokeniser.consume(...["required"]);2200tokeniser.consume(...["["]);2201tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2202tokeniser.consume(...["unsigned"]);2203tokeniser.consume(...["short", "long"]);2204tokeniser.consume(...["unrestricted"]);2205tokeniser.consume(...["float", "double"]);2206tokeniser.consume(...["boolean", "byte", "octet"]);2207tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2208tokeniser.consume(...["?"]);2209tokeniser.consume(...["identifier"]);2210tokeniser.consume(...["="]);2211tokeniser.consume(...[";"]);2212tokeniser.consume(...["}"]);2213tokeniser.consume(...["["]);2214tokeniser.consume(...["["]);2215tokeniser.consume(...["required"]);2216tokeniser.consume(...["["]);2217tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2218tokeniser.consume(...["unsigned"]);2219tokeniser.consume(...["short", "long"]);2220tokeniser.consume(...["unrestricted"]);2221tokeniser.consume(...["float", "double"]);2222tokeniser.consume(...["boolean", "byte", "octet"]);2223tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2224tokeniser.consume(...["?"]);2225tokeniser.consume(...["identifier"]);2226tokeniser.consume(...["="]);2227tokeniser.consume(...[";"]);2228tokeniser.consume(...["}"]);2229tokeniser.consume(...["["]);2230tokeniser.consume(...["["]);2231tokeniser.consume(...["required"]);2232tokeniser.consume(...["["]);2233tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2234tokeniser.consume(...["<"]);2235tokeniser.consume(...["["]);2236tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2237tokeniser.consume(...["unsigned"]);2238tokeniser.consume(...["short", "long"]);2239tokeniser.consume(...["unrestricted"]);2240tokeniser.consume(...["float", "double"]);2241tokeniser.consume(...["boolean", "byte", "octet"]);2242tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2243tokeniser.consume(...["?"]);2244tokeniser.consume(...[">"]);2245tokeniser.consume(...["?"]);2246tokeniser.consume(...["identifier"]);2247tokeniser.consume(...["="]);2248tokeniser.consume(...[";"]);2249tokeniser.consume(...["}"]);2250tokeniser.consume(...["["]);2251tokeniser.consume(...["["]);2252tokeniser.consume(...["required"]);2253tokeniser.consume(...["["]);2254tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2255tokeniser.consume(...["unsigned"]);2256tokeniser.consume(...["short", "long"]);2257tokeniser.consume(...["unrestricted"]);2258tokeniser.consume(...["float", "double"]);2259tokeniser.consume(...["boolean", "byte", "octet"]);2260tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2261tokeniser.consume(...["?"]);2262tokeniser.consume(...["identifier"]);2263tokeniser.consume(...["="]);2264tokeniser.consume(...[";"]);2265tokeniser.consume(...["}"]);2266tokeniser.consume(...[";"]);2267tokeniser.consume(...["["]);2268tokeniser.consume(...["callback"]);2269tokeniser.consume(...["interface"]);2270tokeniser.consume(...["partial"]);2271tokeniser.consume(...["dictionary"]);2272tokeniser.consume(...["enum"]);2273tokeniser.consume(...["typedef"]);2274tokeniser.consume(...["["]);2275tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2276tokeniser.consume(...["unsigned"]);2277tokeniser.consume(...["short", "long"]);2278tokeniser.consume(...["unrestricted"]);2279tokeniser.consume(...["float", "double"]);2280tokeniser.consume(...["boolean", "byte", "octet"]);2281tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2282tokeniser.consume(...["?"]);2283tokeniser.consume(...["identifier"]);2284tokeniser.consume(...[";"]);2285tokeniser.consume(...["["]);2286tokeniser.consume(...["callback"]);2287tokeniser.consume(...["interface"]);2288tokeniser.consume(...["partial"]);2289tokeniser.consume(...["dictionary"]);2290tokeniser.consume(...["identifier"]);2291tokeniser.consume(...[":"]);2292tokeniser.consume(...["{"]);2293tokeniser.consume(...["}"]);2294tokeniser.consume(...["["]);2295tokeniser.consume(...["["]);2296tokeniser.consume(...["required"]);2297tokeniser.consume(...["["]);2298tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2299tokeniser.consume(...["unsigned"]);2300tokeniser.consume(...["short", "long"]);2301tokeniser.consume(...["unrestricted"]);2302tokeniser.consume(...["float", "double"]);2303tokeniser.consume(...["boolean", "byte", "octet"]);2304tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2305tokeniser.consume(...["?"]);2306tokeniser.consume(...["identifier"]);2307tokeniser.consume(...["="]);2308tokeniser.consume(...[";"]);2309tokeniser.consume(...["}"]);2310tokeniser.consume(...["["]);2311tokeniser.consume(...["["]);2312tokeniser.consume(...["required"]);2313tokeniser.consume(...["["]);2314tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2315tokeniser.consume(...["unsigned"]);2316tokeniser.consume(...["short", "long"]);2317tokeniser.consume(...["unrestricted"]);2318tokeniser.consume(...["float", "double"]);2319tokeniser.consume(...["boolean", "byte", "octet"]);2320tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2321tokeniser.consume(...["?"]);2322tokeniser.consume(...["identifier"]);2323tokeniser.consume(...["="]);2324tokeniser.consume(...[";"]);2325tokeniser.consume(...["}"]);2326tokeniser.consume(...[";"]);2327tokeniser.consume(...["["]);2328tokeniser.consume(...["callback"]);2329tokeniser.consume(...["interface"]);2330tokeniser.consume(...["partial"]);2331tokeniser.consume(...["dictionary"]);2332tokeniser.consume(...["identifier"]);2333tokeniser.consume(...[":"]);2334tokeniser.consume(...["identifier"]);2335tokeniser.consume(...["{"]);2336tokeniser.consume(...["}"]);2337tokeniser.consume(...["["]);2338tokeniser.consume(...["["]);2339tokeniser.consume(...["required"]);2340tokeniser.consume(...["["]);2341tokeniser.consume(...["identifier"]);2342tokeniser.consume(...["="]);2343tokeniser.consume(...["("]);2344tokeniser.consume(...[","]);2345tokeniser.consume(...["]"]);2346tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2347tokeniser.consume(...["unsigned"]);2348tokeniser.consume(...["short", "long"]);2349tokeniser.consume(...["long"]);2350tokeniser.consume(...["?"]);2351tokeniser.consume(...["identifier"]);2352tokeniser.consume(...["="]);2353tokeniser.consume(...[";"]);2354tokeniser.consume(...["}"]);2355tokeniser.consume(...["["]);2356tokeniser.consume(...["["]);2357tokeniser.consume(...["required"]);2358tokeniser.consume(...["["]);2359tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2360tokeniser.consume(...["unsigned"]);2361tokeniser.consume(...["short", "long"]);2362tokeniser.consume(...["unrestricted"]);2363tokeniser.consume(...["float", "double"]);2364tokeniser.consume(...["boolean", "byte", "octet"]);2365tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2366tokeniser.consume(...["?"]);2367tokeniser.consume(...["identifier"]);2368tokeniser.consume(...["="]);2369tokeniser.consume(...[";"]);2370tokeniser.consume(...["}"]);2371tokeniser.consume(...[";"]);2372tokeniser.consume(...["["]);2373tokeniser.consume(...["callback"]);2374tokeniser.consume(...["interface"]);2375tokeniser.consume(...["partial"]);2376tokeniser.consume(...["dictionary"]);2377tokeniser.consume(...["identifier"]);2378tokeniser.consume(...[":"]);2379tokeniser.consume(...["identifier"]);2380tokeniser.consume(...["{"]);2381tokeniser.consume(...["}"]);2382tokeniser.consume(...["["]);2383tokeniser.consume(...["["]);2384tokeniser.consume(...["required"]);2385tokeniser.consume(...["["]);2386tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2387tokeniser.consume(...["unsigned"]);2388tokeniser.consume(...["short", "long"]);2389tokeniser.consume(...["unrestricted"]);2390tokeniser.consume(...["float", "double"]);2391tokeniser.consume(...["boolean", "byte", "octet"]);2392tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2393tokeniser.consume(...["?"]);2394tokeniser.consume(...["identifier"]);2395tokeniser.consume(...["="]);2396tokeniser.consume(...[";"]);2397tokeniser.consume(...["}"]);2398tokeniser.consume(...[";"]);2399tokeniser.consume(...["["]);2400tokeniser.consume(...["callback"]);2401tokeniser.consume(...["interface"]);2402tokeniser.consume(...["partial"]);2403tokeniser.consume(...["dictionary"]);2404tokeniser.consume(...["identifier"]);2405tokeniser.consume(...[":"]);2406tokeniser.consume(...["identifier"]);2407tokeniser.consume(...["{"]);2408tokeniser.consume(...["}"]);2409tokeniser.consume(...["["]);2410tokeniser.consume(...["["]);2411tokeniser.consume(...["required"]);2412tokeniser.consume(...["["]);2413tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2414tokeniser.consume(...["unsigned"]);2415tokeniser.consume(...["short", "long"]);2416tokeniser.consume(...["long"]);2417tokeniser.consume(...["?"]);2418tokeniser.consume(...["identifier"]);2419tokeniser.consume(...["="]);2420tokeniser.consume(...[";"]);2421tokeniser.consume(...["}"]);2422tokeniser.consume(...["["]);2423tokeniser.consume(...["["]);2424tokeniser.consume(...["required"]);2425tokeniser.consume(...["["]);2426tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2427tokeniser.consume(...["unsigned"]);2428tokeniser.consume(...["short", "long"]);2429tokeniser.consume(...["unrestricted"]);2430tokeniser.consume(...["float", "double"]);2431tokeniser.consume(...["boolean", "byte", "octet"]);2432tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2433tokeniser.consume(...["?"]);2434tokeniser.consume(...["identifier"]);2435tokeniser.consume(...["="]);2436tokeniser.consume(...[";"]);2437tokeniser.consume(...["}"]);2438tokeniser.consume(...[";"]);2439tokeniser.consume(...["["]);2440tokeniser.consume(...["callback"]);2441tokeniser.consume(...["interface"]);2442tokeniser.consume(...["partial"]);2443tokeniser.consume(...["dictionary"]);2444tokeniser.consume(...["identifier"]);2445tokeniser.consume(...[":"]);2446tokeniser.consume(...["identifier"]);2447tokeniser.consume(...["{"]);2448tokeniser.consume(...["}"]);2449tokeniser.consume(...["["]);2450tokeniser.consume(...["["]);2451tokeniser.consume(...["required"]);2452tokeniser.consume(...["["]);2453tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2454tokeniser.consume(...["unsigned"]);2455tokeniser.consume(...["short", "long"]);2456tokeniser.consume(...["unrestricted"]);2457tokeniser.consume(...["float", "double"]);2458tokeniser.consume(...["boolean", "byte", "octet"]);2459tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2460tokeniser.consume(...["?"]);2461tokeniser.consume(...["identifier"]);2462tokeniser.consume(...["="]);2463tokeniser.consume(...[";"]);2464tokeniser.consume(...["}"]);2465tokeniser.consume(...[";"]);2466tokeniser.consume(...["["]);2467tokeniser.consume(...["callback"]);2468tokeniser.consume(...["interface"]);2469tokeniser.consume(...["partial"]);2470tokeniser.consume(...["dictionary"]);2471tokeniser.consume(...["identifier"]);2472tokeniser.consume(...[":"]);2473tokeniser.consume(...["identifier"]);2474tokeniser.consume(...["{"]);2475tokeniser.consume(...["}"]);2476tokeniser.consume(...["["]);2477tokeniser.consume(...["["]);2478tokeniser.consume(...["required"]);2479tokeniser.consume(...["["]);2480tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2481tokeniser.consume(...["unsigned"]);2482tokeniser.consume(...["short", "long"]);2483tokeniser.consume(...["unrestricted"]);2484tokeniser.consume(...["float", "double"]);2485tokeniser.consume(...["boolean", "byte", "octet"]);2486tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2487tokeniser.consume(...["?"]);2488tokeniser.consume(...["identifier"]);2489tokeniser.consume(...["="]);2490tokeniser.consume(...[";"]);2491tokeniser.consume(...["}"]);2492tokeniser.consume(...[";"]);2493tokeniser.consume(...["["]);2494tokeniser.consume(...["callback"]);2495tokeniser.consume(...["interface"]);2496tokeniser.consume(...["partial"]);2497tokeniser.consume(...["dictionary"]);2498tokeniser.consume(...["identifier"]);2499tokeniser.consume(...[":"]);2500tokeniser.consume(...["identifier"]);2501tokeniser.consume(...["{"]);2502tokeniser.consume(...["}"]);2503tokeniser.consume(...["["]);2504tokeniser.consume(...["["]);2505tokeniser.consume(...["required"]);2506tokeniser.consume(...["["]);2507tokeniser.consume(...["identifier"]);2508tokeniser.consume(...["="]);2509tokeniser.consume(...["("]);2510tokeniser.consume(...[","]);2511tokeniser.consume(...["]"]);2512tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2513tokeniser.consume(...["unsigned"]);2514tokeniser.consume(...["short", "long"]);2515tokeniser.consume(...["long"]);2516tokeniser.consume(...["?"]);2517tokeniser.consume(...["identifier"]);2518tokeniser.consume(...["="]);2519tokeniser.consume(...[";"]);2520tokeniser.consume(...["}"]);2521tokeniser.consume(...[";"]);2522tokeniser.consume(...["["]);2523tokeniser.consume(...["callback"]);2524tokeniser.consume(...["interface"]);2525tokeniser.consume(...["partial"]);2526tokeniser.consume(...["dictionary"]);2527tokeniser.consume(...["identifier"]);2528tokeniser.consume(...[":"]);2529tokeniser.consume(...["identifier"]);2530tokeniser.consume(...["{"]);2531tokeniser.consume(...["}"]);2532tokeniser.consume(...["["]);2533tokeniser.consume(...["["]);2534tokeniser.consume(...["required"]);2535tokeniser.consume(...["["]);2536tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2537tokeniser.consume(...["unsigned"]);2538tokeniser.consume(...["short", "long"]);2539tokeniser.consume(...["unrestricted"]);2540tokeniser.consume(...["float", "double"]);2541tokeniser.consume(...["boolean", "byte", "octet"]);2542tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2543tokeniser.consume(...["?"]);2544tokeniser.consume(...["identifier"]);2545tokeniser.consume(...["="]);2546tokeniser.consume(...[";"]);2547tokeniser.consume(...["}"]);2548tokeniser.consume(...[";"]);2549tokeniser.consume(...["["]);2550tokeniser.consume(...["callback"]);2551tokeniser.consume(...["interface"]);2552tokeniser.consume(...["partial"]);2553tokeniser.consume(...["dictionary"]);2554tokeniser.consume(...["identifier"]);2555tokeniser.consume(...[":"]);2556tokeniser.consume(...["identifier"]);2557tokeniser.consume(...["{"]);2558tokeniser.consume(...["}"]);2559tokeniser.consume(...["["]);2560tokeniser.consume(...["["]);2561tokeniser.consume(...["required"]);2562tokeniser.consume(...["["]);2563tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2564tokeniser.consume(...["unsigned"]);2565tokeniser.consume(...["short", "long"]);2566tokeniser.consume(...["unrestricted"]);2567tokeniser.consume(...["float", "double"]);2568tokeniser.consume(...["boolean", "byte", "octet"]);2569tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2570tokeniser.consume(...["?"]);2571tokeniser.consume(...["identifier"]);2572tokeniser.consume(...["="]);2573tokeniser.consume(...[";"]);2574tokeniser.consume(...["}"]);2575tokeniser.consume(...[";"]);2576tokeniser.consume(...["["]);2577tokeniser.consume(...["callback"]);2578tokeniser.consume(...["interface"]);2579tokeniser.consume(...["partial"]);2580tokeniser.consume(...["dictionary"]);2581tokeniser.consume(...["enum"]);2582tokeniser.consume(...["typedef"]);2583tokeniser.consume(...["["]);2584tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2585tokeniser.consume(...["unsigned"]);2586tokeniser.consume(...["short", "long"]);2587tokeniser.consume(...["unrestricted"]);2588tokeniser.consume(...["float", "double"]);2589tokeniser.consume(...["boolean", "byte", "octet"]);2590tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2591tokeniser.consume(...["?"]);2592tokeniser.consume(...["identifier"]);2593tokeniser.consume(...[";"]);2594tokeniser.consume(...["["]);2595tokeniser.consume(...["callback"]);2596tokeniser.consume(...["interface"]);2597tokeniser.consume(...["partial"]);2598tokeniser.consume(...["dictionary"]);2599tokeniser.consume(...["identifier"]);2600tokeniser.consume(...[":"]);2601tokeniser.consume(...["identifier"]);2602tokeniser.consume(...["{"]);2603tokeniser.consume(...["}"]);2604tokeniser.consume(...["["]);2605tokeniser.consume(...["["]);2606tokeniser.consume(...["required"]);2607tokeniser.consume(...["["]);2608tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2609tokeniser.consume(...["unsigned"]);2610tokeniser.consume(...["short", "long"]);2611tokeniser.consume(...["unrestricted"]);2612tokeniser.consume(...["float", "double"]);2613tokeniser.consume(...["boolean", "byte", "octet"]);2614tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2615tokeniser.consume(...["?"]);2616tokeniser.consume(...["identifier"]);2617tokeniser.consume(...["="]);2618tokeniser.consume(...[";"]);2619tokeniser.consume(...["}"]);2620tokeniser.consume(...[";"]);2621tokeniser.consume(...["["]);2622tokeniser.consume(...["callback"]);2623tokeniser.consume(...["interface"]);2624tokeniser.consume(...["partial"]);2625tokeniser.consume(...["dictionary"]);2626tokeniser.consume(...["identifier"]);2627tokeniser.consume(...[":"]);2628tokeniser.consume(...["identifier"]);2629tokeniser.consume(...["{"]);2630tokeniser.consume(...["}"]);2631tokeniser.consume(...["["]);2632tokeniser.consume(...["["]);2633tokeniser.consume(...["required"]);2634tokeniser.consume(...["["]);2635tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2636tokeniser.consume(...["unsigned"]);2637tokeniser.consume(...["short", "long"]);2638tokeniser.consume(...["unrestricted"]);2639tokeniser.consume(...["float", "double"]);2640tokeniser.consume(...["boolean", "byte", "octet"]);2641tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2642tokeniser.consume(...["?"]);2643tokeniser.consume(...["identifier"]);2644tokeniser.consume(...["="]);2645tokeniser.consume(...[";"]);2646tokeniser.consume(...["}"]);2647tokeniser.consume(...[";"]);2648tokeniser.consume(...["["]);2649tokeniser.consume(...["callback"]);2650tokeniser.consume(...["interface"]);2651tokeniser.consume(...["partial"]);2652tokeniser.consume(...["dictionary"]);2653tokeniser.consume(...["identifier"]);2654tokeniser.consume(...[":"]);2655tokeniser.consume(...["identifier"]);2656tokeniser.consume(...["{"]);2657tokeniser.consume(...["}"]);2658tokeniser.consume(...["["]);2659tokeniser.consume(...["["]);2660tokeniser.consume(...["required"]);2661tokeniser.consume(...["["]);2662tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2663tokeniser.consume(...["unsigned"]);2664tokeniser.consume(...["short", "long"]);2665tokeniser.consume(...["unrestricted"]);2666tokeniser.consume(...["float", "double"]);2667tokeniser.consume(...["boolean", "byte", "octet"]);2668tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2669tokeniser.consume(...["?"]);2670tokeniser.consume(...["identifier"]);2671tokeniser.consume(...["="]);2672tokeniser.consume(...[";"]);2673tokeniser.consume(...["}"]);2674tokeniser.consume(...[";"]);2675tokeniser.consume(...["["]);2676tokeniser.consume(...["callback"]);2677tokeniser.consume(...["interface"]);2678tokeniser.consume(...["partial"]);2679tokeniser.consume(...["dictionary"]);2680tokeniser.consume(...["identifier"]);2681tokeniser.consume(...[":"]);2682tokeniser.consume(...["identifier"]);2683tokeniser.consume(...["{"]);2684tokeniser.consume(...["}"]);2685tokeniser.consume(...["["]);2686tokeniser.consume(...["["]);2687tokeniser.consume(...["required"]);2688tokeniser.consume(...["["]);2689tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2690tokeniser.consume(...["unsigned"]);2691tokeniser.consume(...["short", "long"]);2692tokeniser.consume(...["unrestricted"]);2693tokeniser.consume(...["float", "double"]);2694tokeniser.consume(...["boolean", "byte", "octet"]);2695tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2696tokeniser.consume(...["?"]);2697tokeniser.consume(...["identifier"]);2698tokeniser.consume(...["="]);2699tokeniser.consume(...[";"]);2700tokeniser.consume(...["}"]);2701tokeniser.consume(...[";"]);2702tokeniser.consume(...["["]);2703tokeniser.consume(...["callback"]);2704tokeniser.consume(...["interface"]);2705tokeniser.consume(...["partial"]);2706tokeniser.consume(...["dictionary"]);2707tokeniser.consume(...["identifier"]);2708tokeniser.consume(...[":"]);2709tokeniser.consume(...["identifier"]);2710tokeniser.consume(...["{"]);2711tokeniser.consume(...["}"]);2712tokeniser.consume(...["["]);2713tokeniser.consume(...["["]);2714tokeniser.consume(...["required"]);2715tokeniser.consume(...["["]);2716tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2717tokeniser.consume(...["unsigned"]);2718tokeniser.consume(...["short", "long"]);2719tokeniser.consume(...["unrestricted"]);2720tokeniser.consume(...["float", "double"]);2721tokeniser.consume(...["boolean", "byte", "octet"]);2722tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2723tokeniser.consume(...["?"]);2724tokeniser.consume(...["identifier"]);2725tokeniser.consume(...["="]);2726tokeniser.consume(...[";"]);2727tokeniser.consume(...["}"]);2728tokeniser.consume(...["["]);2729tokeniser.consume(...["["]);2730tokeniser.consume(...["required"]);2731tokeniser.consume(...["["]);2732tokeniser.consume(...["identifier"]);2733tokeniser.consume(...["="]);2734tokeniser.consume(...["("]);2735tokeniser.consume(...[","]);2736tokeniser.consume(...["]"]);2737tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2738tokeniser.consume(...["unsigned"]);2739tokeniser.consume(...["short", "long"]);2740tokeniser.consume(...["unrestricted"]);2741tokeniser.consume(...["float", "double"]);2742tokeniser.consume(...["boolean", "byte", "octet"]);2743tokeniser.consume(...["?"]);2744tokeniser.consume(...["identifier"]);2745tokeniser.consume(...["="]);2746tokeniser.consume(...[";"]);2747tokeniser.consume(...["}"]);2748tokeniser.consume(...[";"]);2749tokeniser.consume(...["["]);2750tokeniser.consume(...["callback"]);2751tokeniser.consume(...["interface"]);2752tokeniser.consume(...["partial"]);2753tokeniser.consume(...["dictionary"]);2754tokeniser.consume(...["identifier"]);2755tokeniser.consume(...[":"]);2756tokeniser.consume(...["identifier"]);2757tokeniser.consume(...["{"]);2758tokeniser.consume(...["}"]);2759tokeniser.consume(...["["]);2760tokeniser.consume(...["["]);2761tokeniser.consume(...["required"]);2762tokeniser.consume(...["["]);2763tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2764tokeniser.consume(...["unsigned"]);2765tokeniser.consume(...["short", "long"]);2766tokeniser.consume(...["long"]);2767tokeniser.consume(...["?"]);2768tokeniser.consume(...["identifier"]);2769tokeniser.consume(...["="]);2770tokeniser.consume(...[";"]);2771tokeniser.consume(...["}"]);2772tokeniser.consume(...[";"]);2773tokeniser.consume(...["["]);2774tokeniser.consume(...["callback"]);2775tokeniser.consume(...["interface"]);2776tokeniser.consume(...["partial"]);2777tokeniser.consume(...["dictionary"]);2778tokeniser.consume(...["identifier"]);2779tokeniser.consume(...[":"]);2780tokeniser.consume(...["identifier"]);2781tokeniser.consume(...["{"]);2782tokeniser.consume(...["}"]);2783tokeniser.consume(...["["]);2784tokeniser.consume(...["["]);2785tokeniser.consume(...["required"]);2786tokeniser.consume(...["["]);2787tokeniser.consume(...["identifier"]);2788tokeniser.consume(...["="]);2789tokeniser.consume(...["("]);2790tokeniser.consume(...[","]);2791tokeniser.consume(...["]"]);2792tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2793tokeniser.consume(...["unsigned"]);2794tokeniser.consume(...["short", "long"]);2795tokeniser.consume(...["long"]);2796tokeniser.consume(...["?"]);2797tokeniser.consume(...["identifier"]);2798tokeniser.consume(...["="]);2799tokeniser.consume(...[";"]);2800tokeniser.consume(...["}"]);2801tokeniser.consume(...[";"]);2802tokeniser.consume(...["["]);2803tokeniser.consume(...["callback"]);2804tokeniser.consume(...["interface"]);2805tokeniser.consume(...["partial"]);2806tokeniser.consume(...["dictionary"]);2807tokeniser.consume(...["identifier"]);2808tokeniser.consume(...[":"]);2809tokeniser.consume(...["identifier"]);2810tokeniser.consume(...["{"]);2811tokeniser.consume(...["}"]);2812tokeniser.consume(...["["]);2813tokeniser.consume(...["["]);2814tokeniser.consume(...["required"]);2815tokeniser.consume(...["["]);2816tokeniser.consume(...["identifier"]);2817tokeniser.consume(...["="]);2818tokeniser.consume(...["("]);2819tokeniser.consume(...[","]);2820tokeniser.consume(...["]"]);2821tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2822tokeniser.consume(...["unsigned"]);2823tokeniser.consume(...["short", "long"]);2824tokeniser.consume(...["long"]);2825tokeniser.consume(...["?"]);2826tokeniser.consume(...["identifier"]);2827tokeniser.consume(...["="]);2828tokeniser.consume(...[";"]);2829tokeniser.consume(...["}"]);2830tokeniser.consume(...[";"]);2831tokeniser.consume(...["["]);2832tokeniser.consume(...["callback"]);2833tokeniser.consume(...["interface"]);2834tokeniser.consume(...["partial"]);2835tokeniser.consume(...["dictionary"]);2836tokeniser.consume(...["identifier"]);2837tokeniser.consume(...[":"]);2838tokeniser.consume(...["identifier"]);2839tokeniser.consume(...["{"]);2840tokeniser.consume(...["}"]);2841tokeniser.consume(...["["]);2842tokeniser.consume(...["["]);2843tokeniser.consume(...["required"]);2844tokeniser.consume(...["["]);2845tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2846tokeniser.consume(...["unsigned"]);2847tokeniser.consume(...["short", "long"]);2848tokeniser.consume(...["unrestricted"]);2849tokeniser.consume(...["float", "double"]);2850tokeniser.consume(...["boolean", "byte", "octet"]);2851tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2852tokeniser.consume(...["?"]);2853tokeniser.consume(...["identifier"]);2854tokeniser.consume(...["="]);2855tokeniser.consume(...[";"]);2856tokeniser.consume(...["}"]);2857tokeniser.consume(...[";"]);2858tokeniser.consume(...["["]);2859tokeniser.consume(...["callback"]);2860tokeniser.consume(...["interface"]);2861tokeniser.consume(...["partial"]);2862tokeniser.consume(...["dictionary"]);2863tokeniser.consume(...["identifier"]);2864tokeniser.consume(...[":"]);2865tokeniser.consume(...["identifier"]);2866tokeniser.consume(...["{"]);2867tokeniser.consume(...["}"]);2868tokeniser.consume(...["["]);2869tokeniser.consume(...["["]);2870tokeniser.consume(...["required"]);2871tokeniser.consume(...["["]);2872tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2873tokeniser.consume(...["unsigned"]);2874tokeniser.consume(...["short", "long"]);2875tokeniser.consume(...["unrestricted"]);2876tokeniser.consume(...["float", "double"]);2877tokeniser.consume(...["boolean", "byte", "octet"]);2878tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2879tokeniser.consume(...["?"]);2880tokeniser.consume(...["identifier"]);2881tokeniser.consume(...["="]);2882tokeniser.consume(...[";"]);2883tokeniser.consume(...["}"]);2884tokeniser.consume(...["["]);2885tokeniser.consume(...["["]);2886tokeniser.consume(...["required"]);2887tokeniser.consume(...["["]);2888tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2889tokeniser.consume(...["unsigned"]);2890tokeniser.consume(...["short", "long"]);2891tokeniser.consume(...["unrestricted"]);2892tokeniser.consume(...["float", "double"]);2893tokeniser.consume(...["boolean", "byte", "octet"]);2894tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2895tokeniser.consume(...["?"]);2896tokeniser.consume(...["identifier"]);2897tokeniser.consume(...["="]);2898tokeniser.consume(...[";"]);2899tokeniser.consume(...["}"]);2900tokeniser.consume(...["["]);2901tokeniser.consume(...["identifier"]);2902tokeniser.consume(...["="]);2903tokeniser.consume(...["("]);2904tokeniser.consume(...[","]);2905tokeniser.consume(...["]"]);2906tokeniser.consume(...["["]);2907tokeniser.consume(...["required"]);2908tokeniser.consume(...["["]);2909tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2910tokeniser.consume(...["unsigned"]);2911tokeniser.consume(...["short", "long"]);2912tokeniser.consume(...["unrestricted"]);2913tokeniser.consume(...["float", "double"]);2914tokeniser.consume(...["boolean", "byte", "octet"]);2915tokeniser.consume(...["?"]);2916tokeniser.consume(...["identifier"]);2917tokeniser.consume(...["="]);2918tokeniser.consume(...[";"]);2919tokeniser.consume(...["}"]);2920tokeniser.consume(...[";"]);2921tokeniser.consume(...["["]);2922tokeniser.consume(...["callback"]);2923tokeniser.consume(...["interface"]);2924tokeniser.consume(...["partial"]);2925tokeniser.consume(...["dictionary"]);2926tokeniser.consume(...["identifier"]);2927tokeniser.consume(...[":"]);2928tokeniser.consume(...["identifier"]);2929tokeniser.consume(...["{"]);2930tokeniser.consume(...["}"]);2931tokeniser.consume(...["["]);2932tokeniser.consume(...["["]);2933tokeniser.consume(...["required"]);2934tokeniser.consume(...["["]);2935tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2936tokeniser.consume(...["unsigned"]);2937tokeniser.consume(...["short", "long"]);2938tokeniser.consume(...["unrestricted"]);2939tokeniser.consume(...["float", "double"]);2940tokeniser.consume(...["boolean", "byte", "octet"]);2941tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2942tokeniser.consume(...["?"]);2943tokeniser.consume(...["identifier"]);2944tokeniser.consume(...["="]);2945tokeniser.consume(...[";"]);2946tokeniser.consume(...["}"]);2947tokeniser.consume(...["["]);2948tokeniser.consume(...["identifier"]);2949tokeniser.consume(...["="]);2950tokeniser.consume(...["("]);2951tokeniser.consume(...[","]);2952tokeniser.consume(...["]"]);2953tokeniser.consume(...["["]);2954tokeniser.consume(...["required"]);2955tokeniser.consume(...["["]);2956tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2957tokeniser.consume(...["unsigned"]);2958tokeniser.consume(...["short", "long"]);2959tokeniser.consume(...["long"]);2960tokeniser.consume(...["?"]);2961tokeniser.consume(...["identifier"]);2962tokeniser.consume(...["="]);2963tokeniser.consume(...[";"]);2964tokeniser.consume(...["}"]);2965tokeniser.consume(...[";"]);2966tokeniser.consume(...["["]);2967tokeniser.consume(...["callback"]);2968tokeniser.consume(...["interface"]);2969tokeniser.consume(...["partial"]);2970tokeniser.consume(...["dictionary"]);2971tokeniser.consume(...["identifier"]);2972tokeniser.consume(...[":"]);2973tokeniser.consume(...["identifier"]);2974tokeniser.consume(...["{"]);2975tokeniser.consume(...["}"]);2976tokeniser.consume(...["["]);2977tokeniser.consume(...["["]);2978tokeniser.consume(...["required"]);2979tokeniser.consume(...["["]);2980tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2981tokeniser.consume(...["unsigned"]);2982tokeniser.consume(...["short", "long"]);2983tokeniser.consume(...["unrestricted"]);2984tokeniser.consume(...["float", "double"]);2985tokeniser.consume(...["boolean", "byte", "octet"]);2986tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);2987tokeniser.consume(...["?"]);2988tokeniser.consume(...["identifier"]);2989tokeniser.consume(...["="]);2990tokeniser.consume(...[";"]);2991tokeniser.consume(...["}"]);2992tokeniser.consume(...["["]);2993tokeniser.consume(...["["]);2994tokeniser.consume(...["required"]);2995tokeniser.consume(...["["]);2996tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);2997tokeniser.consume(...["unsigned"]);2998tokeniser.consume(...["short", "long"]);2999tokeniser.consume(...["long"]);3000tokeniser.consume(...["?"]);3001tokeniser.consume(...["identifier"]);3002tokeniser.consume(...["="]);3003tokeniser.consume(...[";"]);3004tokeniser.consume(...["}"]);3005tokeniser.consume(...[";"]);3006tokeniser.consume(...["["]);3007tokeniser.consume(...["callback"]);3008tokeniser.consume(...["interface"]);3009tokeniser.consume(...["partial"]);3010tokeniser.consume(...["dictionary"]);3011tokeniser.consume(...["identifier"]);3012tokeniser.consume(...[":"]);3013tokeniser.consume(...["identifier"]);3014tokeniser.consume(...["{"]);3015tokeniser.consume(...["}"]);3016tokeniser.consume(...["["]);3017tokeniser.consume(...["["]);3018tokeniser.consume(...["required"]);3019tokeniser.consume(...["["]);3020tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);3021tokeniser.consume(...["unsigned"]);3022tokeniser.consume(...["short", "long"]);3023tokeniser.consume(...["unrestricted"]);3024tokeniser.consume(...["float", "double"]);3025tokeniser.consume(...["boolean", "byte", "octet"]);3026tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);3027tokeniser.consume(...["?"]);3028tokeniser.consume(...["identifier"]);3029tokeniser.consume(...["="]);3030tokeniser.consume(...[";"]);3031tokeniser.consume(...["}"]);3032tokeniser.consume(...["["]);3033tokeniser.consume(...["identifier"]);3034tokeniser.consume(...["="]);3035tokeniser.consume(...["("]);3036tokeniser.consume(...[","]);3037tokeniser.consume(...["]"]);3038tokeniser.consume(...["["]);3039tokeniser.consume(...["required"]);3040tokeniser.consume(...["["]);3041tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);3042tokeniser.consume(...["unsigned"]);3043tokeniser.consume(...["short", "long"]);3044tokeniser.consume(...["long"]);3045tokeniser.consume(...["?"]);3046tokeniser.consume(...["identifier"]);3047tokeniser.consume(...["="]);3048tokeniser.consume(...[";"]);3049tokeniser.consume(...["}"]);3050tokeniser.consume(...[";"]);3051tokeniser.consume(...["["]);3052tokeniser.consume(...["callback"]);3053tokeniser.consume(...["interface"]);3054tokeniser.consume(...["partial"]);3055tokeniser.consume(...["dictionary"]);3056tokeniser.consume(...["identifier"]);3057tokeniser.consume(...[":"]);3058tokeniser.consume(...["identifier"]);3059tokeniser.consume(...["{"]);3060tokeniser.consume(...["}"]);3061tokeniser.consume(...["["]);3062tokeniser.consume(...["["]);3063tokeniser.consume(...["required"]);3064tokeniser.consume(...["["]);3065tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);3066tokeniser.consume(...["unsigned"]);3067tokeniser.consume(...["short", "long"]);3068tokeniser.consume(...["unrestricted"]);3069tokeniser.consume(...["float", "double"]);3070tokeniser.consume(...["boolean", "byte", "octet"]);3071tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);3072tokeniser.consume(...["?"]);3073tokeniser.consume(...["identifier"]);3074tokeniser.consume(...["="]);3075tokeniser.consume(...[";"]);3076tokeniser.consume(...["}"]);3077tokeniser.consume(...["["]);3078tokeniser.consume(...["["]);3079tokeniser.consume(...["required"]);3080tokeniser.consume(...["["]);3081tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);3082tokeniser.consume(...["unsigned"]);3083tokeniser.consume(...["short", "long"]);3084tokeniser.consume(...["unrestricted"]);3085tokeniser.consume(...["float", "double"]);3086tokeniser.consume(...["boolean", "byte", "octet"]);3087tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);3088tokeniser.consume(...["?"]);3089tokeniser.consume(...["identifier"]);3090tokeniser.consume(...["="]);3091tokeniser.consume(...[";"]);3092tokeniser.consume(...["}"]);3093tokeniser.consume(...["["]);3094tokeniser.consume(...["["]);3095tokeniser.consume(...["required"]);3096tokeniser.consume(...["["]);3097tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);3098tokeniser.consume(...["unsigned"]);3099tokeniser.consume(...["short", "long"]);3100tokeniser.consume(...["unrestricted"]);3101tokeniser.consume(...["float", "double"]);3102tokeniser.consume(...["boolean", "byte", "octet"]);3103tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);3104tokeniser.consume(...["?"]);3105tokeniser.consume(...["identifier"]);3106tokeniser.consume(...["="]);3107tokeniser.consume(...[";"]);3108tokeniser.consume(...["}"]);3109tokeniser.consume(...[";"]);3110tokeniser.consume(...["["]);3111tokeniser.consume(...["callback"]);3112tokeniser.consume(...["interface"]);3113tokeniser.consume(...["partial"]);3114tokeniser.consume(...["dictionary"]);3115tokeniser.consume(...["identifier"]);3116tokeniser.consume(...[":"]);3117tokeniser.consume(...["identifier"]);3118tokeniser.consume(...["{"]);3119tokeniser.consume(...["}"]);3120tokeniser.consume(...["["]);3121tokeniser.consume(...["["]);3122tokeniser.consume(...["required"]);3123tokeniser.consume(...["["]);3124tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);3125tokeniser.consume(...["unsigned"]);3126tokeniser.consume(...["short", "long"]);3127tokeniser.consume(...["unrestricted"]);3128tokeniser.consume(...["float", "double"]);3129tokeniser.consume(...["boolean", "byte", "octet"]);3130tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);3131tokeniser.consume(...["?"]);3132tokeniser.consume(...["identifier"]);3133tokeniser.consume(...["="]);3134tokeniser.consume(...[";"]);3135tokeniser.consume(...["}"]);3136tokeniser.consume(...["["]);3137tokeniser.consume(...["["]);3138tokeniser.consume(...["required"]);3139tokeniser.consume(...["["]);3140tokeniser.consume(...["identifier"]);3141tokeniser.consume(...["="]);3142tokeniser.consume(...["("]);3143tokeniser.consume(...[","]);3144tokeniser.consume(...["]"]);3145tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);3146tokeniser.consume(...["unsigned"]);3147tokeniser.consume(...["short", "long"]);3148tokeniser.consume(...["long"]);3149tokeniser.consume(...["?"]);3150tokeniser.consume(...["identifier"]);3151tokeniser.consume(...["="]);3152tokeniser.consume(...[";"]);3153tokeniser.consume(...["}"]);3154tokeniser.consume(...["["]);3155tokeniser.consume(...["["]);3156tokeniser.consume(...["required"]);3157tokeniser.consume(...["["]);3158tokeniser.consume(...["FrozenArray", "Promise", "sequence", "record"]);3159tokeniser.consume(...["unsigned"]);3160tokeniser.consume(...["short", "long"]);3161tokeniser.consume(...["unrestricted"]);3162tokeniser.consume(...["float", "double"]);3163tokeniser.consume(...["boolean", "byte", "octet"]);3164tokeniser.consume(...["identifier", "ByteString", "DOMString", "USVString"]);3165tokeniser.consume(...["?"]);3166tokeniser.consume(...["identifier"]);3167tokeniser.consume(...["="]);3168tokeniser.consume(...[";"]);3169tokeniser.consume(...["}"]);3170tokeniser.consume(...[";"]);3171tokeniser.consume(...["["]);3172tokeniser.consume(...["callback"]);3173tokeniser.consume(...["interface"]);3174tokeniser.consume(...["partial"]);3175tokeniser.consume(...["dictionary"]);3176tokeniser.consume(...["enum"]);3177tokeniser.consume(...["typedef"]);3178tokeniser.consume(...["identifier"]);3179tokeniser.consume(...["namespace"]);...
aflprep_webidl2.js
Source:aflprep_webidl2.js
1(function webpackUniversalModuleDefinition(root, factory) {2 if(typeof exports === 'object' && typeof module === 'object')3 module.exports = factory();4 else if(typeof define === 'function' && define.amd)5 define([], factory);6 else if(typeof exports === 'object')7 exports["WebIDL2"] = factory();8 else9 root["WebIDL2"] = factory();10})(globalThis, function() {11__webpack_require__.r(__webpack_exports__);12 * @param {Tokeniser} tokeniser13 * @param {object} options14 * @param {boolean} [options.concrete]15function parseByTokens(tokeniser, options) {16 const source = tokeniser.source;17 function error(str) {18 tokeniser.error(str);19 }20 function consume(...candidates) {21 return tokeniser.consume(...candidates);22 }23 function callback() {24 const callback = consume("callback");25 if (!callback) return;26 if (tokeniser.probe("interface")) {27 return _productions_callback_interface_js__WEBPACK_IMPORTED_MODULE_10__.CallbackInterface.parse(tokeniser, callback);28 }29 return _productions_callback_js__WEBPACK_IMPORTED_MODULE_5__.CallbackFunction.parse(tokeniser, callback);30 }31 function interface_(opts) {32 const base = consume("interface");33 if (!base) return;34 const ret =35 _productions_mixin_js__WEBPACK_IMPORTED_MODULE_7__.Mixin.parse(tokeniser, base, opts) ||36 _productions_interface_js__WEBPACK_IMPORTED_MODULE_6__.Interface.parse(tokeniser, base, opts) ||37 error("Interface has no proper body");38 return ret;39 }40 function partial() {41 const partial = consume("partial");42 if (!partial) return;43 return (44 _productions_dictionary_js__WEBPACK_IMPORTED_MODULE_8__.Dictionary.parse(tokeniser, { partial }) ||45 interface_({ partial }) ||46 _productions_namespace_js__WEBPACK_IMPORTED_MODULE_9__.Namespace.parse(tokeniser, { partial }) ||47 error("Partial doesn't apply to anything")48 );49 }50 function definition() {51 return (52 callback() ||53 interface_() ||54 partial() ||55 _productions_dictionary_js__WEBPACK_IMPORTED_MODULE_8__.Dictionary.parse(tokeniser) ||56 _productions_enum_js__WEBPACK_IMPORTED_MODULE_1__.Enum.parse(tokeniser) ||57 _productions_typedef_js__WEBPACK_IMPORTED_MODULE_4__.Typedef.parse(tokeniser) ||58 _productions_includes_js__WEBPACK_IMPORTED_MODULE_2__.Includes.parse(tokeniser) ||59 _productions_namespace_js__WEBPACK_IMPORTED_MODULE_9__.Namespace.parse(tokeniser)60 );61 }62 function definitions() {63 if (!source.length) return [];64 const defs = [];65 while (true) {66 const ea = _productions_extended_attributes_js__WEBPACK_IMPORTED_MODULE_3__.ExtendedAttributes.parse(tokeniser);67 const def = definition();68 if (!def) {69 if (ea.length) error("Stray extended attributes");70 break;71 }72 (0,_productions_helpers_js__WEBPACK_IMPORTED_MODULE_11__.autoParenter)(def).extAttrs = ea;73 defs.push(def);74 }75 const eof = tokeniser.consumeType("eof");76 if (options.concrete) {77 defs.push(eof);78 }79 return defs;80 }81 const res = definitions();82 if (tokeniser.position < source.length) error("Unrecognised tokens");83 return res;84}85 * @param {string} str86 * @param {object} [options]87 * @param {*} [options.sourceName]88 * @param {boolean} [options.concrete]89function parse(str, options = {}) {90 const tokeniser = new _tokeniser_js__WEBPACK_IMPORTED_MODULE_0__.Tokeniser(str);91 if (typeof options.sourceName !== "undefined") {92 tokeniser.source.name = options.sourceName;93 }94 return parseByTokens(tokeniser, options);95}96__webpack_require__.r(__webpack_exports__);97const tokenRe = {98 decimal:99};100const typeNameKeywords = [101 "ArrayBuffer",102 "DataView",103 "Int8Array",104 "Int16Array",105 "Int32Array",106 "Uint8Array",107 "Uint16Array",108 "Uint32Array",109 "Uint8ClampedArray",110 "Float32Array",111 "Float64Array",112 "any",113 "object",114 "symbol",115];116const stringTypes = ["ByteString", "DOMString", "USVString"];117const argumentNameKeywords = [118 "async",119 "attribute",120 "callback",121 "const",122 "constructor",123 "deleter",124 "dictionary",125 "enum",126 "getter",127 "includes",128 "inherit",129 "interface",130 "iterable",131 "maplike",132 "namespace",133 "partial",134 "required",135 "setlike",136 "setter",137 "static",138 "stringifier",139 "typedef",140 "unrestricted",141];142const nonRegexTerminals = [143 "-Infinity",144 "FrozenArray",145 "Infinity",146 "NaN",147 "ObservableArray",148 "Promise",149 "bigint",150 "boolean",151 "byte",152 "double",153 "false",154 "float",155 "long",156 "mixin",157 "null",158 "octet",159 "optional",160 "or",161 "readonly",162 "record",163 "sequence",164 "short",165 "true",166 "undefined",167 "unsigned",168 "void",169].concat(argumentNameKeywords, stringTypes, typeNameKeywords);170const punctuations = [171 "(",172 ")",173 ",",174 "...",175 ":",176 ";",177 "<",178 "=",179 ">",180 "?",181 "[",182 "]",183 "{",184 "}",185];186const reserved = [187 "_constructor",188 "toString",189 "_toString",190];191 * @typedef {ArrayItemType<ReturnType<typeof tokenise>>} Token192 * @param {string} str193function tokenise(str) {194 const tokens = [];195 let lastCharIndex = 0;196 let trivia = "";197 let line = 1;198 let index = 0;199 while (lastCharIndex < str.length) {200 const nextChar = str.charAt(lastCharIndex);201 let result = -1;202 result = attemptTokenMatch("whitespace", { noFlushTrivia: true });203 result = attemptTokenMatch("comment", { noFlushTrivia: true });204 }205 if (result !== -1) {206 const currentTrivia = tokens.pop().value;207 trivia += currentTrivia;208 index -= 1;209 result = attemptTokenMatch("decimal");210 if (result === -1) {211 result = attemptTokenMatch("integer");212 }213 if (result === -1) {214 result = attemptTokenMatch("identifier");215 const lastIndex = tokens.length - 1;216 const token = tokens[lastIndex];217 if (result !== -1) {218 if (reserved.includes(token.value)) {219 const message = `${(0,_productions_helpers_js__WEBPACK_IMPORTED_MODULE_1__.unescape)(220 token.value221 )} is a reserved identifier and must not be used.`;222 throw new WebIDLParseError(223 (0,_error_js__WEBPACK_IMPORTED_MODULE_0__.syntaxError)(tokens, lastIndex, null, message)224 );225 } else if (nonRegexTerminals.includes(token.value)) {226 token.type = "inline";227 }228 }229 }230 } else if (nextChar === '"') {231 result = attemptTokenMatch("string");232 }233 for (const punctuation of punctuations) {234 if (str.startsWith(punctuation, lastCharIndex)) {235 tokens.push({236 type: "inline",237 value: punctuation,238 trivia,239 line,240 index,241 });242 trivia = "";243 lastCharIndex += punctuation.length;244 result = lastCharIndex;245 break;246 }247 }248 if (result === -1) {249 result = attemptTokenMatch("other");250 }251 if (result === -1) {252 throw new Error("Token stream not progressing");253 }254 lastCharIndex = result;255 index += 1;256 }257 tokens.push({258 type: "eof",259 value: "",260 trivia,261 });262 return tokens;263 * @param {keyof typeof tokenRe} type264 * @param {object} options265 * @param {boolean} [options.noFlushTrivia]266 function attemptTokenMatch(type, { noFlushTrivia } = {}) {267 const re = tokenRe[type];268 re.lastIndex = lastCharIndex;269 const result = re.exec(str);270 if (result) {271 tokens.push({ type, value: result[0], trivia, line, index });272 if (!noFlushTrivia) {273 trivia = "";274 }275 return re.lastIndex;276 }277 return -1;278 }279}280class Tokeniser {281 * @param {string} idl282 constructor(idl) {283 this.source = tokenise(idl);284 this.position = 0;285 }286 * @param {string} message287 * @return {never}288 error(message) {289 throw new WebIDLParseError(290 (0,_error_js__WEBPACK_IMPORTED_MODULE_0__.syntaxError)(this.source, this.position, this.current, message)291 );292 }293 * @param {string} type294 probeType(type) {295 return (296 this.source.length > this.position &&297 this.source[this.position].type === type298 );299 }300 * @param {string} value301 probe(value) {302 return (303 this.probeType("inline") && this.source[this.position].value === value304 );305 }306 * @param {...string} candidates307 consumeType(...candidates) {308 for (const type of candidates) {309 if (!this.probeType(type)) continue;310 const token = this.source[this.position];311 this.position++;312 return token;313 }314 }315 * @param {...string} candidates316 consume(...candidates) {317 if (!this.probeType("inline")) return;318 const token = this.source[this.position];319 for (const value of candidates) {320 if (token.value !== value) continue;321 this.position++;322 return token;323 }324 }325 * @param {number} position326 unconsume(position) {327 this.position = position;328 }329}330class WebIDLParseError extends Error {331 * @param {object} options332 * @param {string} options.message333 * @param {string} options.bareMessage334 * @param {string} options.context335 * @param {number} options.line336 * @param {*} options.sourceName337 * @param {string} options.input338 * @param {*[]} options.tokens339 constructor({340 message,341 bareMessage,342 context,343 line,344 sourceName,345 input,346 tokens,347 }) {348 super(message);349 this.bareMessage = bareMessage;350 this.context = context;351 this.line = line;352 this.sourceName = sourceName;353 this.input = input;354 this.tokens = tokens;355 }356}357__webpack_require__.r(__webpack_exports__);358 * @param {string} text359function lastLine(text) {360 const splitted = text.split("\n");361 return splitted[splitted.length - 1];362}363function appendIfExist(base, target) {364 let result = base;365 if (target) {366 result += ` ${target}`;367 }368 return result;369}370function contextAsText(node) {371 const hierarchy = [node];372 while (node && node.parent) {373 const { parent } = node;374 hierarchy.unshift(parent);375 node = parent;376 }377 return hierarchy.map((n) => appendIfExist(n.type, n.name)).join(" -> ");378}379 * @typedef {object} WebIDL2ErrorOptions380 * @property {"error" | "warning"} [level]381 * @property {Function} [autofix]382 *383 * @param {string} message error message384 * @param {"Syntax" | "Validation"} kind error type385 * @param {WebIDL2ErrorOptions} [options]386function error(387 source,388 position,389 current,390 message,391 kind,392 { level = "error", autofix, ruleName } = {}393) {394 * @param {number} count395 function sliceTokens(count) {396 return count > 0397 ? source.slice(position, position + count)398 : source.slice(Math.max(position + count, 0), position);399 }400 function tokensToText(inputs, { precedes } = {}) {401 const text = inputs.map((t) => t.trivia + t.value).join("");402 const nextToken = source[position];403 if (nextToken.type === "eof") {404 return text;405 }406 if (precedes) {407 return text + nextToken.trivia;408 }409 return text.slice(nextToken.trivia.length);410 }411 const line =412 source[position].type !== "eof"413 ? source[position].line414 : source.length > 1415 ? source[position - 1].line416 : 1;417 const precedingLastLine = lastLine(418 tokensToText(sliceTokens(-maxTokens), { precedes: true })419 );420 const subsequentTokens = sliceTokens(maxTokens);421 const subsequentText = tokensToText(subsequentTokens);422 const subsequentFirstLine = subsequentText.split("\n")[0];423 const spaced = " ".repeat(precedingLastLine.length) + "^";424 const sourceContext = precedingLastLine + subsequentFirstLine + "\n" + spaced;425 const contextType = kind === "Syntax" ? "since" : "inside";426 const inSourceName = source.name ? ` in ${source.name}` : "";427 const grammaticalContext =428 current && current.name429 ? `, ${contextType} \`${current.partial ? "partial " : ""}${contextAsText(430 current431 )}\``432 : "";433 const context = `${kind} error at line ${line}${inSourceName}${grammaticalContext}:\n${sourceContext}`;434 return {435 message: `${context} ${message}`,436 bareMessage: message,437 context,438 line,439 sourceName: source.name,440 level,441 ruleName,442 autofix,443 input: subsequentText,444 tokens: subsequentTokens,445 };446}447 * @param {string} message error message448function syntaxError(source, position, current, message) {449 return error(source, position, current, message, "Syntax");450}451 * @param {string} message error message452 * @param {WebIDL2ErrorOptions} [options]453function validationError(454 token,455 current,456 ruleName,457 message,458 options = {}459) {460 options.ruleName = ruleName;461 return error(462 current.source,463 token.index,464 current,465 message,466 "Validation",467 options468 );469}470__webpack_require__.r(__webpack_exports__);471 * @param {string} identifier472function unescape(identifier) {473 return identifier.startsWith("_") ? identifier.slice(1) : identifier;474}475 * Parses comma-separated list476 * @param {object} args477 * @param {Function} args.parser parser function for each item478 * @param {boolean} [args.allowDangler] whether to allow dangling comma479 * @param {string} [args.listName] the name to be shown on error messages480function list(tokeniser, { parser, allowDangler, listName = "list" }) {481 const first = parser(tokeniser);482 if (!first) {483 return [];484 }485 first.tokens.separator = tokeniser.consume(",");486 const items = [first];487 while (first.tokens.separator) {488 const item = parser(tokeniser);489 if (!item) {490 if (!allowDangler) {491 tokeniser.error(`Trailing comma in ${listName}`);492 }493 break;494 }495 item.tokens.separator = tokeniser.consume(",");496 items.push(item);497 if (!item.tokens.separator) break;498 }499 return items;500}501function const_value(tokeniser) {502 return (503 tokeniser.consumeType("decimal", "integer") ||504 tokeniser.consume("true", "false", "Infinity", "-Infinity", "NaN")505 );506}507 * @param {object} token508 * @param {string} token.type509 * @param {string} token.value510function const_data({ type, value }) {511 switch (type) {512 case "decimal":513 case "integer":514 return { type: "number", value };515 case "string":516 return { type: "string", value: value.slice(1, -1) };517 }518 switch (value) {519 case "true":520 case "false":521 return { type: "boolean", value: value === "true" };522 case "Infinity":523 case "-Infinity":524 return { type: "Infinity", negative: value.startsWith("-") };525 case "[":526 return { type: "sequence", value: [] };527 case "{":528 return { type: "dictionary" };529 default:530 return { type: value };531 }532}533function primitive_type(tokeniser) {534 function integer_type() {535 const prefix = tokeniser.consume("unsigned");536 const base = tokeniser.consume("short", "long");537 if (base) {538 const postfix = tokeniser.consume("long");539 return new _type_js__WEBPACK_IMPORTED_MODULE_0__.Type({ source, tokens: { prefix, base, postfix } });540 }541 if (prefix) tokeniser.error("Failed to parse integer type");542 }543 function decimal_type() {544 const prefix = tokeniser.consume("unrestricted");545 const base = tokeniser.consume("float", "double");546 if (base) {547 return new _type_js__WEBPACK_IMPORTED_MODULE_0__.Type({ source, tokens: { prefix, base } });548 }549 if (prefix) tokeniser.error("Failed to parse float type");550 }551 const { source } = tokeniser;552 const num_type = integer_type(tokeniser) || decimal_type(tokeniser);553 if (num_type) return num_type;554 const base = tokeniser.consume(555 "bigint",556 "boolean",557 "byte",558 "octet",559 "undefined"560 );561 if (base) {562 return new _type_js__WEBPACK_IMPORTED_MODULE_0__.Type({ source, tokens: { base } });563 }564}565function argument_list(tokeniser) {566 return list(tokeniser, {567 parser: _argument_js__WEBPACK_IMPORTED_MODULE_1__.Argument.parse,568 listName: "arguments list",569 });570}571 * @param {string} typeName572function type_with_extended_attributes(tokeniser, typeName) {573 const extAttrs = _extended_attributes_js__WEBPACK_IMPORTED_MODULE_2__.ExtendedAttributes.parse(tokeniser);574 const ret = _type_js__WEBPACK_IMPORTED_MODULE_0__.Type.parse(tokeniser, typeName);575 if (ret) autoParenter(ret).extAttrs = extAttrs;576 return ret;577}578 * @param {string} typeName579function return_type(tokeniser, typeName) {580 const typ = _type_js__WEBPACK_IMPORTED_MODULE_0__.Type.parse(tokeniser, typeName || "return-type");581 if (typ) {582 return typ;583 }584 const voidToken = tokeniser.consume("void");585 if (voidToken) {586 const ret = new _type_js__WEBPACK_IMPORTED_MODULE_0__.Type({587 source: tokeniser.source,588 tokens: { base: voidToken },589 });590 ret.type = "return-type";591 return ret;592 }593}594function stringifier(tokeniser) {595 const special = tokeniser.consume("stringifier");596 if (!special) return;597 const member =598 _attribute_js__WEBPACK_IMPORTED_MODULE_4__.Attribute.parse(tokeniser, { special }) ||599 _operation_js__WEBPACK_IMPORTED_MODULE_3__.Operation.parse(tokeniser, { special }) ||600 tokeniser.error("Unterminated stringifier");601 return member;602}603 * @param {string} str604function getLastIndentation(str) {605 const lines = str.split("\n");606 if (lines.length) {607 if (match) {608 return match[0];609 }610 }611 return "";612}613 * @param {string} parentTrivia614function getMemberIndentation(parentTrivia) {615 const indentation = getLastIndentation(parentTrivia);616 const indentCh = indentation.includes("\t") ? "\t" : " ";617 return indentation + indentCh;618}619 * @param {object} def620function autofixAddExposedWindow(def) {621 return () => {622 if (def.extAttrs.length) {623 const tokeniser = new _tokeniser_js__WEBPACK_IMPORTED_MODULE_5__.Tokeniser("Exposed=Window,");624 const exposed = _extended_attributes_js__WEBPACK_IMPORTED_MODULE_2__.SimpleExtendedAttribute.parse(tokeniser);625 exposed.tokens.separator = tokeniser.consume(",");626 const existing = def.extAttrs[0];627 existing.tokens.name.trivia = ` ${existing.tokens.name.trivia}`;628 }629 def.extAttrs.unshift(exposed);630 } else {631 autoParenter(def).extAttrs = _extended_attributes_js__WEBPACK_IMPORTED_MODULE_2__.ExtendedAttributes.parse(632 new _tokeniser_js__WEBPACK_IMPORTED_MODULE_5__.Tokeniser("[Exposed=Window]")633 );634 const trivia = def.tokens.base.trivia;635 def.extAttrs.tokens.open.trivia = trivia;636 def.tokens.base.trivia = `\n${getLastIndentation(trivia)}`;637 }638 };639}640 * Get the first syntax token for the given IDL object.641 * @param {*} data642function getFirstToken(data) {643 if (data.extAttrs.length) {644 return data.extAttrs.tokens.open;645 }646 if (data.type === "operation" && !data.special) {647 return getFirstToken(data.idlType);648 }649 const tokens = Object.values(data.tokens).sort((x, y) => x.index - y.index);650 return tokens[0];651}652 * @template T653 * @param {T[]} array654 * @param {(item: T) => boolean} predicate655function findLastIndex(array, predicate) {656 const index = array.slice().reverse().findIndex(predicate);657 if (index === -1) {658 return index;659 }660 return array.length - index - 1;661}662 * Returns a proxy that auto-assign `parent` field.663 * @template T664 * @param {T} data665 * @param {*} [parent] The object that will be assigned to `parent`.666 * If absent, it will be `data` by default.667 * @return {T}668function autoParenter(data, parent) {669 if (!parent) {670 parent = data;671 }672 if (!data) {673 return data;674 }675 return new Proxy(data, {676 get(target, p) {677 const value = target[p];678 if (Array.isArray(value)) {679 return autoParenter(value, target);680 }681 return value;682 },683 set(target, p, value) {684 target[p] = value;685 if (!value) {686 return true;687 } else if (Array.isArray(value)) {688 for (const item of value) {689 if (typeof item.parent !== "undefined") {690 item.parent = parent;691 }692 }693 } else if (typeof value.parent !== "undefined") {694 value.parent = parent;695 }696 return true;697 },698 });699}700__webpack_require__.r(__webpack_exports__);701 * @param {string} typeName702function generic_type(tokeniser, typeName) {703 const base = tokeniser.consume(704 "FrozenArray",705 "ObservableArray",706 "Promise",707 "sequence",708 "record"709 );710 if (!base) {711 return;712 }713 const ret = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.autoParenter)(714 new Type({ source: tokeniser.source, tokens: { base } })715 );716 ret.tokens.open =717 tokeniser.consume("<") ||718 tokeniser.error(`No opening bracket after ${base.value}`);719 switch (base.value) {720 case "Promise": {721 if (tokeniser.probe("["))722 tokeniser.error("Promise type cannot have extended attribute");723 const subtype =724 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.return_type)(tokeniser, typeName) ||725 tokeniser.error("Missing Promise subtype");726 ret.subtype.push(subtype);727 break;728 }729 case "sequence":730 case "FrozenArray":731 case "ObservableArray": {732 const subtype =733 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.type_with_extended_attributes)(tokeniser, typeName) ||734 tokeniser.error(`Missing ${base.value} subtype`);735 ret.subtype.push(subtype);736 break;737 }738 case "record": {739 if (tokeniser.probe("["))740 tokeniser.error("Record key cannot have extended attribute");741 const keyType =742 tokeniser.consume(..._tokeniser_js__WEBPACK_IMPORTED_MODULE_2__.stringTypes) ||743 tokeniser.error(`Record key must be one of: ${_tokeniser_js__WEBPACK_IMPORTED_MODULE_2__.stringTypes.join(", ")}`);744 const keyIdlType = new Type({745 source: tokeniser.source,746 tokens: { base: keyType },747 });748 keyIdlType.tokens.separator =749 tokeniser.consume(",") ||750 tokeniser.error("Missing comma after record key type");751 keyIdlType.type = typeName;752 const valueType =753 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.type_with_extended_attributes)(tokeniser, typeName) ||754 tokeniser.error("Error parsing generic type record");755 ret.subtype.push(keyIdlType, valueType);756 break;757 }758 }759 if (!ret.idlType) tokeniser.error(`Error parsing generic type ${base.value}`);760 ret.tokens.close =761 tokeniser.consume(">") ||762 tokeniser.error(`Missing closing bracket after ${base.value}`);763 return ret.this;764}765function type_suffix(tokeniser, obj) {766 const nullable = tokeniser.consume("?");767 if (nullable) {768 obj.tokens.nullable = nullable;769 }770 if (tokeniser.probe("?")) tokeniser.error("Can't nullable more than once");771}772 * @param {string} typeName773function single_type(tokeniser, typeName) {774 let ret = generic_type(tokeniser, typeName) || (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.primitive_type)(tokeniser);775 if (!ret) {776 const base =777 tokeniser.consumeType("identifier") ||778 tokeniser.consume(..._tokeniser_js__WEBPACK_IMPORTED_MODULE_2__.stringTypes, ..._tokeniser_js__WEBPACK_IMPORTED_MODULE_2__.typeNameKeywords);779 if (!base) {780 return;781 }782 ret = new Type({ source: tokeniser.source, tokens: { base } });783 if (tokeniser.probe("<"))784 tokeniser.error(`Unsupported generic type ${base.value}`);785 }786 if (ret.generic === "Promise" && tokeniser.probe("?")) {787 tokeniser.error("Promise type cannot be nullable");788 }789 ret.type = typeName || null;790 type_suffix(tokeniser, ret);791 if (ret.nullable && ret.idlType === "any")792 tokeniser.error("Type `any` cannot be made nullable");793 return ret;794}795 * @param {string} type796function union_type(tokeniser, type) {797 const tokens = {};798 tokens.open = tokeniser.consume("(");799 if (!tokens.open) return;800 const ret = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.autoParenter)(new Type({ source: tokeniser.source, tokens }));801 ret.type = type || null;802 while (true) {803 const typ =804 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.type_with_extended_attributes)(tokeniser) ||805 tokeniser.error("No type after open parenthesis or 'or' in union type");806 if (typ.idlType === "any")807 tokeniser.error("Type `any` cannot be included in a union type");808 if (typ.generic === "Promise")809 tokeniser.error("Type `Promise` cannot be included in a union type");810 ret.subtype.push(typ);811 const or = tokeniser.consume("or");812 if (or) {813 typ.tokens.separator = or;814 } else break;815 }816 if (ret.idlType.length < 2) {817 tokeniser.error(818 "At least two types are expected in a union type but found less"819 );820 }821 tokens.close =822 tokeniser.consume(")") || tokeniser.error("Unterminated union type");823 type_suffix(tokeniser, ret);824 return ret.this;825}826class Type extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {827 * @param {string} typeName828 static parse(tokeniser, typeName) {829 return single_type(tokeniser, typeName) || union_type(tokeniser, typeName);830 }831 constructor({ source, tokens }) {832 super({ source, tokens });833 Object.defineProperty(this, "subtype", { value: [], writable: true });834 this.extAttrs = new _extended_attributes_js__WEBPACK_IMPORTED_MODULE_5__.ExtendedAttributes({});835 }836 get generic() {837 if (this.subtype.length && this.tokens.base) {838 return this.tokens.base.value;839 }840 return "";841 }842 get nullable() {843 return Boolean(this.tokens.nullable);844 }845 get union() {846 return Boolean(this.subtype.length) && !this.tokens.base;847 }848 get idlType() {849 if (this.subtype.length) {850 return this.subtype;851 }852 const name = [this.tokens.prefix, this.tokens.base, this.tokens.postfix]853 .filter((t) => t)854 .map((t) => t.value)855 .join(" ");856 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.unescape)(name);857 }858 *validate(defs) {859 yield* this.extAttrs.validate(defs);860 if (this.idlType === "void") {861 const message = `\`void\` is now replaced by \`undefined\`. Refer to the \862for more information.`;863 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_3__.validationError)(this.tokens.base, this, "replace-void", message, {864 autofix: replaceVoid(this),865 });866 }867 * If a union is nullable, its subunions cannot include a dictionary868 * If not, subunions may include dictionaries if each union is not nullable869 const typedef = !this.union && defs.unique.get(this.idlType);870 const target = this.union871 ? this872 : typedef && typedef.type === "typedef"873 ? typedef.idlType874 : undefined;875 if (target && this.nullable) {876 const { reference } = (0,_validators_helpers_js__WEBPACK_IMPORTED_MODULE_4__.idlTypeIncludesDictionary)(target, defs) || {};877 if (reference) {878 const targetToken = (this.union ? reference : this).tokens.base;879 const message = "Nullable union cannot include a dictionary type.";880 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_3__.validationError)(881 targetToken,882 this,883 "no-nullable-union-dict",884 message885 );886 }887 } else {888 for (const subtype of this.subtype) {889 yield* subtype.validate(defs);890 }891 }892 }893 write(w) {894 const type_body = () => {895 if (this.union || this.generic) {896 return w.ts.wrap([897 w.token(this.tokens.base, w.ts.generic),898 w.token(this.tokens.open),899 ...this.subtype.map((t) => t.write(w)),900 w.token(this.tokens.close),901 ]);902 }903 const firstToken = this.tokens.prefix || this.tokens.base;904 const prefix = this.tokens.prefix905 ? [this.tokens.prefix.value, w.ts.trivia(this.tokens.base.trivia)]906 : [];907 const ref = w.reference(908 w.ts.wrap([909 ...prefix,910 this.tokens.base.value,911 w.token(this.tokens.postfix),912 ]),913 { unescaped: this.idlType, context: this }914 );915 return w.ts.wrap([w.ts.trivia(firstToken.trivia), ref]);916 };917 return w.ts.wrap([918 this.extAttrs.write(w),919 type_body(),920 w.token(this.tokens.nullable),921 w.token(this.tokens.separator),922 ]);923 }924}925 * @param {Type} type926function replaceVoid(type) {927 return () => {928 type.tokens.base.value = "undefined";929 };930}931__webpack_require__.r(__webpack_exports__);932class Base {933 * @param {object} initializer934 * @param {Base["source"]} initializer.source935 * @param {Base["tokens"]} initializer.tokens936 constructor({ source, tokens }) {937 Object.defineProperties(this, {938 source: { value: source },939 tokens: { value: tokens, writable: true },940 parent: { value: null, writable: true },941 });942 }943 toJSON() {944 const json = { type: undefined, name: undefined, inheritance: undefined };945 let proto = this;946 while (proto !== Object.prototype) {947 const descMap = Object.getOwnPropertyDescriptors(proto);948 for (const [key, value] of Object.entries(descMap)) {949 if (value.enumerable || value.get) {950 json[key] = this[key];951 }952 }953 proto = Object.getPrototypeOf(proto);954 }955 return json;956 }957}958__webpack_require__.r(__webpack_exports__);959 *960 * @param {*} idlType961 * @param {object} [options]962 * @param {boolean} [options.useNullableInner] use when the input idlType is nullable and you want to use its inner type963 * @return {{ reference: *, dictionary: Dictionary }} the type reference that ultimately includes dictionary.964function idlTypeIncludesDictionary(965 idlType,966 defs,967 { useNullableInner } = {}968) {969 if (!idlType.union) {970 const def = defs.unique.get(idlType.idlType);971 if (!def) {972 return;973 }974 if (def.type === "typedef") {975 const { typedefIncludesDictionary } = defs.cache;976 if (typedefIncludesDictionary.has(def)) {977 return typedefIncludesDictionary.get(def);978 }979 const result = idlTypeIncludesDictionary(def.idlType, defs);980 defs.cache.typedefIncludesDictionary.set(def, result);981 if (result) {982 return {983 reference: idlType,984 dictionary: result.dictionary,985 };986 }987 }988 if (def.type === "dictionary" && (useNullableInner || !idlType.nullable)) {989 return {990 reference: idlType,991 dictionary: def,992 };993 }994 }995 for (const subtype of idlType.subtype) {996 const result = idlTypeIncludesDictionary(subtype, defs);997 if (result) {998 if (subtype.union) {999 return result;1000 }1001 return {1002 reference: subtype,1003 dictionary: result.dictionary,1004 };1005 }1006 }1007}1008 * @param {*} dict dictionary type1009 * @return {boolean}1010function dictionaryIncludesRequiredField(dict, defs) {1011 if (defs.cache.dictionaryIncludesRequiredField.has(dict)) {1012 return defs.cache.dictionaryIncludesRequiredField.get(dict);1013 }1014 defs.cache.dictionaryIncludesRequiredField.set(dict, undefined);1015 let result = dict.members.some((field) => field.required);1016 if (!result && dict.inheritance) {1017 const superdict = defs.unique.get(dict.inheritance);1018 if (!superdict) {1019 result = true;1020 } else if (dictionaryIncludesRequiredField(superdict, defs)) {1021 result = true;1022 }1023 }1024 defs.cache.dictionaryIncludesRequiredField.set(dict, result);1025 return result;1026}1027__webpack_require__.r(__webpack_exports__);1028 * @param {string} tokenName1029function tokens(tokeniser, tokenName) {1030 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.list)(tokeniser, {1031 parser: _token_js__WEBPACK_IMPORTED_MODULE_2__.WrappedToken.parser(tokeniser, tokenName),1032 listName: tokenName + " list",1033 });1034}1035const extAttrValueSyntax = ["identifier", "decimal", "integer", "string"];1036const shouldBeLegacyPrefixed = [1037 "NoInterfaceObject",1038 "LenientSetter",1039 "LenientThis",1040 "TreatNonObjectAsNull",1041 "Unforgeable",1042];1043const renamedLegacies = new Map([1044 ...shouldBeLegacyPrefixed.map((name) => [name, `Legacy${name}`]),1045 ["NamedConstructor", "LegacyFactoryFunction"],1046 ["OverrideBuiltins", "LegacyOverrideBuiltIns"],1047 ["TreatNullAs", "LegacyNullToEmptyString"],1048]);1049 * This will allow a set of extended attribute values to be parsed.1050function extAttrListItems(tokeniser) {1051 for (const syntax of extAttrValueSyntax) {1052 const toks = tokens(tokeniser, syntax);1053 if (toks.length) {1054 return toks;1055 }1056 }1057 tokeniser.error(1058 `Expected identifiers, strings, decimals, or integers but none found`1059 );1060}1061class ExtendedAttributeParameters extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {1062 static parse(tokeniser) {1063 const tokens = { assign: tokeniser.consume("=") };1064 const ret = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.autoParenter)(1065 new ExtendedAttributeParameters({ source: tokeniser.source, tokens })1066 );1067 if (tokens.assign) {1068 tokens.secondaryName = tokeniser.consumeType(...extAttrValueSyntax);1069 }1070 tokens.open = tokeniser.consume("(");1071 if (tokens.open) {1072 ret.list = ret.rhsIsList1073 extAttrListItems(tokeniser)1074 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.argument_list)(tokeniser);1075 tokens.close =1076 tokeniser.consume(")") ||1077 tokeniser.error("Unexpected token in extended attribute argument list");1078 } else if (ret.hasRhs && !tokens.secondaryName) {1079 tokeniser.error("No right hand side to extended attribute assignment");1080 }1081 return ret.this;1082 }1083 get rhsIsList() {1084 return this.tokens.assign && !this.tokens.secondaryName;1085 }1086 get rhsType() {1087 if (this.rhsIsList) {1088 return this.list[0].tokens.value.type + "-list";1089 }1090 if (this.tokens.secondaryName) {1091 return this.tokens.secondaryName.type;1092 }1093 return null;1094 }1095 write(w) {1096 function extended_attribute_listitem(item) {1097 return w.ts.wrap([1098 w.token(item.tokens.value),1099 w.token(item.tokens.separator),1100 ]);1101 }1102 const { rhsType } = this;1103 return w.ts.wrap([1104 w.token(this.tokens.assign),1105 w.reference_token(this.tokens.secondaryName, this.parent),1106 w.token(this.tokens.open),1107 ...(!this.list1108 ? []1109 : this.list.map((p) => {1110 return rhsType === "identifier-list"1111 ? w.identifier(p, this.parent)1112 : rhsType && rhsType.endsWith("-list")1113 ? extended_attribute_listitem(p)1114 : p.write(w);1115 })),1116 w.token(this.tokens.close),1117 ]);1118 }1119}1120class SimpleExtendedAttribute extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {1121 static parse(tokeniser) {1122 const name = tokeniser.consumeType("identifier");1123 if (name) {1124 return new SimpleExtendedAttribute({1125 source: tokeniser.source,1126 tokens: { name },1127 params: ExtendedAttributeParameters.parse(tokeniser),1128 });1129 }1130 }1131 constructor({ source, tokens, params }) {1132 super({ source, tokens });1133 params.parent = this;1134 Object.defineProperty(this, "params", { value: params });1135 }1136 get type() {1137 return "extended-attribute";1138 }1139 get name() {1140 return this.tokens.name.value;1141 }1142 get rhs() {1143 const { rhsType: type, tokens, list } = this.params;1144 if (!type) {1145 return null;1146 }1147 const value = this.params.rhsIsList1148 ? list1149 : (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.unescape)(tokens.secondaryName.value);1150 return { type, value };1151 }1152 get arguments() {1153 const { rhsIsList, list } = this.params;1154 if (!list || rhsIsList) {1155 return [];1156 }1157 return list;1158 }1159 *validate(defs) {1160 const { name } = this;1161 if (name === "LegacyNoInterfaceObject") {1162 const message = `\`[LegacyNoInterfaceObject]\` extended attribute is an \1163undesirable feature that may be removed from Web IDL in the future. Refer to the \1164information.`;1165 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_4__.validationError)(1166 this.tokens.name,1167 this,1168 "no-nointerfaceobject",1169 message,1170 { level: "warning" }1171 );1172 } else if (renamedLegacies.has(name)) {1173 const message = `\`[${name}]\` extended attribute is a legacy feature \1174that is now renamed to \`[${renamedLegacies.get(name)}]\`. Refer to the \1175information.`;1176 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_4__.validationError)(this.tokens.name, this, "renamed-legacy", message, {1177 level: "warning",1178 autofix: renameLegacyExtendedAttribute(this),1179 });1180 }1181 for (const arg of this.arguments) {1182 yield* arg.validate(defs);1183 }1184 }1185 write(w) {1186 return w.ts.wrap([1187 w.ts.trivia(this.tokens.name.trivia),1188 w.ts.extendedAttribute(1189 w.ts.wrap([1190 w.ts.extendedAttributeReference(this.name),1191 this.params.write(w),1192 ])1193 ),1194 w.token(this.tokens.separator),1195 ]);1196 }1197}1198 * @param {SimpleExtendedAttribute} extAttr1199function renameLegacyExtendedAttribute(extAttr) {1200 return () => {1201 const { name } = extAttr;1202 extAttr.tokens.name.value = renamedLegacies.get(name);1203 if (name === "TreatNullAs") {1204 extAttr.params.tokens = {};1205 }1206 };1207}1208class ExtendedAttributes extends _array_base_js__WEBPACK_IMPORTED_MODULE_1__.ArrayBase {1209 static parse(tokeniser) {1210 const tokens = {};1211 tokens.open = tokeniser.consume("[");1212 if (!tokens.open) return new ExtendedAttributes({});1213 const ret = new ExtendedAttributes({ source: tokeniser.source, tokens });1214 ret.push(1215 ...(0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.list)(tokeniser, {1216 parser: SimpleExtendedAttribute.parse,1217 listName: "extended attribute",1218 })1219 );1220 tokens.close =1221 tokeniser.consume("]") ||1222 tokeniser.error("Unexpected closing token of extended attribute");1223 if (!ret.length) {1224 tokeniser.error("Found an empty extended attribute");1225 }1226 if (tokeniser.probe("[")) {1227 tokeniser.error(1228 "Illegal double extended attribute lists, consider merging them"1229 );1230 }1231 return ret;1232 }1233 *validate(defs) {1234 for (const extAttr of this) {1235 yield* extAttr.validate(defs);1236 }1237 }1238 write(w) {1239 if (!this.length) return "";1240 return w.ts.wrap([1241 w.token(this.tokens.open),1242 ...this.map((ea) => ea.write(w)),1243 w.token(this.tokens.close),1244 ]);1245 }1246}1247__webpack_require__.r(__webpack_exports__);1248class ArrayBase extends Array {1249 constructor({ source, tokens }) {1250 super();1251 Object.defineProperties(this, {1252 source: { value: source },1253 tokens: { value: tokens },1254 parent: { value: null, writable: true },1255 });1256 }1257}1258__webpack_require__.r(__webpack_exports__);1259class WrappedToken extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {1260 * @param {string} type1261 static parser(tokeniser, type) {1262 return () => {1263 const value = tokeniser.consumeType(type);1264 if (value) {1265 return new WrappedToken({1266 source: tokeniser.source,1267 tokens: { value },1268 });1269 }1270 };1271 }1272 get value() {1273 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.unescape)(this.tokens.value.value);1274 }1275}1276__webpack_require__.r(__webpack_exports__);1277class Argument extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {1278 static parse(tokeniser) {1279 const start_position = tokeniser.position;1280 const tokens = {};1281 const ret = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.autoParenter)(1282 new Argument({ source: tokeniser.source, tokens })1283 );1284 ret.extAttrs = _extended_attributes_js__WEBPACK_IMPORTED_MODULE_2__.ExtendedAttributes.parse(tokeniser);1285 tokens.optional = tokeniser.consume("optional");1286 ret.idlType = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.type_with_extended_attributes)(tokeniser, "argument-type");1287 if (!ret.idlType) {1288 return tokeniser.unconsume(start_position);1289 }1290 if (!tokens.optional) {1291 tokens.variadic = tokeniser.consume("...");1292 }1293 tokens.name =1294 tokeniser.consumeType("identifier") ||1295 tokeniser.consume(..._tokeniser_js__WEBPACK_IMPORTED_MODULE_4__.argumentNameKeywords);1296 if (!tokens.name) {1297 return tokeniser.unconsume(start_position);1298 }1299 ret.default = tokens.optional ? _default_js__WEBPACK_IMPORTED_MODULE_1__.Default.parse(tokeniser) : null;1300 return ret.this;1301 }1302 get type() {1303 return "argument";1304 }1305 get optional() {1306 return !!this.tokens.optional;1307 }1308 get variadic() {1309 return !!this.tokens.variadic;1310 }1311 get name() {1312 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.unescape)(this.tokens.name.value);1313 }1314 *validate(defs) {1315 yield* this.extAttrs.validate(defs);1316 yield* this.idlType.validate(defs);1317 const result = (0,_validators_helpers_js__WEBPACK_IMPORTED_MODULE_6__.idlTypeIncludesDictionary)(this.idlType, defs, {1318 useNullableInner: true,1319 });1320 if (result) {1321 if (this.idlType.nullable) {1322 const message = `Dictionary arguments cannot be nullable.`;1323 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_5__.validationError)(1324 this.tokens.name,1325 this,1326 "no-nullable-dict-arg",1327 message1328 );1329 } else if (!this.optional) {1330 if (1331 this.parent &&1332 !(0,_validators_helpers_js__WEBPACK_IMPORTED_MODULE_6__.dictionaryIncludesRequiredField)(result.dictionary, defs) &&1333 isLastRequiredArgument(this)1334 ) {1335 const message = `Dictionary argument must be optional if it has no required fields`;1336 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_5__.validationError)(1337 this.tokens.name,1338 this,1339 "dict-arg-optional",1340 message,1341 {1342 autofix: autofixDictionaryArgumentOptionality(this),1343 }1344 );1345 }1346 } else if (!this.default) {1347 const message = `Optional dictionary arguments must have a default value of \`{}\`.`;1348 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_5__.validationError)(1349 this.tokens.name,1350 this,1351 "dict-arg-default",1352 message,1353 {1354 autofix: autofixOptionalDictionaryDefaultValue(this),1355 }1356 );1357 }1358 }1359 }1360 write(w) {1361 return w.ts.wrap([1362 this.extAttrs.write(w),1363 w.token(this.tokens.optional),1364 w.ts.type(this.idlType.write(w)),1365 w.token(this.tokens.variadic),1366 w.name_token(this.tokens.name, { data: this }),1367 this.default ? this.default.write(w) : "",1368 w.token(this.tokens.separator),1369 ]);1370 }1371}1372 * @param {Argument} arg1373function isLastRequiredArgument(arg) {1374 const list = arg.parent.arguments || arg.parent.list;1375 const index = list.indexOf(arg);1376 const requiredExists = list.slice(index + 1).some((a) => !a.optional);1377 return !requiredExists;1378}1379 * @param {Argument} arg1380function autofixDictionaryArgumentOptionality(arg) {1381 return () => {1382 const firstToken = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.getFirstToken)(arg.idlType);1383 arg.tokens.optional = {1384 type: "optional",1385 value: "optional",1386 trivia: firstToken.trivia,1387 };1388 firstToken.trivia = " ";1389 autofixOptionalDictionaryDefaultValue(arg)();1390 };1391}1392 * @param {Argument} arg1393function autofixOptionalDictionaryDefaultValue(arg) {1394 return () => {1395 arg.default = _default_js__WEBPACK_IMPORTED_MODULE_1__.Default.parse(new _tokeniser_js__WEBPACK_IMPORTED_MODULE_4__.Tokeniser(" = {}"));1396 };1397}1398__webpack_require__.r(__webpack_exports__);1399class Default extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {1400 static parse(tokeniser) {1401 const assign = tokeniser.consume("=");1402 if (!assign) {1403 return null;1404 }1405 const def =1406 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.const_value)(tokeniser) ||1407 tokeniser.consumeType("string") ||1408 tokeniser.consume("null", "[", "{") ||1409 tokeniser.error("No value for default");1410 const expression = [def];1411 if (def.value === "[") {1412 const close =1413 tokeniser.consume("]") ||1414 tokeniser.error("Default sequence value must be empty");1415 expression.push(close);1416 } else if (def.value === "{") {1417 const close =1418 tokeniser.consume("}") ||1419 tokeniser.error("Default dictionary value must be empty");1420 expression.push(close);1421 }1422 return new Default({1423 source: tokeniser.source,1424 tokens: { assign },1425 expression,1426 });1427 }1428 constructor({ source, tokens, expression }) {1429 super({ source, tokens });1430 expression.parent = this;1431 Object.defineProperty(this, "expression", { value: expression });1432 }1433 get type() {1434 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.const_data)(this.expression[0]).type;1435 }1436 get value() {1437 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.const_data)(this.expression[0]).value;1438 }1439 get negative() {1440 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.const_data)(this.expression[0]).negative;1441 }1442 write(w) {1443 return w.ts.wrap([1444 w.token(this.tokens.assign),1445 ...this.expression.map((t) => w.token(t)),1446 ]);1447 }1448}1449__webpack_require__.r(__webpack_exports__);1450class Operation extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {1451 *1452 * @param {object} [options]1453 * @param {Token} [options.special]1454 * @param {Token} [options.regular]1455 static parse(tokeniser, { special, regular } = {}) {1456 const tokens = { special };1457 const ret = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.autoParenter)(1458 new Operation({ source: tokeniser.source, tokens })1459 );1460 if (special && special.value === "stringifier") {1461 tokens.termination = tokeniser.consume(";");1462 if (tokens.termination) {1463 ret.arguments = [];1464 return ret;1465 }1466 }1467 if (!special && !regular) {1468 tokens.special = tokeniser.consume("getter", "setter", "deleter");1469 }1470 ret.idlType =1471 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.return_type)(tokeniser) || tokeniser.error("Missing return type");1472 tokens.name =1473 tokeniser.consumeType("identifier") || tokeniser.consume("includes");1474 tokens.open =1475 tokeniser.consume("(") || tokeniser.error("Invalid operation");1476 ret.arguments = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.argument_list)(tokeniser);1477 tokens.close =1478 tokeniser.consume(")") || tokeniser.error("Unterminated operation");1479 tokens.termination =1480 tokeniser.consume(";") ||1481 tokeniser.error("Unterminated operation, expected `;`");1482 return ret.this;1483 }1484 get type() {1485 return "operation";1486 }1487 get name() {1488 const { name } = this.tokens;1489 if (!name) {1490 return "";1491 }1492 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.unescape)(name.value);1493 }1494 get special() {1495 if (!this.tokens.special) {1496 return "";1497 }1498 return this.tokens.special.value;1499 }1500 *validate(defs) {1501 yield* this.extAttrs.validate(defs);1502 if (!this.name && ["", "static"].includes(this.special)) {1503 const message = `Regular or static operations must have both a return type and an identifier.`;1504 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_2__.validationError)(this.tokens.open, this, "incomplete-op", message);1505 }1506 if (this.idlType) {1507 yield* this.idlType.validate(defs);1508 }1509 for (const argument of this.arguments) {1510 yield* argument.validate(defs);1511 }1512 }1513 write(w) {1514 const { parent } = this;1515 const body = this.idlType1516 ? [1517 w.ts.type(this.idlType.write(w)),1518 w.name_token(this.tokens.name, { data: this, parent }),1519 w.token(this.tokens.open),1520 w.ts.wrap(this.arguments.map((arg) => arg.write(w))),1521 w.token(this.tokens.close),1522 ]1523 : [];1524 return w.ts.definition(1525 w.ts.wrap([1526 this.extAttrs.write(w),1527 this.tokens.name1528 ? w.token(this.tokens.special)1529 : w.token(this.tokens.special, w.ts.nameless, { data: this, parent }),1530 ...body,1531 w.token(this.tokens.termination),1532 ]),1533 { data: this, parent }1534 );1535 }1536}1537__webpack_require__.r(__webpack_exports__);1538class Attribute extends _base_js__WEBPACK_IMPORTED_MODULE_2__.Base {1539 * @param {object} [options]1540 * @param {boolean} [options.noInherit]1541 * @param {boolean} [options.readonly]1542 static parse(1543 tokeniser,1544 { special, noInherit = false, readonly = false } = {}1545 ) {1546 const start_position = tokeniser.position;1547 const tokens = { special };1548 const ret = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.autoParenter)(1549 new Attribute({ source: tokeniser.source, tokens })1550 );1551 if (!special && !noInherit) {1552 tokens.special = tokeniser.consume("inherit");1553 }1554 if (ret.special === "inherit" && tokeniser.probe("readonly")) {1555 tokeniser.error("Inherited attributes cannot be read-only");1556 }1557 tokens.readonly = tokeniser.consume("readonly");1558 if (readonly && !tokens.readonly && tokeniser.probe("attribute")) {1559 tokeniser.error("Attributes must be readonly in this context");1560 }1561 tokens.base = tokeniser.consume("attribute");1562 if (!tokens.base) {1563 tokeniser.unconsume(start_position);1564 return;1565 }1566 ret.idlType =1567 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.type_with_extended_attributes)(tokeniser, "attribute-type") ||1568 tokeniser.error("Attribute lacks a type");1569 tokens.name =1570 tokeniser.consumeType("identifier") ||1571 tokeniser.consume("async", "required") ||1572 tokeniser.error("Attribute lacks a name");1573 tokens.termination =1574 tokeniser.consume(";") ||1575 tokeniser.error("Unterminated attribute, expected `;`");1576 return ret.this;1577 }1578 get type() {1579 return "attribute";1580 }1581 get special() {1582 if (!this.tokens.special) {1583 return "";1584 }1585 return this.tokens.special.value;1586 }1587 get readonly() {1588 return !!this.tokens.readonly;1589 }1590 get name() {1591 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_3__.unescape)(this.tokens.name.value);1592 }1593 *validate(defs) {1594 yield* this.extAttrs.validate(defs);1595 yield* this.idlType.validate(defs);1596 switch (this.idlType.generic) {1597 case "sequence":1598 case "record": {1599 const message = `Attributes cannot accept ${this.idlType.generic} types.`;1600 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_0__.validationError)(1601 this.tokens.name,1602 this,1603 "attr-invalid-type",1604 message1605 );1606 break;1607 }1608 default: {1609 const { reference } =1610 (0,_validators_helpers_js__WEBPACK_IMPORTED_MODULE_1__.idlTypeIncludesDictionary)(this.idlType, defs) || {};1611 if (reference) {1612 const targetToken = (this.idlType.union ? reference : this.idlType)1613 .tokens.base;1614 const message = "Attributes cannot accept dictionary types.";1615 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_0__.validationError)(1616 targetToken,1617 this,1618 "attr-invalid-type",1619 message1620 );1621 }1622 }1623 }1624 }1625 write(w) {1626 const { parent } = this;1627 return w.ts.definition(1628 w.ts.wrap([1629 this.extAttrs.write(w),1630 w.token(this.tokens.special),1631 w.token(this.tokens.readonly),1632 w.token(this.tokens.base),1633 w.ts.type(this.idlType.write(w)),1634 w.name_token(this.tokens.name, { data: this, parent }),1635 w.token(this.tokens.termination),1636 ]),1637 { data: this, parent }1638 );1639 }1640}1641__webpack_require__.r(__webpack_exports__);1642class EnumValue extends _token_js__WEBPACK_IMPORTED_MODULE_1__.WrappedToken {1643 static parse(tokeniser) {1644 const value = tokeniser.consumeType("string");1645 if (value) {1646 return new EnumValue({ source: tokeniser.source, tokens: { value } });1647 }1648 }1649 get type() {1650 return "enum-value";1651 }1652 get value() {1653 return super.value.slice(1, -1);1654 }1655 write(w) {1656 const { parent } = this;1657 return w.ts.wrap([1658 w.ts.trivia(this.tokens.value.trivia),1659 w.ts.definition(1660 w.ts.wrap(['"', w.ts.name(this.value, { data: this, parent }), '"']),1661 { data: this, parent }1662 ),1663 w.token(this.tokens.separator),1664 ]);1665 }1666}1667class Enum extends _base_js__WEBPACK_IMPORTED_MODULE_2__.Base {1668 static parse(tokeniser) {1669 const tokens = {};1670 tokens.base = tokeniser.consume("enum");1671 if (!tokens.base) {1672 return;1673 }1674 tokens.name =1675 tokeniser.consumeType("identifier") ||1676 tokeniser.error("No name for enum");1677 const ret = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_0__.autoParenter)(new Enum({ source: tokeniser.source, tokens }));1678 tokeniser.current = ret.this;1679 tokens.open = tokeniser.consume("{") || tokeniser.error("Bodyless enum");1680 ret.values = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_0__.list)(tokeniser, {1681 parser: EnumValue.parse,1682 allowDangler: true,1683 listName: "enumeration",1684 });1685 if (tokeniser.probeType("string")) {1686 tokeniser.error("No comma between enum values");1687 }1688 tokens.close =1689 tokeniser.consume("}") || tokeniser.error("Unexpected value in enum");1690 if (!ret.values.length) {1691 tokeniser.error("No value in enum");1692 }1693 tokens.termination =1694 tokeniser.consume(";") || tokeniser.error("No semicolon after enum");1695 return ret.this;1696 }1697 get type() {1698 return "enum";1699 }1700 get name() {1701 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_0__.unescape)(this.tokens.name.value);1702 }1703 write(w) {1704 return w.ts.definition(1705 w.ts.wrap([1706 this.extAttrs.write(w),1707 w.token(this.tokens.base),1708 w.name_token(this.tokens.name, { data: this }),1709 w.token(this.tokens.open),1710 w.ts.wrap(this.values.map((v) => v.write(w))),1711 w.token(this.tokens.close),1712 w.token(this.tokens.termination),1713 ]),1714 { data: this }1715 );1716 }1717}1718__webpack_require__.r(__webpack_exports__);1719class Includes extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {1720 static parse(tokeniser) {1721 const target = tokeniser.consumeType("identifier");1722 if (!target) {1723 return;1724 }1725 const tokens = { target };1726 tokens.includes = tokeniser.consume("includes");1727 if (!tokens.includes) {1728 tokeniser.unconsume(target.index);1729 return;1730 }1731 tokens.mixin =1732 tokeniser.consumeType("identifier") ||1733 tokeniser.error("Incomplete includes statement");1734 tokens.termination =1735 tokeniser.consume(";") ||1736 tokeniser.error("No terminating ; for includes statement");1737 return new Includes({ source: tokeniser.source, tokens });1738 }1739 get type() {1740 return "includes";1741 }1742 get target() {1743 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.unescape)(this.tokens.target.value);1744 }1745 get includes() {1746 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.unescape)(this.tokens.mixin.value);1747 }1748 write(w) {1749 return w.ts.definition(1750 w.ts.wrap([1751 this.extAttrs.write(w),1752 w.reference_token(this.tokens.target, this),1753 w.token(this.tokens.includes),1754 w.reference_token(this.tokens.mixin, this),1755 w.token(this.tokens.termination),1756 ]),1757 { data: this }1758 );1759 }1760}1761__webpack_require__.r(__webpack_exports__);1762class Typedef extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {1763 static parse(tokeniser) {1764 const tokens = {};1765 const ret = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.autoParenter)(new Typedef({ source: tokeniser.source, tokens }));1766 tokens.base = tokeniser.consume("typedef");1767 if (!tokens.base) {1768 return;1769 }1770 ret.idlType =1771 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.type_with_extended_attributes)(tokeniser, "typedef-type") ||1772 tokeniser.error("Typedef lacks a type");1773 tokens.name =1774 tokeniser.consumeType("identifier") ||1775 tokeniser.error("Typedef lacks a name");1776 tokeniser.current = ret.this;1777 tokens.termination =1778 tokeniser.consume(";") ||1779 tokeniser.error("Unterminated typedef, expected `;`");1780 return ret.this;1781 }1782 get type() {1783 return "typedef";1784 }1785 get name() {1786 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.unescape)(this.tokens.name.value);1787 }1788 *validate(defs) {1789 yield* this.idlType.validate(defs);1790 }1791 write(w) {1792 return w.ts.definition(1793 w.ts.wrap([1794 this.extAttrs.write(w),1795 w.token(this.tokens.base),1796 w.ts.type(this.idlType.write(w)),1797 w.name_token(this.tokens.name, { data: this }),1798 w.token(this.tokens.termination),1799 ]),1800 { data: this }1801 );1802 }1803}1804__webpack_require__.r(__webpack_exports__);1805class CallbackFunction extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {1806 static parse(tokeniser, base) {1807 const tokens = { base };1808 const ret = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.autoParenter)(1809 new CallbackFunction({ source: tokeniser.source, tokens })1810 );1811 tokens.name =1812 tokeniser.consumeType("identifier") ||1813 tokeniser.error("Callback lacks a name");1814 tokeniser.current = ret.this;1815 tokens.assign =1816 tokeniser.consume("=") || tokeniser.error("Callback lacks an assignment");1817 ret.idlType =1818 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.return_type)(tokeniser) || tokeniser.error("Callback lacks a return type");1819 tokens.open =1820 tokeniser.consume("(") ||1821 tokeniser.error("Callback lacks parentheses for arguments");1822 ret.arguments = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.argument_list)(tokeniser);1823 tokens.close =1824 tokeniser.consume(")") || tokeniser.error("Unterminated callback");1825 tokens.termination =1826 tokeniser.consume(";") ||1827 tokeniser.error("Unterminated callback, expected `;`");1828 return ret.this;1829 }1830 get type() {1831 return "callback";1832 }1833 get name() {1834 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.unescape)(this.tokens.name.value);1835 }1836 *validate(defs) {1837 yield* this.extAttrs.validate(defs);1838 yield* this.idlType.validate(defs);1839 }1840 write(w) {1841 return w.ts.definition(1842 w.ts.wrap([1843 this.extAttrs.write(w),1844 w.token(this.tokens.base),1845 w.name_token(this.tokens.name, { data: this }),1846 w.token(this.tokens.assign),1847 w.ts.type(this.idlType.write(w)),1848 w.token(this.tokens.open),1849 ...this.arguments.map((arg) => arg.write(w)),1850 w.token(this.tokens.close),1851 w.token(this.tokens.termination),1852 ]),1853 { data: this }1854 );1855 }1856}1857__webpack_require__.r(__webpack_exports__);1858function static_member(tokeniser) {1859 const special = tokeniser.consume("static");1860 if (!special) return;1861 const member =1862 _attribute_js__WEBPACK_IMPORTED_MODULE_1__.Attribute.parse(tokeniser, { special }) ||1863 _operation_js__WEBPACK_IMPORTED_MODULE_2__.Operation.parse(tokeniser, { special }) ||1864 tokeniser.error("No body in static member");1865 return member;1866}1867class Interface extends _container_js__WEBPACK_IMPORTED_MODULE_0__.Container {1868 static parse(tokeniser, base, { partial = null } = {}) {1869 const tokens = { partial, base };1870 return _container_js__WEBPACK_IMPORTED_MODULE_0__.Container.parse(1871 tokeniser,1872 new Interface({ source: tokeniser.source, tokens }),1873 {1874 type: "interface",1875 inheritable: !partial,1876 allowedMembers: [1877 [_constant_js__WEBPACK_IMPORTED_MODULE_3__.Constant.parse],1878 [_constructor_js__WEBPACK_IMPORTED_MODULE_8__.Constructor.parse],1879 [static_member],1880 [_helpers_js__WEBPACK_IMPORTED_MODULE_5__.stringifier],1881 [_iterable_js__WEBPACK_IMPORTED_MODULE_4__.IterableLike.parse],1882 [_attribute_js__WEBPACK_IMPORTED_MODULE_1__.Attribute.parse],1883 [_operation_js__WEBPACK_IMPORTED_MODULE_2__.Operation.parse],1884 ],1885 }1886 );1887 }1888 get type() {1889 return "interface";1890 }1891 *validate(defs) {1892 yield* this.extAttrs.validate(defs);1893 if (1894 !this.partial &&1895 this.extAttrs.every((extAttr) => extAttr.name !== "Exposed")1896 ) {1897 const message = `Interfaces must have \`[Exposed]\` extended attribute. \1898To fix, add, for example, \`[Exposed=Window]\`. Please also consider carefully \1899if your interface should also be exposed in a Worker scope. Refer to the \1900for more information.`;1901 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_6__.validationError)(1902 this.tokens.name,1903 this,1904 "require-exposed",1905 message,1906 {1907 autofix: (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.autofixAddExposedWindow)(this),1908 }1909 );1910 }1911 const oldConstructors = this.extAttrs.filter(1912 (extAttr) => extAttr.name === "Constructor"1913 );1914 for (const constructor of oldConstructors) {1915 const message = `Constructors should now be represented as a \`constructor()\` operation on the interface \1916instead of \`[Constructor]\` extended attribute. Refer to the \1917for more information.`;1918 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_6__.validationError)(1919 constructor.tokens.name,1920 this,1921 "constructor-member",1922 message,1923 {1924 autofix: autofixConstructor(this, constructor),1925 }1926 );1927 }1928 const isGlobal = this.extAttrs.some((extAttr) => extAttr.name === "Global");1929 if (isGlobal) {1930 const factoryFunctions = this.extAttrs.filter(1931 (extAttr) => extAttr.name === "LegacyFactoryFunction"1932 );1933 for (const named of factoryFunctions) {1934 const message = `Interfaces marked as \`[Global]\` cannot have factory functions.`;1935 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_6__.validationError)(1936 named.tokens.name,1937 this,1938 "no-constructible-global",1939 message1940 );1941 }1942 const constructors = this.members.filter(1943 (member) => member.type === "constructor"1944 );1945 for (const named of constructors) {1946 const message = `Interfaces marked as \`[Global]\` cannot have constructors.`;1947 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_6__.validationError)(1948 named.tokens.base,1949 this,1950 "no-constructible-global",1951 message1952 );1953 }1954 }1955 yield* super.validate(defs);1956 if (!this.partial) {1957 yield* (0,_validators_interface_js__WEBPACK_IMPORTED_MODULE_7__.checkInterfaceMemberDuplication)(defs, this);1958 }1959 }1960}1961function autofixConstructor(interfaceDef, constructorExtAttr) {1962 interfaceDef = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.autoParenter)(interfaceDef);1963 return () => {1964 const indentation = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.getLastIndentation)(1965 interfaceDef.extAttrs.tokens.open.trivia1966 );1967 const memberIndent = interfaceDef.members.length1968 ? (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.getLastIndentation)((0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.getFirstToken)(interfaceDef.members[0]).trivia)1969 : (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.getMemberIndentation)(indentation);1970 const constructorOp = _constructor_js__WEBPACK_IMPORTED_MODULE_8__.Constructor.parse(1971 new _tokeniser_js__WEBPACK_IMPORTED_MODULE_9__.Tokeniser(`\n${memberIndent}constructor();`)1972 );1973 constructorOp.extAttrs = new _extended_attributes_js__WEBPACK_IMPORTED_MODULE_10__.ExtendedAttributes({});1974 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.autoParenter)(constructorOp).arguments = constructorExtAttr.arguments;1975 const existingIndex = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_5__.findLastIndex)(1976 interfaceDef.members,1977 (m) => m.type === "constructor"1978 );1979 interfaceDef.members.splice(existingIndex + 1, 0, constructorOp);1980 const { close } = interfaceDef.tokens;1981 if (!close.trivia.includes("\n")) {1982 close.trivia += `\n${indentation}`;1983 }1984 const { extAttrs } = interfaceDef;1985 const index = extAttrs.indexOf(constructorExtAttr);1986 const removed = extAttrs.splice(index, 1);1987 if (!extAttrs.length) {1988 extAttrs.tokens.open = extAttrs.tokens.close = undefined;1989 } else if (extAttrs.length === index) {1990 extAttrs[index - 1].tokens.separator = undefined;1991 } else if (!extAttrs[index].tokens.name.trivia.trim()) {1992 extAttrs[index].tokens.name.trivia = removed[0].tokens.name.trivia;1993 }1994 };1995}1996__webpack_require__.r(__webpack_exports__);1997function inheritance(tokeniser) {1998 const colon = tokeniser.consume(":");1999 if (!colon) {2000 return {};2001 }2002 const inheritance =2003 tokeniser.consumeType("identifier") ||2004 tokeniser.error("Inheritance lacks a type");2005 return { colon, inheritance };2006}2007class Container extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {2008 * @template T2009 * @param {T} instance2010 * @param {*} args2011 static parse(tokeniser, instance, { type, inheritable, allowedMembers }) {2012 const { tokens } = instance;2013 tokens.name =2014 tokeniser.consumeType("identifier") ||2015 tokeniser.error(`Missing name in ${instance.type}`);2016 tokeniser.current = instance;2017 instance = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.autoParenter)(instance);2018 if (inheritable) {2019 Object.assign(tokens, inheritance(tokeniser));2020 }2021 tokens.open = tokeniser.consume("{") || tokeniser.error(`Bodyless ${type}`);2022 instance.members = [];2023 while (true) {2024 tokens.close = tokeniser.consume("}");2025 if (tokens.close) {2026 tokens.termination =2027 tokeniser.consume(";") ||2028 tokeniser.error(`Missing semicolon after ${type}`);2029 return instance.this;2030 }2031 const ea = _extended_attributes_js__WEBPACK_IMPORTED_MODULE_1__.ExtendedAttributes.parse(tokeniser);2032 let mem;2033 for (const [parser, ...args] of allowedMembers) {2034 mem = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.autoParenter)(parser(tokeniser, ...args));2035 if (mem) {2036 break;2037 }2038 }2039 if (!mem) {2040 tokeniser.error("Unknown member");2041 }2042 mem.extAttrs = ea;2043 instance.members.push(mem.this);2044 }2045 }2046 get partial() {2047 return !!this.tokens.partial;2048 }2049 get name() {2050 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.unescape)(this.tokens.name.value);2051 }2052 get inheritance() {2053 if (!this.tokens.inheritance) {2054 return null;2055 }2056 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.unescape)(this.tokens.inheritance.value);2057 }2058 *validate(defs) {2059 for (const member of this.members) {2060 if (member.validate) {2061 yield* member.validate(defs);2062 }2063 }2064 }2065 write(w) {2066 const inheritance = () => {2067 if (!this.tokens.inheritance) {2068 return "";2069 }2070 return w.ts.wrap([2071 w.token(this.tokens.colon),2072 w.ts.trivia(this.tokens.inheritance.trivia),2073 w.ts.inheritance(2074 w.reference(this.tokens.inheritance.value, { context: this })2075 ),2076 ]);2077 };2078 return w.ts.definition(2079 w.ts.wrap([2080 this.extAttrs.write(w),2081 w.token(this.tokens.callback),2082 w.token(this.tokens.partial),2083 w.token(this.tokens.base),2084 w.token(this.tokens.mixin),2085 w.name_token(this.tokens.name, { data: this }),2086 inheritance(),2087 w.token(this.tokens.open),2088 w.ts.wrap(this.members.map((m) => m.write(w))),2089 w.token(this.tokens.close),2090 w.token(this.tokens.termination),2091 ]),2092 { data: this }2093 );2094 }2095}2096__webpack_require__.r(__webpack_exports__);2097class Constant extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {2098 static parse(tokeniser) {2099 const tokens = {};2100 tokens.base = tokeniser.consume("const");2101 if (!tokens.base) {2102 return;2103 }2104 let idlType = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.primitive_type)(tokeniser);2105 if (!idlType) {2106 const base =2107 tokeniser.consumeType("identifier") ||2108 tokeniser.error("Const lacks a type");2109 idlType = new _type_js__WEBPACK_IMPORTED_MODULE_1__.Type({ source: tokeniser.source, tokens: { base } });2110 }2111 if (tokeniser.probe("?")) {2112 tokeniser.error("Unexpected nullable constant type");2113 }2114 idlType.type = "const-type";2115 tokens.name =2116 tokeniser.consumeType("identifier") ||2117 tokeniser.error("Const lacks a name");2118 tokens.assign =2119 tokeniser.consume("=") || tokeniser.error("Const lacks value assignment");2120 tokens.value =2121 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.const_value)(tokeniser) || tokeniser.error("Const lacks a value");2122 tokens.termination =2123 tokeniser.consume(";") ||2124 tokeniser.error("Unterminated const, expected `;`");2125 const ret = new Constant({ source: tokeniser.source, tokens });2126 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.autoParenter)(ret).idlType = idlType;2127 return ret;2128 }2129 get type() {2130 return "const";2131 }2132 get name() {2133 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.unescape)(this.tokens.name.value);2134 }2135 get value() {2136 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.const_data)(this.tokens.value);2137 }2138 write(w) {2139 const { parent } = this;2140 return w.ts.definition(2141 w.ts.wrap([2142 this.extAttrs.write(w),2143 w.token(this.tokens.base),2144 w.ts.type(this.idlType.write(w)),2145 w.name_token(this.tokens.name, { data: this, parent }),2146 w.token(this.tokens.assign),2147 w.token(this.tokens.value),2148 w.token(this.tokens.termination),2149 ]),2150 { data: this, parent }2151 );2152 }2153}2154__webpack_require__.r(__webpack_exports__);2155class IterableLike extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {2156 static parse(tokeniser) {2157 const start_position = tokeniser.position;2158 const tokens = {};2159 const ret = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.autoParenter)(2160 new IterableLike({ source: tokeniser.source, tokens })2161 );2162 tokens.readonly = tokeniser.consume("readonly");2163 if (!tokens.readonly) {2164 tokens.async = tokeniser.consume("async");2165 }2166 tokens.base = tokens.readonly2167 ? tokeniser.consume("maplike", "setlike")2168 : tokens.async2169 ? tokeniser.consume("iterable")2170 : tokeniser.consume("iterable", "maplike", "setlike");2171 if (!tokens.base) {2172 tokeniser.unconsume(start_position);2173 return;2174 }2175 const { type } = ret;2176 const secondTypeRequired = type === "maplike";2177 const secondTypeAllowed = secondTypeRequired || type === "iterable";2178 const argumentAllowed = ret.async && type === "iterable";2179 tokens.open =2180 tokeniser.consume("<") ||2181 tokeniser.error(`Missing less-than sign \`<\` in ${type} declaration`);2182 const first =2183 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.type_with_extended_attributes)(tokeniser) ||2184 tokeniser.error(`Missing a type argument in ${type} declaration`);2185 ret.idlType = [first];2186 ret.arguments = [];2187 if (secondTypeAllowed) {2188 first.tokens.separator = tokeniser.consume(",");2189 if (first.tokens.separator) {2190 ret.idlType.push((0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.type_with_extended_attributes)(tokeniser));2191 } else if (secondTypeRequired) {2192 tokeniser.error(`Missing second type argument in ${type} declaration`);2193 }2194 }2195 tokens.close =2196 tokeniser.consume(">") ||2197 tokeniser.error(`Missing greater-than sign \`>\` in ${type} declaration`);2198 if (tokeniser.probe("(")) {2199 if (argumentAllowed) {2200 tokens.argsOpen = tokeniser.consume("(");2201 ret.arguments.push(...(0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.argument_list)(tokeniser));2202 tokens.argsClose =2203 tokeniser.consume(")") ||2204 tokeniser.error("Unterminated async iterable argument list");2205 } else {2206 tokeniser.error(`Arguments are only allowed for \`async iterable\``);2207 }2208 }2209 tokens.termination =2210 tokeniser.consume(";") ||2211 tokeniser.error(`Missing semicolon after ${type} declaration`);2212 return ret.this;2213 }2214 get type() {2215 return this.tokens.base.value;2216 }2217 get readonly() {2218 return !!this.tokens.readonly;2219 }2220 get async() {2221 return !!this.tokens.async;2222 }2223 *validate(defs) {2224 for (const type of this.idlType) {2225 yield* type.validate(defs);2226 }2227 for (const argument of this.arguments) {2228 yield* argument.validate(defs);2229 }2230 }2231 write(w) {2232 return w.ts.definition(2233 w.ts.wrap([2234 this.extAttrs.write(w),2235 w.token(this.tokens.readonly),2236 w.token(this.tokens.async),2237 w.token(this.tokens.base, w.ts.generic),2238 w.token(this.tokens.open),2239 w.ts.wrap(this.idlType.map((t) => t.write(w))),2240 w.token(this.tokens.close),2241 w.token(this.tokens.argsOpen),2242 w.ts.wrap(this.arguments.map((arg) => arg.write(w))),2243 w.token(this.tokens.argsClose),2244 w.token(this.tokens.termination),2245 ]),2246 { data: this, parent: this.parent }2247 );2248 }2249}2250__webpack_require__.r(__webpack_exports__);2251function* checkInterfaceMemberDuplication(defs, i) {2252 const opNames = new Set(getOperations(i).map((op) => op.name));2253 const partials = defs.partials.get(i.name) || [];2254 const mixins = defs.mixinMap.get(i.name) || [];2255 for (const ext of [...partials, ...mixins]) {2256 const additions = getOperations(ext);2257 yield* forEachExtension(additions, opNames, ext, i);2258 for (const addition of additions) {2259 opNames.add(addition.name);2260 }2261 }2262 function* forEachExtension(additions, existings, ext, base) {2263 for (const addition of additions) {2264 const { name } = addition;2265 if (name && existings.has(name)) {2266 const message = `The operation "${name}" has already been defined for the base interface "${base.name}" either in itself or in a mixin`;2267 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_0__.validationError)(2268 addition.tokens.name,2269 ext,2270 "no-cross-overload",2271 message2272 );2273 }2274 }2275 }2276 function getOperations(i) {2277 return i.members.filter(({ type }) => type === "operation");2278 }2279}2280__webpack_require__.r(__webpack_exports__);2281class Constructor extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {2282 static parse(tokeniser) {2283 const base = tokeniser.consume("constructor");2284 if (!base) {2285 return;2286 }2287 const tokens = { base };2288 tokens.open =2289 tokeniser.consume("(") ||2290 tokeniser.error("No argument list in constructor");2291 const args = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.argument_list)(tokeniser);2292 tokens.close =2293 tokeniser.consume(")") || tokeniser.error("Unterminated constructor");2294 tokens.termination =2295 tokeniser.consume(";") ||2296 tokeniser.error("No semicolon after constructor");2297 const ret = new Constructor({ source: tokeniser.source, tokens });2298 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.autoParenter)(ret).arguments = args;2299 return ret;2300 }2301 get type() {2302 return "constructor";2303 }2304 *validate(defs) {2305 if (this.idlType) {2306 yield* this.idlType.validate(defs);2307 }2308 for (const argument of this.arguments) {2309 yield* argument.validate(defs);2310 }2311 }2312 write(w) {2313 const { parent } = this;2314 return w.ts.definition(2315 w.ts.wrap([2316 this.extAttrs.write(w),2317 w.token(this.tokens.base, w.ts.nameless, { data: this, parent }),2318 w.token(this.tokens.open),2319 w.ts.wrap(this.arguments.map((arg) => arg.write(w))),2320 w.token(this.tokens.close),2321 w.token(this.tokens.termination),2322 ]),2323 { data: this, parent }2324 );2325 }2326}2327__webpack_require__.r(__webpack_exports__);2328class Mixin extends _container_js__WEBPACK_IMPORTED_MODULE_0__.Container {2329 *2330 * @param {Token} base2331 * @param {object} [options]2332 * @param {Token} [options.partial]2333 static parse(tokeniser, base, { partial } = {}) {2334 const tokens = { partial, base };2335 tokens.mixin = tokeniser.consume("mixin");2336 if (!tokens.mixin) {2337 return;2338 }2339 return _container_js__WEBPACK_IMPORTED_MODULE_0__.Container.parse(2340 tokeniser,2341 new Mixin({ source: tokeniser.source, tokens }),2342 {2343 type: "interface mixin",2344 allowedMembers: [2345 [_constant_js__WEBPACK_IMPORTED_MODULE_1__.Constant.parse],2346 [_helpers_js__WEBPACK_IMPORTED_MODULE_4__.stringifier],2347 [_attribute_js__WEBPACK_IMPORTED_MODULE_2__.Attribute.parse, { noInherit: true }],2348 [_operation_js__WEBPACK_IMPORTED_MODULE_3__.Operation.parse, { regular: true }],2349 ],2350 }2351 );2352 }2353 get type() {2354 return "interface mixin";2355 }2356}2357__webpack_require__.r(__webpack_exports__);2358class Dictionary extends _container_js__WEBPACK_IMPORTED_MODULE_0__.Container {2359 * @param {object} [options]2360 static parse(tokeniser, { partial } = {}) {2361 const tokens = { partial };2362 tokens.base = tokeniser.consume("dictionary");2363 if (!tokens.base) {2364 return;2365 }2366 return _container_js__WEBPACK_IMPORTED_MODULE_0__.Container.parse(2367 tokeniser,2368 new Dictionary({ source: tokeniser.source, tokens }),2369 {2370 type: "dictionary",2371 inheritable: !partial,2372 allowedMembers: [[_field_js__WEBPACK_IMPORTED_MODULE_1__.Field.parse]],2373 }2374 );2375 }2376 get type() {2377 return "dictionary";2378 }2379}2380__webpack_require__.r(__webpack_exports__);2381class Field extends _base_js__WEBPACK_IMPORTED_MODULE_0__.Base {2382 static parse(tokeniser) {2383 const tokens = {};2384 const ret = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.autoParenter)(new Field({ source: tokeniser.source, tokens }));2385 ret.extAttrs = _extended_attributes_js__WEBPACK_IMPORTED_MODULE_2__.ExtendedAttributes.parse(tokeniser);2386 tokens.required = tokeniser.consume("required");2387 ret.idlType =2388 (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.type_with_extended_attributes)(tokeniser, "dictionary-type") ||2389 tokeniser.error("Dictionary member lacks a type");2390 tokens.name =2391 tokeniser.consumeType("identifier") ||2392 tokeniser.error("Dictionary member lacks a name");2393 ret.default = _default_js__WEBPACK_IMPORTED_MODULE_3__.Default.parse(tokeniser);2394 if (tokens.required && ret.default)2395 tokeniser.error("Required member must not have a default");2396 tokens.termination =2397 tokeniser.consume(";") ||2398 tokeniser.error("Unterminated dictionary member, expected `;`");2399 return ret.this;2400 }2401 get type() {2402 return "field";2403 }2404 get name() {2405 return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__.unescape)(this.tokens.name.value);2406 }2407 get required() {2408 return !!this.tokens.required;2409 }2410 *validate(defs) {2411 yield* this.idlType.validate(defs);2412 }2413 write(w) {2414 const { parent } = this;2415 return w.ts.definition(2416 w.ts.wrap([2417 this.extAttrs.write(w),2418 w.token(this.tokens.required),2419 w.ts.type(this.idlType.write(w)),2420 w.name_token(this.tokens.name, { data: this, parent }),2421 this.default ? this.default.write(w) : "",2422 w.token(this.tokens.termination),2423 ]),2424 { data: this, parent }2425 );2426 }2427}2428__webpack_require__.r(__webpack_exports__);2429class Namespace extends _container_js__WEBPACK_IMPORTED_MODULE_0__.Container {2430 * @param {object} [options]2431 static parse(tokeniser, { partial } = {}) {2432 const tokens = { partial };2433 tokens.base = tokeniser.consume("namespace");2434 if (!tokens.base) {2435 return;2436 }2437 return _container_js__WEBPACK_IMPORTED_MODULE_0__.Container.parse(2438 tokeniser,2439 new Namespace({ source: tokeniser.source, tokens }),2440 {2441 type: "namespace",2442 allowedMembers: [2443 [_attribute_js__WEBPACK_IMPORTED_MODULE_1__.Attribute.parse, { noInherit: true, readonly: true }],2444 [_constant_js__WEBPACK_IMPORTED_MODULE_5__.Constant.parse],2445 [_operation_js__WEBPACK_IMPORTED_MODULE_2__.Operation.parse, { regular: true }],2446 ],2447 }2448 );2449 }2450 get type() {2451 return "namespace";2452 }2453 *validate(defs) {2454 if (2455 !this.partial &&2456 this.extAttrs.every((extAttr) => extAttr.name !== "Exposed")2457 ) {2458 const message = `Namespaces must have [Exposed] extended attribute. \2459To fix, add, for example, [Exposed=Window]. Please also consider carefully \2460if your namespace should also be exposed in a Worker scope. Refer to the \2461for more information.`;2462 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_3__.validationError)(2463 this.tokens.name,2464 this,2465 "require-exposed",2466 message,2467 {2468 autofix: (0,_helpers_js__WEBPACK_IMPORTED_MODULE_4__.autofixAddExposedWindow)(this),2469 }2470 );2471 }2472 yield* super.validate(defs);2473 }2474}2475__webpack_require__.r(__webpack_exports__);2476class CallbackInterface extends _container_js__WEBPACK_IMPORTED_MODULE_0__.Container {2477 static parse(tokeniser, callback, { partial = null } = {}) {2478 const tokens = { callback };2479 tokens.base = tokeniser.consume("interface");2480 if (!tokens.base) {2481 return;2482 }2483 return _container_js__WEBPACK_IMPORTED_MODULE_0__.Container.parse(2484 tokeniser,2485 new CallbackInterface({ source: tokeniser.source, tokens }),2486 {2487 type: "callback interface",2488 inheritable: !partial,2489 allowedMembers: [2490 [_constant_js__WEBPACK_IMPORTED_MODULE_2__.Constant.parse],2491 [_operation_js__WEBPACK_IMPORTED_MODULE_1__.Operation.parse, { regular: true }],2492 ],2493 }2494 );2495 }2496 get type() {2497 return "callback interface";2498 }2499}2500__webpack_require__.r(__webpack_exports__);2501function noop(arg) {2502 return arg;2503}2504const templates = {2505 wrap: (items) => items.join(""),2506 trivia: noop,2507 name: noop,2508 reference: noop,2509 type: noop,2510 generic: noop,2511 nameless: noop,2512 inheritance: noop,2513 definition: noop,2514 extendedAttribute: noop,2515 extendedAttributeReference: noop,2516};2517class Writer {2518 constructor(ts) {2519 this.ts = Object.assign({}, templates, ts);2520 }2521 reference(raw, { unescaped, context }) {2522 if (!unescaped) {2523 unescaped = raw.startsWith("_") ? raw.slice(1) : raw;2524 }2525 return this.ts.reference(raw, unescaped, context);2526 }2527 token(t, wrapper = noop, ...args) {2528 if (!t) {2529 return "";2530 }2531 const value = wrapper(t.value, ...args);2532 return this.ts.wrap([this.ts.trivia(t.trivia), value]);2533 }2534 reference_token(t, context) {2535 return this.token(t, this.reference.bind(this), { context });2536 }2537 name_token(t, arg) {2538 return this.token(t, this.ts.name, arg);2539 }2540 identifier(id, context) {2541 return this.ts.wrap([2542 this.reference_token(id.tokens.value, context),2543 this.token(id.tokens.separator),2544 ]);2545 }2546}2547function write(ast, { templates: ts = templates } = {}) {2548 ts = Object.assign({}, templates, ts);2549 const w = new Writer(ts);2550 function dispatch(it) {2551 if (it.type === "eof") {2552 return ts.trivia(it.trivia);2553 }2554 return it.write(w);2555 }2556 return ts.wrap(ast.map(dispatch));2557}2558__webpack_require__.r(__webpack_exports__);2559function getMixinMap(all, unique) {2560 const map = new Map();2561 const includes = all.filter((def) => def.type === "includes");2562 for (const include of includes) {2563 const mixin = unique.get(include.includes);2564 if (!mixin) {2565 continue;2566 }2567 const array = map.get(include.target);2568 if (array) {2569 array.push(mixin);2570 } else {2571 map.set(include.target, [mixin]);2572 }2573 }2574 return map;2575}2576 * @typedef {ReturnType<typeof groupDefinitions>} Definitions2577function groupDefinitions(all) {2578 const unique = new Map();2579 const duplicates = new Set();2580 const partials = new Map();2581 for (const def of all) {2582 if (def.partial) {2583 const array = partials.get(def.name);2584 if (array) {2585 array.push(def);2586 } else {2587 partials.set(def.name, [def]);2588 }2589 continue;2590 }2591 if (!def.name) {2592 continue;2593 }2594 if (!unique.has(def.name)) {2595 unique.set(def.name, def);2596 } else {2597 duplicates.add(def);2598 }2599 }2600 return {2601 all,2602 unique,2603 partials,2604 duplicates,2605 mixinMap: getMixinMap(all, unique),2606 cache: {2607 typedefIncludesDictionary: new WeakMap(),2608 dictionaryIncludesRequiredField: new WeakMap(),2609 },2610 };2611}2612function* checkDuplicatedNames({ unique, duplicates }) {2613 for (const dup of duplicates) {2614 const { name } = dup;2615 const message = `The name "${name}" of type "${2616 unique.get(name).type2617 }" was already seen`;2618 yield (0,_error_js__WEBPACK_IMPORTED_MODULE_0__.validationError)(dup.tokens.name, dup, "no-duplicate", message);2619 }2620}2621function* validateIterable(ast) {2622 const defs = groupDefinitions(ast);2623 for (const def of defs.all) {2624 if (def.validate) {2625 yield* def.validate(defs);2626 }2627 }2628 yield* checkDuplicatedNames(defs);2629}2630function flatten(array) {2631 if (array.flat) {2632 return array.flat();2633 }2634 return [].concat(...array);2635}2636 * @param {*} ast AST or array of ASTs2637function validate(ast) {2638 return [...validateIterable(flatten(ast))];2639}2640var __webpack_exports__ = {};2641(() => {2642__webpack_require__.r(__webpack_exports__);2643})();2644;...
Using AI Code Generation
1var wptools = require('wptools');2var fs = require('fs');3var readLine = require('readline');4var lineReader = require('readline').createInterface({5 input: require('fs').createReadStream('wiki.txt')6});7var myArgs = process.argv.slice(2);8var wiki = myArgs[0];9var wiki1 = myArgs[1];10var wiki2 = myArgs[2];11var wiki3 = myArgs[3];12var wiki4 = myArgs[4];13var wiki5 = myArgs[5];14var wiki6 = myArgs[6];15var wiki7 = myArgs[7];16var wiki8 = myArgs[8];17var wiki9 = myArgs[9];18var wiki10 = myArgs[10];19var wiki11 = myArgs[11];20var wiki12 = myArgs[12];21var wiki13 = myArgs[13];22var wiki14 = myArgs[14];23var wiki15 = myArgs[15];24var wiki16 = myArgs[16];25var wiki17 = myArgs[17];26var wiki18 = myArgs[18];27var wiki19 = myArgs[19];28var wiki20 = myArgs[20];29var wiki21 = myArgs[21];30var wiki22 = myArgs[22];31var wiki23 = myArgs[23];32var wiki24 = myArgs[24];33var wiki25 = myArgs[25];34var wiki26 = myArgs[26];35var wiki27 = myArgs[27];36var wiki28 = myArgs[28];37var wiki29 = myArgs[29];38var wiki30 = myArgs[30];39var wiki31 = myArgs[31];40var wiki32 = myArgs[32];41var wiki33 = myArgs[33];42var wiki34 = myArgs[34];43var wiki35 = myArgs[35];44var wiki36 = myArgs[36];45var wiki37 = myArgs[37];46var wiki38 = myArgs[38];47var wiki39 = myArgs[39];48var wiki40 = myArgs[40];49var wiki41 = myArgs[41];50var wiki42 = myArgs[42];51var wiki43 = myArgs[43];52var wiki44 = myArgs[44];53var wiki45 = myArgs[45];54var wiki46 = myArgs[46];55var wiki47 = myArgs[47];
Using AI Code Generation
1const wptools = require('wptools');2wptools.page('Barack Obama').then((page) => {3 page.tokenizer().then((tokenizer) => {4 console.log(tokenizer);5 });6});7const wptools = require('wptools');8wptools.page('Barack Obama').then((page) => {9 page.tokenizer().then((tokenizer) => {10 console.log(tokenizer);11 });12});13const wptools = require('wptools');14wptools.page('Barack Obama').then((page) => {15 page.tokenizer().then((tokenizer) => {16 console.log(tokenizer);17 });18});19const wptools = require('wptools');20wptools.page('Barack Obama').then((page) => {21 page.tokenizer().then((tokenizer) => {22 console.log(tokenizer);23 });24});25const wptools = require('wptools');26wptools.page('Barack Obama').then((page) => {27 page.tokenizer().then((tokenizer) => {28 console.log(tokenizer);29 });30});31const wptools = require('wptools');32wptools.page('Barack Obama').then((page) => {33 page.tokenizer().then((tokenizer) => {34 console.log(tokenizer);35 });36});37const wptools = require('wptools');38wptools.page('Barack Obama').then((page) => {39 page.tokenizer().then((tokenizer) => {40 console.log(tokenizer);41 });42});43const wptools = require('wptools');44wptools.page('Barack Obama').then((page) => {45 page.tokenizer().then((tokenizer) => {46 console.log(tokenizer);47 });48});
Using AI Code Generation
1var wptools = require('wptools');2var fs = require('fs');3var text = fs.readFileSync('test.txt', 'utf8');4var tokeniser = require('wptools').tokeniser;5var tokens = tokeniser(text);6console.log(tokens);7var wptools = require('wptools');8var fs = require('fs');9var text = fs.readFileSync('test.txt', 'utf8');10var tokens = wptools(text);11console.log(tokens);12var wptools = require('wptools');13var fs = require('fs');14var text = fs.readFileSync('test.txt', 'utf8');15var tokens = wptools(text);16console.log(tokens);17var wptools = require('wptools');18var fs = require('fs');19var text = fs.readFileSync('test.txt', 'utf8');20var tokens = wptools(text);21console.log(tokens);22var wptools = require('wptools');23var fs = require('fs');24var text = fs.readFileSync('test.txt', 'utf8');25var tokens = wptools(text);26console.log(tokens);27var wptools = require('wptools');28var fs = require('fs');29var text = fs.readFileSync('test.txt', 'utf8');30var tokens = wptools(text);31console.log(tokens);32var wptools = require('wptools');33var fs = require('fs');34var text = fs.readFileSync('test.txt', 'utf8');35var tokens = wptools(text);36console.log(tokens);37var wptools = require('wptools');38var fs = require('fs');39var text = fs.readFileSync('test.txt', 'utf8');40var tokens = wptools(text);41console.log(tokens);42var wptools = require('wptools');43var fs = require('fs');44var text = fs.readFileSync('test.txt', 'utf8');45var tokens = wptools(text);46console.log(tokens);
Using AI Code Generation
1var wptools = require('wptools');2var fs = require('fs');3var path = require('path');4var file = path.join(__dirname, 'data', 'test.txt');5var file2 = path.join(__dirname, 'data', 'test2.txt');6var file3 = path.join(__dirname, 'data', 'test3.txt');7var file4 = path.join(__dirname, 'data', 'test4.txt');8var file5 = path.join(__dirname, 'data', 'test5.txt');9var file6 = path.join(__dirname, 'data', 'test6.txt');10var file7 = path.join(__dirname, 'data', 'test7.txt');11var file8 = path.join(__dirname, 'data', 'test8.txt');12var file9 = path.join(__dirname, 'data', 'test9.txt');13var file10 = path.join(__dirname, 'data', 'test10.txt');14var file11 = path.join(__dirname, 'data', 'test11.txt');15var file12 = path.join(__dirname, 'data', 'test12.txt');16var file13 = path.join(__dirname, 'data', 'test13.txt');17var file14 = path.join(__dirname, 'data', 'test14.txt');18var file15 = path.join(__dirname, 'data', 'test15.txt');19var file16 = path.join(__dirname, 'data', 'test16.txt');20var file17 = path.join(__dirname, 'data', 'test17.txt');21var file18 = path.join(__dirname, 'data', 'test18.txt');22var file19 = path.join(__dirname, 'data', 'test19.txt');23var file20 = path.join(__dirname, 'data', 'test20.txt');24var file21 = path.join(__dirname, 'data', 'test21.txt');25var file22 = path.join(__dirname, 'data', 'test22.txt');26var file23 = path.join(__dirname, 'data', 'test23.txt');27var file24 = path.join(__dirname, 'data', 'test24.txt');28var file25 = path.join(__dirname, 'data', 'test25.txt');29var file26 = path.join(__dirname, 'data', 'test26.txt');30var file27 = path.join(__dirname, 'data', 'test27.txt');31var file28 = path.join(__dirname, 'data', 'test28
Using AI Code Generation
1var fs = require('fs');2var wptokeniser = require('./wptokeniser.js');3var xml = fs.readFileSync('dump.xml', 'utf8');4var tokens = wptokeniser.tokenise(xml);5var text = wptokeniser.detokenise(tokens);6console.log(text);
Using AI Code Generation
1var wptools = require('wptools');2var fs = require('fs');3var input = fs.readFileSync('input.txt', 'utf8');4var wiki = new wptools.page(input)5 .get(function(err, data) {6 if(err) {7 console.log(err);8 }9 else {10 var tokens = data.tokens;11 var tokenised = [];12 for(var i = 0; i < tokens.length; i++) {13 tokenised.push(tokens[i].text);14 }15 fs.writeFile('output.txt', tokenised.join(' '), function(err) {16 if(err) {17 console.log(err);18 }19 else {20 console.log('File written');21 }22 });23 }24 });
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!