diff --git a/eslint.config.js b/eslint.config.js index db04f528..8fc1a991 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,12 +1,19 @@ import js from "@eslint/js"; import globals from "globals"; import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"; -import importPlugin from 'eslint-plugin-import'; +import importPlugin from "eslint-plugin-import"; +import tseslint from "typescript-eslint"; export default [ js.configs.recommended, eslintPluginPrettierRecommended, importPlugin.flatConfigs.recommended, + ...tseslint.configs.recommendedTypeCheckedOnly.map((config) => { + return { + files: ["lib/**"], + ...config, + }; + }), { languageOptions: { ecmaVersion: "latest", @@ -15,19 +22,31 @@ export default [ ...globals.browser, ...globals.node, ...globals.mocha, - } + }, + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, }, rules: { "eol-last": "error", "import/extensions": ["error", "always"], - 'import/no-unresolved': 0, // https://github.com/import-js/eslint-plugin-import/issues/3082 + "import/no-unresolved": 0, // https://github.com/import-js/eslint-plugin-import/issues/3082 "no-console": "error", - "no-constant-condition": ["error", { "checkLoops": false }], + "no-constant-condition": ["error", { checkLoops: false }], "no-eval": "error", "no-implied-eval": "error", "no-trailing-spaces": "error", "prefer-const": "error", - "semi": "error" + semi: "error", + + // For now we want to focus on the exposed types rather than the internals. + "@typescript-eslint/no-unsafe-argument": 0, + "@typescript-eslint/no-unsafe-assignment": 0, + "@typescript-eslint/no-unsafe-call": 0, + "@typescript-eslint/no-unsafe-member-access": 0, + // Incorrectly yells at static functions + "@typescript-eslint/unbound-method": 0 }, }, ]; diff --git a/lib/error.js b/lib/error.js index 9bba3960..8daa3da0 100644 --- a/lib/error.js +++ b/lib/error.js @@ -1,3 +1,6 @@ +/** @import { Base } from "./productions/base.js" */ +/** @import { Source } from "./tokeniser.js" */ + /** * @param {string} text */ @@ -6,6 +9,10 @@ function lastLine(text) { return splitted[splitted.length - 1]; } +/** + * @param {string} base + * @param {string} target + */ function appendIfExist(base, target) { let result = base; if (target) { @@ -14,6 +21,9 @@ function appendIfExist(base, target) { return result; } +/** + * @param {Base} node + */ function contextAsText(node) { const hierarchy = [node]; while (node && node.parent) { @@ -32,10 +42,10 @@ function contextAsText(node) { * * @typedef {ReturnType} WebIDLErrorData * - * @param {string} message error message - * @param {*} position + * @param {Source} source + * @param {number} position * @param {*} current - * @param {*} message + * @param {string} message error message * @param {"Syntax" | "Validation"} kind error type * @param {WebIDL2ErrorOptions=} options */ diff --git a/lib/productions/argument.js b/lib/productions/argument.js index dd6f00af..45cff88b 100644 --- a/lib/productions/argument.js +++ b/lib/productions/argument.js @@ -14,7 +14,14 @@ import { dictionaryIncludesRequiredField, } from "../validators/helpers.js"; +/** @import {Type} from "./type.js" */ + export class Argument extends Base { + /** @type {Type} */ + idlType; + /** @type {Default | null} */ + default; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser */ diff --git a/lib/productions/array-base.js b/lib/productions/array-base.js index 18304a00..05119005 100644 --- a/lib/productions/array-base.js +++ b/lib/productions/array-base.js @@ -1,4 +1,12 @@ +/** @import {Token} from "../tokeniser.js" */ + export class ArrayBase extends Array { + /** @type {Record} */ + tokens; + /** @type {Token[]} */ + source; + parent; + constructor({ source, tokens }) { super(); Object.defineProperties(this, { diff --git a/lib/productions/attribute.js b/lib/productions/attribute.js index 0c203a0b..d50ddafe 100644 --- a/lib/productions/attribute.js +++ b/lib/productions/attribute.js @@ -10,7 +10,12 @@ import { autoParenter, } from "./helpers.js"; +/** @import {Type} from "./type.js" */ + export class Attribute extends Base { + /** @type {Type} */ + idlType; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser * @param {object} [options] diff --git a/lib/productions/base.js b/lib/productions/base.js index c3dc73c5..63f2d95c 100644 --- a/lib/productions/base.js +++ b/lib/productions/base.js @@ -1,4 +1,20 @@ +/** @import {ExtendedAttributes} from "./extended-attributes.js" */ +/** @import {Token} from "../tokeniser.js" */ +/** @import {Definitions} from "../validator.js" */ +/** @import {Writer} from "../writer.js" */ + export class Base { + /** @type {Record} */ + tokens; + /** @type {Token[]} */ + source; + /** @type {ExtendedAttributes | undefined} */ + extAttrs; + /** @type {this} */ + this; + /** @type {*} */ + parent; + /** * @param {object} initializer * @param {Base["source"]} initializer.source @@ -6,13 +22,37 @@ export class Base { */ constructor({ source, tokens }) { Object.defineProperties(this, { - source: { value: source }, - tokens: { value: tokens, writable: true }, - parent: { value: null, writable: true }, - this: { value: this }, // useful when escaping from proxy + source: { value: source, enumerable: false }, + tokens: { value: tokens, writable: true, enumerable: false }, + parent: { value: null, writable: true, enumerable: false }, + this: { value: this, enumerable: false }, // useful when escaping from proxy }); } + get type() { + return undefined; + } + get name() { + return undefined; + } + + /** + * @param {Definitions} defs + * @returns {IterableIterator} + */ + // eslint-disable-next-line no-unused-vars + *validate(defs) {} + + /** + * @template T + * @param {Writer} w + * @returns {T | string} + */ + // eslint-disable-next-line no-unused-vars + write(w) { + return ""; + } + toJSON() { const json = { type: undefined, name: undefined, inheritance: undefined }; let proto = this; @@ -20,7 +60,6 @@ export class Base { const descMap = Object.getOwnPropertyDescriptors(proto); for (const [key, value] of Object.entries(descMap)) { if (value.enumerable || value.get) { - // @ts-ignore - allow indexing here json[key] = this[key]; } } diff --git a/lib/productions/callback-interface.js b/lib/productions/callback-interface.js index d5bd34dd..a96149db 100644 --- a/lib/productions/callback-interface.js +++ b/lib/productions/callback-interface.js @@ -1,4 +1,4 @@ -import { Container } from "./container.js"; +import { Container, parseContainer } from "./container.js"; import { Operation } from "./operation.js"; import { Constant } from "./constant.js"; @@ -15,7 +15,7 @@ export class CallbackInterface extends Container { if (!tokens.base) { return; } - return Container.parse( + return parseContainer( tokeniser, new CallbackInterface({ source: tokeniser.source, tokens }), { diff --git a/lib/productions/callback.js b/lib/productions/callback.js index 316a19f1..75779f66 100644 --- a/lib/productions/callback.js +++ b/lib/productions/callback.js @@ -7,7 +7,15 @@ import { } from "./helpers.js"; import { validationError } from "../error.js"; +/** @import {Type} from "./type.js" */ +/** @import {Argument} from "./argument.js" */ + export class CallbackFunction extends Base { + /** @type {Type} */ + idlType; + /** @type {Argument[]} */ + arguments; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser */ diff --git a/lib/productions/constant.js b/lib/productions/constant.js index 9fd90146..e93d8a2e 100644 --- a/lib/productions/constant.js +++ b/lib/productions/constant.js @@ -9,6 +9,9 @@ import { } from "./helpers.js"; export class Constant extends Base { + /** @type {Type} */ + idlType; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser */ diff --git a/lib/productions/constructor.js b/lib/productions/constructor.js index 654c0bd1..4f4d1f93 100644 --- a/lib/productions/constructor.js +++ b/lib/productions/constructor.js @@ -1,7 +1,12 @@ import { Base } from "./base.js"; import { argument_list, autoParenter } from "./helpers.js"; +/** @import {Argument} from "./argument.js" */ + export class Constructor extends Base { + /** @type {Argument[]} */ + arguments; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser */ diff --git a/lib/productions/container.js b/lib/productions/container.js index 95bba91c..59ff92b4 100644 --- a/lib/productions/container.js +++ b/lib/productions/container.js @@ -2,8 +2,10 @@ import { Base } from "./base.js"; import { ExtendedAttributes } from "./extended-attributes.js"; import { unescape, autoParenter } from "./helpers.js"; +/** @import {Tokeniser} from "../tokeniser.js" */ + /** - * @param {import("../tokeniser.js").Tokeniser} tokeniser + * @param {Tokeniser} tokeniser */ function inheritance(tokeniser) { const colon = tokeniser.consume(":"); @@ -19,7 +21,7 @@ function inheritance(tokeniser) { /** * Parser callback. * @callback ParserCallback - * @param {import("../tokeniser.js").Tokeniser} tokeniser + * @param {Tokeniser} tokeniser * @param {...*} args */ @@ -30,45 +32,11 @@ function inheritance(tokeniser) { */ export class Container extends Base { - /** - * @param {import("../tokeniser.js").Tokeniser} tokeniser - * @param {*} instance TODO: This should be {T extends Container}, but see https://github.com/microsoft/TypeScript/issues/4628 - * @param {*} args - */ - static parse(tokeniser, instance, { inheritable, allowedMembers }) { - const { tokens, type } = instance; - tokens.name = - tokeniser.consumeKind("identifier") || - tokeniser.error(`Missing name in ${type}`); - tokeniser.current = instance; - instance = autoParenter(instance); - if (inheritable) { - Object.assign(tokens, inheritance(tokeniser)); - } - tokens.open = tokeniser.consume("{") || tokeniser.error(`Bodyless ${type}`); - instance.members = []; - while (true) { - tokens.close = tokeniser.consume("}"); - if (tokens.close) { - tokens.termination = - tokeniser.consume(";") || - tokeniser.error(`Missing semicolon after ${type}`); - return instance.this; - } - const ea = ExtendedAttributes.parse(tokeniser); - let mem; - for (const [parser, ...args] of allowedMembers) { - mem = autoParenter(parser(tokeniser, ...args)); - if (mem) { - break; - } - } - if (!mem) { - tokeniser.error("Unknown member"); - } - mem.extAttrs = ea; - instance.members.push(mem.this); - } + /** @type {any[]} */ + members; + + get type() { + return ""; } get partial() { @@ -125,3 +93,50 @@ export class Container extends Base { ); } } + +/** + * @param {Tokeniser} tokeniser + * @param {Container} instance + * @param {object} args + * @param {boolean} [args.inheritable] + * @param {AllowedMember[]} [args.allowedMembers] + */ +export function parseContainer( + tokeniser, + instance, + { inheritable, allowedMembers }, +) { + const { tokens, type } = instance; + tokens.name = + tokeniser.consumeKind("identifier") || + tokeniser.error(`Missing name in ${type}`); + tokeniser.current = instance; + instance = autoParenter(instance); + if (inheritable) { + Object.assign(tokens, inheritance(tokeniser)); + } + tokens.open = tokeniser.consume("{") || tokeniser.error(`Bodyless ${type}`); + instance.members = []; + while (true) { + tokens.close = tokeniser.consume("}"); + if (tokens.close) { + tokens.termination = + tokeniser.consume(";") || + tokeniser.error(`Missing semicolon after ${type}`); + return instance.this; + } + const ea = ExtendedAttributes.parse(tokeniser); + let mem; + for (const [parser, ...args] of allowedMembers) { + mem = autoParenter(parser(tokeniser, ...args)); + if (mem) { + break; + } + } + if (!mem) { + tokeniser.error("Unknown member"); + } + mem.extAttrs = ea; + instance.members.push(mem.this); + } +} diff --git a/lib/productions/default.js b/lib/productions/default.js index ae5adf52..2acd3816 100644 --- a/lib/productions/default.js +++ b/lib/productions/default.js @@ -1,7 +1,12 @@ import { Base } from "./base.js"; import { const_data, const_value } from "./helpers.js"; +/** @import {Token} from "../tokeniser.js" */ + export class Default extends Base { + /** @type {Token[]} */ + expression; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser */ diff --git a/lib/productions/dictionary.js b/lib/productions/dictionary.js index f1faef4b..1b4896c9 100644 --- a/lib/productions/dictionary.js +++ b/lib/productions/dictionary.js @@ -1,4 +1,4 @@ -import { Container } from "./container.js"; +import { Container, parseContainer } from "./container.js"; import { Field } from "./field.js"; export class Dictionary extends Container { @@ -14,7 +14,7 @@ export class Dictionary extends Container { if (!tokens.base) { return; } - return Container.parse( + return parseContainer( tokeniser, new Dictionary({ source: tokeniser.source, tokens }), { diff --git a/lib/productions/enum.js b/lib/productions/enum.js index c581c3c3..429b8624 100644 --- a/lib/productions/enum.js +++ b/lib/productions/enum.js @@ -35,6 +35,9 @@ export class EnumValue extends WrappedToken { } export class Enum extends Base { + /** @type {EnumValue[]} */ + values; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser */ diff --git a/lib/productions/extended-attributes.js b/lib/productions/extended-attributes.js index a0fbaf66..a996f278 100644 --- a/lib/productions/extended-attributes.js +++ b/lib/productions/extended-attributes.js @@ -50,7 +50,12 @@ function extAttrListItems(tokeniser) { ); } +/** @import {Argument} from "./argument.js" */ + export class ExtendedAttributeParameters extends Base { + /** @type {WrappedToken[] | Argument[]} */ + list; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser */ @@ -121,6 +126,9 @@ export class ExtendedAttributeParameters extends Base { } export class SimpleExtendedAttribute extends Base { + /** @type {ExtendedAttributeParameters} */ + params; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser */ @@ -138,7 +146,7 @@ export class SimpleExtendedAttribute extends Base { constructor({ source, tokens, params }) { super({ source, tokens }); params.parent = this; - Object.defineProperty(this, "params", { value: params }); + Object.defineProperty(this, "params", { value: params, enumerable: false }); } get type() { diff --git a/lib/productions/field.js b/lib/productions/field.js index 1cd44ed7..7353c2c3 100644 --- a/lib/productions/field.js +++ b/lib/productions/field.js @@ -7,7 +7,14 @@ import { import { ExtendedAttributes } from "./extended-attributes.js"; import { Default } from "./default.js"; +/** @import {Type} from "./type.js" */ + export class Field extends Base { + /** @type {Type} */ + idlType; + /** @type {Default} */ + default; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser */ diff --git a/lib/productions/index.js b/lib/productions/index.js index 4ea3dc22..3db2d05a 100644 --- a/lib/productions/index.js +++ b/lib/productions/index.js @@ -3,7 +3,7 @@ export { Attribute } from "./attribute.js"; export { Base } from "./base.js"; export { Constant } from "./constant.js"; export { Constructor } from "./constructor.js"; -export { Container } from "./container.js"; +export { Container, parseContainer } from "./container.js"; export { Default } from "./default.js"; export { ExtendedAttributes, diff --git a/lib/productions/interface.js b/lib/productions/interface.js index e196cede..c568e8dc 100644 --- a/lib/productions/interface.js +++ b/lib/productions/interface.js @@ -1,4 +1,4 @@ -import { Container } from "./container.js"; +import { Container, parseContainer } from "./container.js"; import { Attribute } from "./attribute.js"; import { Operation } from "./operation.js"; import { Constant } from "./constant.js"; @@ -41,7 +41,7 @@ export class Interface extends Container { */ static parse(tokeniser, base, { extMembers = [], partial = null } = {}) { const tokens = { partial, base }; - return Container.parse( + return parseContainer( tokeniser, new Interface({ source: tokeniser.source, tokens }), { diff --git a/lib/productions/iterable.js b/lib/productions/iterable.js index 22041800..946c7c6f 100644 --- a/lib/productions/iterable.js +++ b/lib/productions/iterable.js @@ -6,7 +6,15 @@ import { argument_list, } from "./helpers.js"; +/** @import {Type} from "./type.js" */ +/** @import {Argument} from "./argument.js" */ + export class IterableLike extends Base { + /** @type {Type[]} */ + idlType; + /** @type {Argument[]} */ + arguments; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser */ diff --git a/lib/productions/mixin.js b/lib/productions/mixin.js index f4ed7ca6..594b9b71 100644 --- a/lib/productions/mixin.js +++ b/lib/productions/mixin.js @@ -1,4 +1,4 @@ -import { Container } from "./container.js"; +import { Container, parseContainer } from "./container.js"; import { Constant } from "./constant.js"; import { Attribute } from "./attribute.js"; import { Operation } from "./operation.js"; @@ -18,7 +18,7 @@ export class Mixin extends Container { if (!tokens.mixin) { return; } - return Container.parse( + return parseContainer( tokeniser, new Mixin({ source: tokeniser.source, tokens }), { diff --git a/lib/productions/namespace.js b/lib/productions/namespace.js index acbce430..1c63be9f 100644 --- a/lib/productions/namespace.js +++ b/lib/productions/namespace.js @@ -1,4 +1,4 @@ -import { Container } from "./container.js"; +import { Container, parseContainer } from "./container.js"; import { Attribute } from "./attribute.js"; import { Operation } from "./operation.js"; import { validationError } from "../error.js"; @@ -18,7 +18,7 @@ export class Namespace extends Container { if (!tokens.base) { return; } - return Container.parse( + return parseContainer( tokeniser, new Namespace({ source: tokeniser.source, tokens }), { diff --git a/lib/productions/operation.js b/lib/productions/operation.js index bec24a00..c9cf1fa5 100644 --- a/lib/productions/operation.js +++ b/lib/productions/operation.js @@ -7,7 +7,15 @@ import { } from "./helpers.js"; import { validationError } from "../error.js"; +/** @import {Type} from "./type.js" */ +/** @import {Argument} from "./argument.js" */ + export class Operation extends Base { + /** @type {Type} */ + idlType; + /** @type {Argument[]} */ + arguments; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser * @param {object} [options] diff --git a/lib/productions/type.js b/lib/productions/type.js index 393743d0..3d382550 100644 --- a/lib/productions/type.js +++ b/lib/productions/type.js @@ -155,6 +155,15 @@ function union_type(tokeniser, type) { } export class Type extends Base { + /** + * TODO: This kind of type check should ultimately be replaced by exposed constructors. + * See https://github.com/w3c/webidl2.js/issues/537 and https://github.com/w3c/webidl2.js/issues/297. + */ + /** @type {string | null} */ + type; + /** @type {Type[]} */ + subtype; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser * @param {string} typeName @@ -165,7 +174,11 @@ export class Type extends Base { constructor({ source, tokens }) { super({ source, tokens }); - Object.defineProperty(this, "subtype", { value: [], writable: true }); + Object.defineProperty(this, "subtype", { + value: [], + writable: true, + enumerable: false, + }); this.extAttrs = new ExtendedAttributes({ source, tokens: {} }); } diff --git a/lib/productions/typedef.js b/lib/productions/typedef.js index 031898f7..00d620fa 100644 --- a/lib/productions/typedef.js +++ b/lib/productions/typedef.js @@ -5,7 +5,12 @@ import { autoParenter, } from "./helpers.js"; +/** @import {Type} from "./type.js" */ + export class Typedef extends Base { + /** @type {Type} */ + idlType; + /** * @param {import("../tokeniser.js").Tokeniser} tokeniser */ diff --git a/lib/supplement.d.ts b/lib/supplement.d.ts deleted file mode 100644 index 52c70254..00000000 --- a/lib/supplement.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { ExtendedAttributes } from "./productions/extended-attributes.js"; -import { Type } from "./productions/type.js"; -import { Default } from "./productions/default.js"; -import { Token } from "./tokeniser.js"; -import { Argument } from "./productions/argument.js"; -import { WrappedToken } from "./productions/token.js"; -import { Base } from "./productions/base.js"; -import { Definitions } from "./validator.js"; -import { Writer } from "./writer.js"; - -declare module "./tokeniser.js" { - interface Tokeniser { - current: any; - // TODO: This somehow causes fatal error on typescript - // source: Token[] & { name?: string }; - } -} - -declare module "./productions/argument.js" { - interface Argument { - idlType: Type; - default: Default | null; - } -} - -declare module "./productions/attribute.js" { - interface Attribute { - idlType: Type; - default: Default | null; - } -} - -declare module "./productions/attribute.js" { - interface Attribute { - idlType: Type; - default: Default | null; - } -} - -declare module "./productions/callback.js" { - interface CallbackFunction { - idlType: Type; - arguments: Argument[]; - } -} - -declare module "./productions/constant.js" { - interface Constant { - idlType: Type; - } -} - - -declare module "./productions/constructor.js" { - interface Constructor { - arguments: Argument[]; - } -} - -declare module "./productions/container.js" { - interface TypedBase extends Base { - type: string - } - interface Container { - type: string; - members: RootType[]; - } -} - -declare module "./productions/default.js" { - interface Default { - expression: Token[]; - } -} - -declare module "./productions/enum.js" { - interface Enum { - values: EnumValue[]; - } -} - -declare module "./productions/field.js" { - interface Field { - idlType: Type; - default: Default | null; - } -} - -declare module "./productions/iterable.js" { - interface IterableLike { - idlType: Type[]; - arguments: Argument[]; - } -} - -declare module "./productions/operation.js" { - interface Operation { - idlType: Type; - arguments: Argument[]; - } -} - -declare module "./productions/typedef.js" { - interface Typedef { - idlType: Type; - } -} - -declare module "./productions/extended-attributes.js" { - interface ExtendedAttributeParameters { - list: WrappedToken[] | Argument[]; - } - interface SimpleExtendedAttribute { - params: ExtendedAttributeParameters; - } -} - -declare module "./productions/base.js" { - interface Base { - tokens: Record; - source: Token[]; - extAttrs: ExtendedAttributes | undefined; - this: this; - parent?: any; - - validate?(defs: Definitions): IterableIterator; - write(w: Writer): any; - } -} - -declare module "./productions/array-base.js" { - interface ArrayBase { - tokens: Record; - source: Token[]; - parent?: any; - } -} - -declare module "./productions/type.js" { - interface Type { - /** - * TODO: This kind of type check should ultimately be replaced by exposed constructors. - * See https://github.com/w3c/webidl2.js/issues/537 and https://github.com/w3c/webidl2.js/issues/297. - */ - type: string | null; - subtype: Type[]; - } -} - -declare global { - export type ArrayItemType = T extends Array ? X : null; -} diff --git a/lib/tokeniser.js b/lib/tokeniser.js index a934c52a..4049dae3 100644 --- a/lib/tokeniser.js +++ b/lib/tokeniser.js @@ -1,6 +1,8 @@ import { syntaxError } from "./error.js"; import { unescape } from "./productions/helpers.js"; +/** @import {Base} from "./productions/base.js" */ + // These regular expressions use the sticky flag so they will only match at // the current location (ie. the offset of lastIndex). const tokenRe = { @@ -122,7 +124,8 @@ const reserved = [ ]; /** - * @typedef {ArrayItemType>} Token + * @typedef {ReturnType[number]} Token + * @typedef {Token[] & { name?: string }} Source * @param {string} str */ function tokenise(str) { @@ -231,6 +234,11 @@ function tokenise(str) { } export class Tokeniser { + /** @type {Base} */ + current; + /** @type {Source} */ + source; + /** * @param {string} idl */ diff --git a/lib/webidl2.js b/lib/webidl2.js index 26a020ad..f13e297f 100644 --- a/lib/webidl2.js +++ b/lib/webidl2.js @@ -12,6 +12,8 @@ import { CallbackInterface } from "./productions/callback-interface.js"; import { autoParenter } from "./productions/helpers.js"; import { Eof } from "./productions/token.js"; +/** @import { Base } from "./productions/base.js" */ + /** @typedef {'callbackInterface'|'dictionary'|'interface'|'mixin'|'namespace'} ExtendableInterfaces */ /** @typedef {{ extMembers?: import("./productions/container.js").AllowedMember[]}} Extension */ /** @typedef {Partial>} Extensions */ @@ -21,7 +23,7 @@ import { Eof } from "./productions/token.js"; * @typedef {Object} ParserOptions * @property {string} [sourceName] * @property {boolean} [concrete] - * @property {Function[]} [productions] + * @property {((tokeniser: Tokeniser) => Base)[]} [productions] * @property {Extensions} [extensions] */ diff --git a/lib/writer.js b/lib/writer.js index 90ab8dd8..7ec9780c 100644 --- a/lib/writer.js +++ b/lib/writer.js @@ -1,8 +1,39 @@ +/** @import { Base } from "./productions/base.js" */ +/** @import { Token } from "./tokeniser.js" */ + +/** + * @template T + * @param {T} arg + */ function noop(arg) { return arg; } +/** + * @typedef {object} TemplateContext + * @property {Base} data + * @property {Base} parent + */ + +/** + * @template T + * @typedef {object} WriteTemplates + * @property {(items: (T | string)[]) => T} wrap + * @property {(trivia: string) => T} trivia + * @property {(escaped: string, context: TemplateContext) => T} name + * @property {(escaped: string, unescaped: string, context: Base) => T} reference + * @property {(type: T) => T} type + * @property {(name: string) => T} generic + * @property {(keyword: string, context: TemplateContext) => T} nameless + * @property {(inheritable: T) => T} inheritance + * @property {(content: T, context: TemplateContext) => T} definition + * @property {(content: T) => T} extendedAttribute + * @property {(content: string) => T} extendedAttributeReference + */ + +/** @type {WriteTemplates} */ const templates = { + /** @type {(items: any[]) => string} */ wrap: (items) => items.join(""), trivia: noop, name: noop, @@ -16,7 +47,14 @@ const templates = { extendedAttributeReference: noop, }; +/** @template T */ export class Writer { + /** @type {WriteTemplates} */ + ts; + + /** + * @param {WriteTemplates} ts + */ constructor(ts) { this.ts = Object.assign({}, templates, ts); } @@ -25,8 +63,7 @@ export class Writer { * @param {string} raw * @param {object} options * @param {string} [options.unescaped] - * @param {import("./productions/base.js").Base} [options.context] - * @returns + * @param {Base} [options.context] */ reference(raw, { unescaped, context }) { if (!unescaped) { @@ -36,16 +73,30 @@ export class Writer { } /** - * @param {import("./tokeniser.js").Token} t - * @param {Function} wrapper - * @param {...any} args - * @returns + * @overload + * @param {Token} t + * @param {(tokenValue: string, options: { context: Base }) => T | string} wrapper + * @param {object} options + * @param {Base} options.context + * @returns {T | string} + */ + /** + * @overload + * @param {Token} t + * @param {(tokenValue: string, context: TemplateContext) => T | string} [wrapper] + * @param {TemplateContext} [context] + * @returns {T | string} + */ + /** + * @param {Token} t + * @param {(tokenValue: string, context: any) => T | string} [wrapper] + * @param {any} [context] */ - token(t, wrapper = noop, ...args) { + token(t, wrapper = noop, context) { if (!t) { return ""; } - const value = wrapper(t.value, ...args); + const value = wrapper(t.value, context); return this.ts.wrap([this.ts.trivia(t.trivia), value]); } @@ -65,9 +116,29 @@ export class Writer { } } +/** + * @overload + * @param {Base[]} ast + * @returns {string} + */ +/** + * @template T + * @overload + * @param {Base[]} ast + * @param {object} options + * @param {WriteTemplates} [options.templates] + * @returns {T} + */ +/** + * @param {Base[]} ast + * @param {object} options + * @param {WriteTemplates} [options.templates] + * @returns {unknown} + */ export function write(ast, { templates: ts = templates } = {}) { ts = Object.assign({}, templates, ts); + /** @type {Writer} */ const w = new Writer(ts); return ts.wrap(ast.map((it) => it.write(w))); diff --git a/package-lock.json b/package-lock.json index feef1d1a..61c932df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,8 @@ "mocha": "^11.7.1", "prettier": "^3.6.2", "terser-webpack-plugin": "^5.3.14", - "typescript": "^5.9.2", + "typescript": "^5.8.3", + "typescript-eslint": "^8.38.0", "webpack": "^5.101.0", "webpack-cli": "^6.0.1" }, @@ -77,16 +78,20 @@ "license": "Apache-2.0" }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } @@ -488,6 +493,44 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -619,6 +662,290 @@ "dev": true, "license": "MIT" }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.38.0.tgz", + "integrity": "sha512-CPoznzpuAnIOl4nhj4tRr4gIPj5AfKgkiJmGQDaq+fQnRJTYlcBjbX3wbciGmpoPf8DREufuPRe1tNMZnGdanA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.38.0", + "@typescript-eslint/type-utils": "8.38.0", + "@typescript-eslint/utils": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.38.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.38.0.tgz", + "integrity": "sha512-Zhy8HCvBUEfBECzIl1PKqF4p11+d0aUJS1GeUiuqK9WmOug8YCmC4h4bjyBvMyAMI9sbRczmrYL5lKg/YMbrcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.38.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.38.0.tgz", + "integrity": "sha512-dbK7Jvqcb8c9QfH01YB6pORpqX1mn5gDZc9n63Ak/+jD67oWXn3Gs0M6vddAN+eDXBCS5EmNWzbSxsn9SzFWWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.38.0", + "@typescript-eslint/types": "^8.38.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.38.0.tgz", + "integrity": "sha512-WJw3AVlFFcdT9Ri1xs/lg8LwDqgekWXWhH3iAF+1ZM+QPd7oxQ6jvtW/JPwzAScxitILUIFs0/AnQ/UWHzbATQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.38.0.tgz", + "integrity": "sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.38.0.tgz", + "integrity": "sha512-c7jAvGEZVf0ao2z+nnz8BUaHZD09Agbh+DY7qvBQqLiz8uJzRgVPj5YvOh8I8uEiH8oIUGIfHzMwUcGVco/SJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0", + "@typescript-eslint/utils": "8.38.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.38.0.tgz", + "integrity": "sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.38.0.tgz", + "integrity": "sha512-fooELKcAKzxux6fA6pxOflpNS0jc+nOQEEOipXFNjSlBS6fqrJOVY/whSn70SScHrcJ2LDsxWrneFoWYSVfqhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.38.0", + "@typescript-eslint/tsconfig-utils": "8.38.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.38.0.tgz", + "integrity": "sha512-hHcMA86Hgt+ijJlrD8fX0j1j8w4C92zue/8LOPAFioIno+W0+L7KqE8QZKCcPGc/92Vs9x36w/4MPTJhqXdyvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.38.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.38.0.tgz", + "integrity": "sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.38.0", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", @@ -2192,6 +2519,23 @@ "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", "dev": true }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -2217,6 +2561,16 @@ "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", "dev": true }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -2423,6 +2777,19 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", @@ -2500,6 +2867,13 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, "node_modules/has-bigints": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", @@ -3469,6 +3843,16 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -3977,6 +4361,27 @@ "node": ">=6" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -4128,6 +4533,41 @@ "node": ">=4" } }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-array-concat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", @@ -4726,6 +5166,19 @@ "node": ">=8.0" } }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -4831,10 +5284,11 @@ } }, "node_modules/typescript": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", - "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4843,6 +5297,30 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.38.0.tgz", + "integrity": "sha512-FsZlrYK6bPDGoLeZRuvx2v6qrM03I0U0SnfCLPs/XCCPCFD80xU9Pg09H/K+XFa68uJuZo7l/Xhs+eDRg2l3hg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.38.0", + "@typescript-eslint/parser": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0", + "@typescript-eslint/utils": "8.38.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, "node_modules/unbox-primitive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", @@ -5319,12 +5797,12 @@ "dev": true }, "@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", "dev": true, "requires": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" } }, "@eslint-community/regexpp": { @@ -5603,6 +6081,32 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, "@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -5717,6 +6221,165 @@ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.38.0.tgz", + "integrity": "sha512-CPoznzpuAnIOl4nhj4tRr4gIPj5AfKgkiJmGQDaq+fQnRJTYlcBjbX3wbciGmpoPf8DREufuPRe1tNMZnGdanA==", + "dev": true, + "requires": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.38.0", + "@typescript-eslint/type-utils": "8.38.0", + "@typescript-eslint/utils": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "dependencies": { + "ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true + } + } + }, + "@typescript-eslint/parser": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.38.0.tgz", + "integrity": "sha512-Zhy8HCvBUEfBECzIl1PKqF4p11+d0aUJS1GeUiuqK9WmOug8YCmC4h4bjyBvMyAMI9sbRczmrYL5lKg/YMbrcQ==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "8.38.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/project-service": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.38.0.tgz", + "integrity": "sha512-dbK7Jvqcb8c9QfH01YB6pORpqX1mn5gDZc9n63Ak/+jD67oWXn3Gs0M6vddAN+eDXBCS5EmNWzbSxsn9SzFWWg==", + "dev": true, + "requires": { + "@typescript-eslint/tsconfig-utils": "^8.38.0", + "@typescript-eslint/types": "^8.38.0", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/scope-manager": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.38.0.tgz", + "integrity": "sha512-WJw3AVlFFcdT9Ri1xs/lg8LwDqgekWXWhH3iAF+1ZM+QPd7oxQ6jvtW/JPwzAScxitILUIFs0/AnQ/UWHzbATQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0" + } + }, + "@typescript-eslint/tsconfig-utils": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.38.0.tgz", + "integrity": "sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ==", + "dev": true, + "requires": {} + }, + "@typescript-eslint/type-utils": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.38.0.tgz", + "integrity": "sha512-c7jAvGEZVf0ao2z+nnz8BUaHZD09Agbh+DY7qvBQqLiz8uJzRgVPj5YvOh8I8uEiH8oIUGIfHzMwUcGVco/SJg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0", + "@typescript-eslint/utils": "8.38.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + } + }, + "@typescript-eslint/types": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.38.0.tgz", + "integrity": "sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.38.0.tgz", + "integrity": "sha512-fooELKcAKzxux6fA6pxOflpNS0jc+nOQEEOipXFNjSlBS6fqrJOVY/whSn70SScHrcJ2LDsxWrneFoWYSVfqhQ==", + "dev": true, + "requires": { + "@typescript-eslint/project-service": "8.38.0", + "@typescript-eslint/tsconfig-utils": "8.38.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true + } + } + }, + "@typescript-eslint/utils": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.38.0.tgz", + "integrity": "sha512-hHcMA86Hgt+ijJlrD8fX0j1j8w4C92zue/8LOPAFioIno+W0+L7KqE8QZKCcPGc/92Vs9x36w/4MPTJhqXdyvg==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.38.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.38.0.tgz", + "integrity": "sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g==", + "dev": true, + "requires": { + "@typescript-eslint/types": "8.38.0", + "eslint-visitor-keys": "^4.2.1" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true + } + } + }, "@webassemblyjs/ast": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", @@ -6858,6 +7521,19 @@ "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", "dev": true }, + "fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + } + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -6882,6 +7558,15 @@ "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", "dev": true }, + "fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, "file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -7046,6 +7731,15 @@ } } }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", @@ -7080,6 +7774,12 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "has-bigints": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", @@ -7745,6 +8445,12 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, "micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -8122,6 +8828,12 @@ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -8228,6 +8940,21 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, + "reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "safe-array-concat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", @@ -8634,6 +9361,13 @@ "is-number": "^7.0.0" } }, + "ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "requires": {} + }, "tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -8715,11 +9449,23 @@ } }, "typescript": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", - "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true }, + "typescript-eslint": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.38.0.tgz", + "integrity": "sha512-FsZlrYK6bPDGoLeZRuvx2v6qrM03I0U0SnfCLPs/XCCPCFD80xU9Pg09H/K+XFa68uJuZo7l/Xhs+eDRg2l3hg==", + "dev": true, + "requires": { + "@typescript-eslint/eslint-plugin": "8.38.0", + "@typescript-eslint/parser": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0", + "@typescript-eslint/utils": "8.38.0" + } + }, "unbox-primitive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", diff --git a/package.json b/package.json index b3805161..9e8766d0 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "mocha": "^11.7.1", "prettier": "^3.6.2", "terser-webpack-plugin": "^5.3.14", - "typescript": "^5.9.2", + "typescript": "^5.8.3", + "typescript-eslint": "^8.38.0", "webpack": "^5.101.0", "webpack-cli": "^6.0.1" }, diff --git a/test/syntax/baseline/allowany.json b/test/syntax/baseline/allowany.json index 0dadf272..a418e3f0 100644 --- a/test/syntax/baseline/allowany.json +++ b/test/syntax/baseline/allowany.json @@ -3,10 +3,12 @@ "type": "interface", "name": "B", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "g", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -16,12 +18,12 @@ "idlType": "undefined" }, "arguments": [], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "g", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -48,12 +50,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "g", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -87,11 +89,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/argument-constructor.json b/test/syntax/baseline/argument-constructor.json index 39473b58..a145955f 100644 --- a/test/syntax/baseline/argument-constructor.json +++ b/test/syntax/baseline/argument-constructor.json @@ -3,10 +3,22 @@ "type": "interface", "name": "Foo", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Exposed", + "rhs": { + "type": "identifier", + "value": "Window" + }, + "arguments": [] + } + ], "members": [ { "type": "operation", "name": "foo", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -33,21 +45,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Exposed", - "rhs": { - "type": "identifier", - "value": "Window" - }, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/argument-extattrs.json b/test/syntax/baseline/argument-extattrs.json index 9df419ef..25652906 100644 --- a/test/syntax/baseline/argument-extattrs.json +++ b/test/syntax/baseline/argument-extattrs.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Foo", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "foo", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -47,11 +49,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/async-iterable.json b/test/syntax/baseline/async-iterable.json index ab43a645..9d2e66fb 100644 --- a/test/syntax/baseline/async-iterable.json +++ b/test/syntax/baseline/async-iterable.json @@ -3,9 +3,11 @@ "type": "interface", "name": "AsyncIterable", "inheritance": null, + "extAttrs": [], "members": [ { "type": "async_iterable", + "extAttrs": [], "idlType": [ { "type": null, @@ -25,21 +27,21 @@ } ], "arguments": [], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "AsyncIterableWithExtAttr", "inheritance": null, + "extAttrs": [], "members": [ { "type": "async_iterable", + "extAttrs": [], "idlType": [ { "type": null, @@ -73,21 +75,21 @@ } ], "arguments": [], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "AsyncIterableWithNoParam", "inheritance": null, + "extAttrs": [], "members": [ { "type": "async_iterable", + "extAttrs": [], "idlType": [ { "type": null, @@ -107,21 +109,21 @@ } ], "arguments": [], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "AsyncIterableWithParam", "inheritance": null, + "extAttrs": [], "members": [ { "type": "async_iterable", + "extAttrs": [], "idlType": [ { "type": null, @@ -158,21 +160,21 @@ "variadic": false } ], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "AsyncValueIterable", "inheritance": null, + "extAttrs": [], "members": [ { "type": "async_iterable", + "extAttrs": [], "idlType": [ { "type": null, @@ -184,21 +186,21 @@ } ], "arguments": [], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "AsyncValueIterableWithNoParam", "inheritance": null, + "extAttrs": [], "members": [ { "type": "async_iterable", + "extAttrs": [], "idlType": [ { "type": null, @@ -210,21 +212,21 @@ } ], "arguments": [], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "AsyncValueIterableWithParams", "inheritance": null, + "extAttrs": [], "members": [ { "type": "async_iterable", + "extAttrs": [], "idlType": [ { "type": null, @@ -269,12 +271,10 @@ "variadic": false } ], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/async-name.json b/test/syntax/baseline/async-name.json index 128fc32c..edd1c4c1 100644 --- a/test/syntax/baseline/async-name.json +++ b/test/syntax/baseline/async-name.json @@ -3,10 +3,22 @@ "type": "interface", "name": "Async", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Exposed", + "rhs": { + "type": "identifier", + "value": "Window" + }, + "arguments": [] + } + ], "members": [ { "type": "attribute", "name": "async", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +27,13 @@ "union": false, "idlType": "boolean" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "operation", "name": "asyncOp", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -48,21 +60,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Exposed", - "rhs": { - "type": "identifier", - "value": "Window" - }, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/async-sequence.json b/test/syntax/baseline/async-sequence.json index 6978e1fd..a9a47267 100644 --- a/test/syntax/baseline/async-sequence.json +++ b/test/syntax/baseline/async-sequence.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Canvas", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "drawPolygonAsync", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -51,21 +53,21 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "I", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "f1", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -117,11 +119,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/attributes.json b/test/syntax/baseline/attributes.json index 5b863957..8a732ea6 100644 --- a/test/syntax/baseline/attributes.json +++ b/test/syntax/baseline/attributes.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Person", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "age", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +17,13 @@ "union": false, "idlType": "unsigned short" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "required", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -30,12 +32,10 @@ "union": false, "idlType": "any" }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/bigint.json b/test/syntax/baseline/bigint.json index 3c86d493..18358d48 100644 --- a/test/syntax/baseline/bigint.json +++ b/test/syntax/baseline/bigint.json @@ -3,10 +3,22 @@ "type": "interface", "name": "Interface", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Exposed", + "rhs": { + "type": "identifier", + "value": "Window" + }, + "arguments": [] + } + ], "members": [ { "type": "attribute", "name": "bigint", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +27,13 @@ "union": false, "idlType": "bigint" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "operation", "name": "getBig", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -31,12 +43,12 @@ "idlType": "bigint" }, "arguments": [], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "setBig", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -63,27 +75,16 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Exposed", - "rhs": { - "type": "identifier", - "value": "Window" - }, - "arguments": [] - } - ], "partial": false }, { "type": "dictionary", "name": "Dictionary", "inheritance": null, + "extAttrs": [], "members": [ { "type": "field", @@ -116,12 +117,12 @@ "required": true } ], - "extAttrs": [], "partial": false }, { "type": "typedef", "name": "allowed", + "extAttrs": [], "idlType": { "type": "typedef-type", "extAttrs": [], @@ -146,8 +147,7 @@ "idlType": "short" } ] - }, - "extAttrs": [] + } }, { "type": "eof", diff --git a/test/syntax/baseline/buffersource.json b/test/syntax/baseline/buffersource.json index ed5382e9..a014c495 100644 --- a/test/syntax/baseline/buffersource.json +++ b/test/syntax/baseline/buffersource.json @@ -3,10 +3,22 @@ "type": "interface", "name": "Buffer", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Exposed", + "rhs": { + "type": "identifier", + "value": "Window" + }, + "arguments": [] + } + ], "members": [ { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -33,12 +45,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -65,12 +77,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -97,12 +109,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -129,12 +141,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -161,12 +173,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -193,12 +205,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -225,12 +237,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -257,12 +269,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -289,12 +301,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -321,12 +333,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -353,12 +365,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -385,12 +397,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "add", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -417,12 +429,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "addAny", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -449,12 +461,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "addBuffer", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -481,12 +493,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "addView", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -513,21 +525,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Exposed", - "rhs": { - "type": "identifier", - "value": "Window" - }, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/callback.json b/test/syntax/baseline/callback.json index 519be46b..c2239fc2 100644 --- a/test/syntax/baseline/callback.json +++ b/test/syntax/baseline/callback.json @@ -2,6 +2,7 @@ { "type": "callback", "name": "AsyncOperationCallback", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -27,17 +28,18 @@ "optional": false, "variadic": false } - ], - "extAttrs": [] + ] }, { "type": "callback interface", "name": "EventHandler", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "eventOccurred", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -64,16 +66,15 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { "type": "callback", "name": "SortCallback", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -115,8 +116,7 @@ "optional": false, "variadic": false } - ], - "extAttrs": [] + ] }, { "type": "eof", diff --git a/test/syntax/baseline/constants.json b/test/syntax/baseline/constants.json index 937c5c35..faf34f8e 100644 --- a/test/syntax/baseline/constants.json +++ b/test/syntax/baseline/constants.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Util", "inheritance": null, + "extAttrs": [], "members": [ { "type": "const", "name": "DEBUG", + "extAttrs": [], "idlType": { "type": "const-type", "extAttrs": [], @@ -15,7 +17,6 @@ "union": false, "idlType": "boolean" }, - "extAttrs": [], "value": { "type": "boolean", "value": false @@ -24,6 +25,7 @@ { "type": "const", "name": "negative", + "extAttrs": [], "idlType": { "type": "const-type", "extAttrs": [], @@ -32,7 +34,6 @@ "union": false, "idlType": "short" }, - "extAttrs": [], "value": { "type": "number", "value": "-1" @@ -41,6 +42,7 @@ { "type": "const", "name": "LF", + "extAttrs": [], "idlType": { "type": "const-type", "extAttrs": [], @@ -49,7 +51,6 @@ "union": false, "idlType": "octet" }, - "extAttrs": [], "value": { "type": "number", "value": "10" @@ -58,6 +59,7 @@ { "type": "const", "name": "BIT_MASK", + "extAttrs": [], "idlType": { "type": "const-type", "extAttrs": [], @@ -66,7 +68,6 @@ "union": false, "idlType": "unsigned long" }, - "extAttrs": [], "value": { "type": "number", "value": "0x0000fc00" @@ -75,6 +76,7 @@ { "type": "const", "name": "AVOGADRO", + "extAttrs": [], "idlType": { "type": "const-type", "extAttrs": [], @@ -83,7 +85,6 @@ "union": false, "idlType": "float" }, - "extAttrs": [], "value": { "type": "number", "value": "6.022e23" @@ -92,6 +93,7 @@ { "type": "const", "name": "sobig", + "extAttrs": [], "idlType": { "type": "const-type", "extAttrs": [], @@ -100,7 +102,6 @@ "union": false, "idlType": "unrestricted float" }, - "extAttrs": [], "value": { "type": "Infinity", "negative": false @@ -109,6 +110,7 @@ { "type": "const", "name": "minusonedividedbyzero", + "extAttrs": [], "idlType": { "type": "const-type", "extAttrs": [], @@ -117,7 +119,6 @@ "union": false, "idlType": "unrestricted double" }, - "extAttrs": [], "value": { "type": "Infinity", "negative": true @@ -126,6 +127,7 @@ { "type": "const", "name": "notanumber", + "extAttrs": [], "idlType": { "type": "const-type", "extAttrs": [], @@ -134,7 +136,6 @@ "union": false, "idlType": "short" }, - "extAttrs": [], "value": { "type": "NaN" } @@ -142,6 +143,7 @@ { "type": "const", "name": "const", + "extAttrs": [], "idlType": { "type": "const-type", "extAttrs": [], @@ -150,14 +152,12 @@ "union": false, "idlType": "boolean" }, - "extAttrs": [], "value": { "type": "boolean", "value": true } } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/constructor.json b/test/syntax/baseline/constructor.json index e18fecc2..ca180dde 100644 --- a/test/syntax/baseline/constructor.json +++ b/test/syntax/baseline/constructor.json @@ -3,14 +3,16 @@ "type": "interface", "name": "Circle", "inheritance": null, + "extAttrs": [], "members": [ { "type": "constructor", - "arguments": [], - "extAttrs": [] + "extAttrs": [], + "arguments": [] }, { "type": "constructor", + "extAttrs": [], "arguments": [ { "type": "argument", @@ -28,11 +30,11 @@ "optional": false, "variadic": false } - ], - "extAttrs": [] + ] }, { "type": "constructor", + "extAttrs": [], "arguments": [ { "type": "argument", @@ -48,16 +50,25 @@ }, "default": { "type": "string", + "expression": [ + { + "type": "string", + "value": "\"\"", + "trivia": " ", + "line": 5, + "index": 19 + } + ], "value": "" }, "optional": true, "variadic": false } - ], - "extAttrs": [] + ] }, { "type": "constructor", + "extAttrs": [], "arguments": [ { "type": "argument", @@ -84,11 +95,11 @@ "optional": false, "variadic": false } - ], - "extAttrs": [] + ] }, { "type": "constructor", + "extAttrs": [], "arguments": [ { "type": "argument", @@ -123,12 +134,12 @@ "optional": false, "variadic": false } - ], - "extAttrs": [] + ] }, { "type": "attribute", "name": "r", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -137,13 +148,13 @@ "union": false, "idlType": "float" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "cx", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -152,13 +163,13 @@ "union": false, "idlType": "float" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "cy", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -167,13 +178,13 @@ "union": false, "idlType": "float" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "circumference", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -182,12 +193,10 @@ "union": false, "idlType": "float" }, - "extAttrs": [], "special": "", "readonly": true } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/default.json b/test/syntax/baseline/default.json index 896056a5..580de0a6 100644 --- a/test/syntax/baseline/default.json +++ b/test/syntax/baseline/default.json @@ -3,6 +3,7 @@ "type": "dictionary", "name": "LookupOptions", "inheritance": null, + "extAttrs": [], "members": [ { "type": "field", @@ -18,22 +19,42 @@ }, "default": { "type": "boolean", + "expression": [ + { + "type": "inline", + "value": "false", + "trivia": " ", + "line": 5, + "index": 6 + } + ], "value": false }, "required": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "AddressBook", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Exposed", + "rhs": { + "type": "identifier", + "value": "Window" + }, + "arguments": [] + } + ], "members": [ { "type": "operation", "name": "hasAddressForName", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -72,27 +93,31 @@ "idlType": "LookupOptions" }, "default": { - "type": "dictionary" + "type": "dictionary", + "expression": [ + { + "type": "inline", + "value": "{", + "trivia": " ", + "line": 10, + "index": 28 + }, + { + "type": "inline", + "value": "}", + "trivia": "", + "line": 10, + "index": 29 + } + ] }, "optional": true, "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Exposed", - "rhs": { - "type": "identifier", - "value": "Window" - }, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/dictionary-inherits.json b/test/syntax/baseline/dictionary-inherits.json index 8973a240..a19ae029 100644 --- a/test/syntax/baseline/dictionary-inherits.json +++ b/test/syntax/baseline/dictionary-inherits.json @@ -3,6 +3,7 @@ "type": "dictionary", "name": "PaintOptions", "inheritance": null, + "extAttrs": [], "members": [ { "type": "field", @@ -18,6 +19,15 @@ }, "default": { "type": "string", + "expression": [ + { + "type": "string", + "value": "\"black\"", + "trivia": " ", + "line": 2, + "index": 7 + } + ], "value": "black" }, "required": false @@ -35,7 +45,16 @@ "idlType": "DOMString" }, "default": { - "type": "null" + "type": "null", + "expression": [ + { + "type": "inline", + "value": "null", + "trivia": " ", + "line": 3, + "index": 13 + } + ] }, "required": false }, @@ -55,13 +74,13 @@ "required": false } ], - "extAttrs": [], "partial": false }, { "type": "dictionary", "name": "WetPaintOptions", "inheritance": "PaintOptions", + "extAttrs": [], "members": [ { "type": "field", @@ -79,7 +98,6 @@ "required": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/dictionary.json b/test/syntax/baseline/dictionary.json index 94e6c994..bd36a60b 100644 --- a/test/syntax/baseline/dictionary.json +++ b/test/syntax/baseline/dictionary.json @@ -3,6 +3,7 @@ "type": "dictionary", "name": "PaintOptions", "inheritance": null, + "extAttrs": [], "members": [ { "type": "field", @@ -18,6 +19,15 @@ }, "default": { "type": "string", + "expression": [ + { + "type": "string", + "value": "\"black\"", + "trivia": " ", + "line": 3, + "index": 7 + } + ], "value": "black" }, "required": false @@ -35,7 +45,16 @@ "idlType": "DOMString" }, "default": { - "type": "null" + "type": "null", + "expression": [ + { + "type": "inline", + "value": "null", + "trivia": " ", + "line": 4, + "index": 13 + } + ] }, "required": false }, @@ -77,6 +96,22 @@ }, "default": { "type": "sequence", + "expression": [ + { + "type": "inline", + "value": "[", + "trivia": " ", + "line": 7, + "index": 24 + }, + { + "type": "inline", + "value": "]", + "trivia": "", + "line": 7, + "index": 25 + } + ], "value": [] }, "required": false @@ -109,18 +144,34 @@ "idlType": "Dictionary" }, "default": { - "type": "dictionary" + "type": "dictionary", + "expression": [ + { + "type": "inline", + "value": "{", + "trivia": " ", + "line": 10, + "index": 34 + }, + { + "type": "inline", + "value": "}", + "trivia": "", + "line": 10, + "index": 35 + } + ] }, "required": false } ], - "extAttrs": [], "partial": false }, { "type": "dictionary", "name": "A", "inheritance": null, + "extAttrs": [], "members": [ { "type": "field", @@ -153,7 +204,6 @@ "required": false } ], - "extAttrs": [], "partial": true }, { diff --git a/test/syntax/baseline/documentation-dos.json b/test/syntax/baseline/documentation-dos.json index 70670029..55783d38 100644 --- a/test/syntax/baseline/documentation-dos.json +++ b/test/syntax/baseline/documentation-dos.json @@ -3,8 +3,8 @@ "type": "interface", "name": "Documentation", "inheritance": null, - "members": [], "extAttrs": [], + "members": [], "partial": false }, { diff --git a/test/syntax/baseline/documentation.json b/test/syntax/baseline/documentation.json index 70670029..55783d38 100644 --- a/test/syntax/baseline/documentation.json +++ b/test/syntax/baseline/documentation.json @@ -3,8 +3,8 @@ "type": "interface", "name": "Documentation", "inheritance": null, - "members": [], "extAttrs": [], + "members": [], "partial": false }, { diff --git a/test/syntax/baseline/enum.json b/test/syntax/baseline/enum.json index 8d1fae28..fef97847 100644 --- a/test/syntax/baseline/enum.json +++ b/test/syntax/baseline/enum.json @@ -2,6 +2,7 @@ { "type": "enum", "name": "MealType", + "extAttrs": [], "values": [ { "type": "enum-value", @@ -15,17 +16,18 @@ "type": "enum-value", "value": "other" } - ], - "extAttrs": [] + ] }, { "type": "interface", "name": "Meal", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "type", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -34,13 +36,13 @@ "union": false, "idlType": "MealType" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "size", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -49,13 +51,13 @@ "union": false, "idlType": "float" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "operation", "name": "initialize", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -98,16 +100,15 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { "type": "enum", "name": "AltMealType", + "extAttrs": [], "values": [ { "type": "enum-value", @@ -121,8 +122,7 @@ "type": "enum-value", "value": "other" } - ], - "extAttrs": [] + ] }, { "type": "eof", diff --git a/test/syntax/baseline/equivalent-decl.json b/test/syntax/baseline/equivalent-decl.json index 6dfb8239..3db8a19b 100644 --- a/test/syntax/baseline/equivalent-decl.json +++ b/test/syntax/baseline/equivalent-decl.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Dictionary", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "propertyCount", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +17,13 @@ "union": false, "idlType": "unsigned long" }, - "extAttrs": [], "special": "", "readonly": true }, { "type": "operation", "name": "getProperty", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -48,12 +50,12 @@ "variadic": false } ], - "extAttrs": [], "special": "getter" }, { "type": "operation", "name": "setProperty", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -96,21 +98,21 @@ "variadic": false } ], - "extAttrs": [], "special": "setter" } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "Dictionary2", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "propertyCount", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -119,13 +121,13 @@ "union": false, "idlType": "unsigned long" }, - "extAttrs": [], "special": "", "readonly": true }, { "type": "operation", "name": "getProperty", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -152,12 +154,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "setProperty", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -200,12 +202,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -232,12 +234,12 @@ "variadic": false } ], - "extAttrs": [], "special": "getter" }, { "type": "operation", "name": "", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -280,11 +282,9 @@ "variadic": false } ], - "extAttrs": [], "special": "setter" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/escaped-name.json b/test/syntax/baseline/escaped-name.json index e44c4af3..ff1f883a 100644 --- a/test/syntax/baseline/escaped-name.json +++ b/test/syntax/baseline/escaped-name.json @@ -3,8 +3,8 @@ "type": "interface", "name": "Iroha", "inheritance": "Magic", - "members": [], "extAttrs": [], + "members": [], "partial": false }, { diff --git a/test/syntax/baseline/escaped-type.json b/test/syntax/baseline/escaped-type.json index f65bc433..83c36e3d 100644 --- a/test/syntax/baseline/escaped-type.json +++ b/test/syntax/baseline/escaped-type.json @@ -2,6 +2,7 @@ { "type": "typedef", "name": "EscapedType", + "extAttrs": [], "idlType": { "type": "typedef-type", "extAttrs": [], @@ -9,12 +10,12 @@ "nullable": false, "union": false, "idlType": "Type" - }, - "extAttrs": [] + } }, { "type": "typedef", "name": "EscapedSequence", + "extAttrs": [], "idlType": { "type": "typedef-type", "extAttrs": [], @@ -31,8 +32,7 @@ "idlType": "Type" } ] - }, - "extAttrs": [] + } }, { "type": "eof", diff --git a/test/syntax/baseline/exposed-asterisk.json b/test/syntax/baseline/exposed-asterisk.json index 8e5608fe..7e12c1d1 100644 --- a/test/syntax/baseline/exposed-asterisk.json +++ b/test/syntax/baseline/exposed-asterisk.json @@ -3,7 +3,6 @@ "type": "interface", "name": "X", "inheritance": null, - "members": [], "extAttrs": [ { "type": "extended-attribute", @@ -15,6 +14,7 @@ "arguments": [] } ], + "members": [], "partial": false }, { diff --git a/test/syntax/baseline/extended-attributes.json b/test/syntax/baseline/extended-attributes.json index b7a74f7f..2ee45865 100644 --- a/test/syntax/baseline/extended-attributes.json +++ b/test/syntax/baseline/extended-attributes.json @@ -3,7 +3,6 @@ "type": "interface", "name": "ServiceWorkerGlobalScope", "inheritance": "WorkerGlobalScope", - "members": [], "extAttrs": [ { "type": "extended-attribute", @@ -31,13 +30,13 @@ "arguments": [] } ], + "members": [], "partial": false }, { "type": "interface", "name": "IdInterface", "inheritance": null, - "members": [], "extAttrs": [ { "type": "extended-attribute", @@ -105,16 +104,49 @@ "arguments": [] } ], + "members": [], "partial": false }, { "type": "interface", "name": "Circle", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Constructor", + "rhs": null, + "arguments": [] + }, + { + "type": "extended-attribute", + "name": "Constructor", + "rhs": null, + "arguments": [ + { + "type": "argument", + "name": "radius", + "extAttrs": [], + "idlType": { + "type": "argument-type", + "extAttrs": [], + "generic": "", + "nullable": false, + "union": false, + "idlType": "double" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + } + ], "members": [ { "type": "attribute", "name": "r", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -123,13 +155,13 @@ "union": false, "idlType": "double" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "cx", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -138,13 +170,13 @@ "union": false, "idlType": "double" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "cy", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -153,13 +185,13 @@ "union": false, "idlType": "double" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "circumference", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -168,52 +200,32 @@ "union": false, "idlType": "double" }, - "extAttrs": [], "special": "", "readonly": true } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Constructor", - "rhs": null, - "arguments": [] - }, - { - "type": "extended-attribute", - "name": "Constructor", - "rhs": null, - "arguments": [ - { - "type": "argument", - "name": "radius", - "extAttrs": [], - "idlType": { - "type": "argument-type", - "extAttrs": [], - "generic": "", - "nullable": false, - "union": false, - "idlType": "double" - }, - "default": null, - "optional": false, - "variadic": false - } - ] - } - ], "partial": false }, { "type": "interface", "name": "I", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Exposed", + "rhs": { + "type": "identifier", + "value": "Window" + }, + "arguments": [] + } + ], "members": [ { "type": "attribute", "name": "attrib", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [ @@ -246,22 +258,10 @@ } ] }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Exposed", - "rhs": { - "type": "identifier", - "value": "Window" - }, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/generic.json b/test/syntax/baseline/generic.json index 3f28bdf4..7a447c54 100644 --- a/test/syntax/baseline/generic.json +++ b/test/syntax/baseline/generic.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Foo", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "bar", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -43,12 +45,12 @@ ] }, "arguments": [], - "extAttrs": [], "special": "" }, { "type": "attribute", "name": "baz", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -66,13 +68,13 @@ } ] }, - "extAttrs": [], "special": "", "readonly": true }, { "type": "attribute", "name": "frozen", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -90,13 +92,13 @@ } ] }, - "extAttrs": [], "special": "", "readonly": true }, { "type": "attribute", "name": "observable", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -114,22 +116,22 @@ } ] }, - "extAttrs": [], "special": "", "readonly": true } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "ServiceWorkerClients", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "getServiced", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -148,12 +150,12 @@ ] }, "arguments": [], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "reloadAll", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -172,21 +174,21 @@ ] }, "arguments": [], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "FetchEvent", "inheritance": "Event", + "extAttrs": [], "members": [ { "type": "operation", "name": "default", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -205,11 +207,9 @@ ] }, "arguments": [], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/getter-setter.json b/test/syntax/baseline/getter-setter.json index dfb1d20d..3849111d 100644 --- a/test/syntax/baseline/getter-setter.json +++ b/test/syntax/baseline/getter-setter.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Dictionary", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "propertyCount", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +17,13 @@ "union": false, "idlType": "unsigned long" }, - "extAttrs": [], "special": "", "readonly": true }, { "type": "operation", "name": "", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -48,12 +50,12 @@ "variadic": false } ], - "extAttrs": [], "special": "getter" }, { "type": "operation", "name": "", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -96,11 +98,9 @@ "variadic": false } ], - "extAttrs": [], "special": "setter" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/identifier-hyphen.json b/test/syntax/baseline/identifier-hyphen.json index f54b3b9d..5666e845 100644 --- a/test/syntax/baseline/identifier-hyphen.json +++ b/test/syntax/baseline/identifier-hyphen.json @@ -3,10 +3,19 @@ "type": "interface", "name": "CSSStyleDeclaration", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "-will-change", + "extAttrs": [ + { + "type": "extended-attribute", + "name": "CEReactions", + "rhs": null, + "arguments": [] + } + ], "idlType": { "type": "attribute-type", "extAttrs": [ @@ -25,19 +34,10 @@ "union": false, "idlType": "CSSOMString" }, - "extAttrs": [ - { - "type": "extended-attribute", - "name": "CEReactions", - "rhs": null, - "arguments": [] - } - ], "special": "", "readonly": false } ], - "extAttrs": [], "partial": true }, { diff --git a/test/syntax/baseline/identifier-qualified-names.json b/test/syntax/baseline/identifier-qualified-names.json index e5a2e0a0..bf10b4fb 100644 --- a/test/syntax/baseline/identifier-qualified-names.json +++ b/test/syntax/baseline/identifier-qualified-names.json @@ -2,6 +2,7 @@ { "type": "typedef", "name": "number", + "extAttrs": [], "idlType": { "type": "typedef-type", "extAttrs": [], @@ -9,17 +10,18 @@ "nullable": false, "union": false, "idlType": "float" - }, - "extAttrs": [] + } }, { "type": "interface", "name": "System", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "createObject", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -46,12 +48,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -78,21 +80,21 @@ "variadic": false } ], - "extAttrs": [], "special": "getter" } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "TextField", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "const", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -101,13 +103,13 @@ "union": false, "idlType": "boolean" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "value", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -116,22 +118,22 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "FooEventTarget", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "addEventListener", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -158,11 +160,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/includes-name.json b/test/syntax/baseline/includes-name.json index b9c341fb..507724fb 100644 --- a/test/syntax/baseline/includes-name.json +++ b/test/syntax/baseline/includes-name.json @@ -3,10 +3,22 @@ "type": "interface", "name": "Includes", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Exposed", + "rhs": { + "type": "identifier", + "value": "Window" + }, + "arguments": [] + } + ], "members": [ { "type": "operation", "name": "includes", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -16,21 +28,9 @@ "idlType": "undefined" }, "arguments": [], - "extAttrs": [], "special": "" } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Exposed", - "rhs": { - "type": "identifier", - "value": "Window" - }, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/indexed-properties.json b/test/syntax/baseline/indexed-properties.json index f6f25cf4..d1d7138c 100644 --- a/test/syntax/baseline/indexed-properties.json +++ b/test/syntax/baseline/indexed-properties.json @@ -3,10 +3,12 @@ "type": "interface", "name": "OrderedMap", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "size", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +17,13 @@ "union": false, "idlType": "unsigned long" }, - "extAttrs": [], "special": "", "readonly": true }, { "type": "operation", "name": "getByIndex", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -48,12 +50,12 @@ "variadic": false } ], - "extAttrs": [], "special": "getter" }, { "type": "operation", "name": "setByIndex", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -96,12 +98,12 @@ "variadic": false } ], - "extAttrs": [], "special": "setter" }, { "type": "operation", "name": "removeByIndex", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -128,12 +130,12 @@ "variadic": false } ], - "extAttrs": [], "special": "deleter" }, { "type": "operation", "name": "get", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -160,12 +162,12 @@ "variadic": false } ], - "extAttrs": [], "special": "getter" }, { "type": "operation", "name": "set", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -208,12 +210,12 @@ "variadic": false } ], - "extAttrs": [], "special": "setter" }, { "type": "operation", "name": "remove", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -240,11 +242,9 @@ "variadic": false } ], - "extAttrs": [], "special": "deleter" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/inherits-getter.json b/test/syntax/baseline/inherits-getter.json index 4b92e529..48e8414f 100644 --- a/test/syntax/baseline/inherits-getter.json +++ b/test/syntax/baseline/inherits-getter.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Animal", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "name", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,22 +17,22 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": true } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "Person", "inheritance": "Animal", + "extAttrs": [], "members": [ { "type": "attribute", "name": "age", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -39,13 +41,13 @@ "union": false, "idlType": "unsigned short" }, - "extAttrs": [], "special": "", "readonly": true }, { "type": "attribute", "name": "name", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -54,12 +56,10 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "inherit", "readonly": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/interface-inherits.json b/test/syntax/baseline/interface-inherits.json index 7c48000e..3e6b8366 100644 --- a/test/syntax/baseline/interface-inherits.json +++ b/test/syntax/baseline/interface-inherits.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Animal", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "name", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,22 +17,22 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "Human", "inheritance": "Animal", + "extAttrs": [], "members": [ { "type": "attribute", "name": "pet", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -39,22 +41,22 @@ "union": false, "idlType": "Dog" }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "Dog", "inheritance": "Animal", + "extAttrs": [], "members": [ { "type": "attribute", "name": "owner", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -63,12 +65,10 @@ "union": false, "idlType": "Human" }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/iterable.json b/test/syntax/baseline/iterable.json index 429adfea..b1372c4c 100644 --- a/test/syntax/baseline/iterable.json +++ b/test/syntax/baseline/iterable.json @@ -3,9 +3,11 @@ "type": "interface", "name": "IterableOne", "inheritance": null, + "extAttrs": [], "members": [ { "type": "iterable", + "extAttrs": [], "idlType": [ { "type": null, @@ -17,21 +19,21 @@ } ], "arguments": [], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "IterableTwo", "inheritance": null, + "extAttrs": [], "members": [ { "type": "iterable", + "extAttrs": [], "idlType": [ { "type": null, @@ -51,21 +53,21 @@ } ], "arguments": [], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "IterableThree", "inheritance": null, + "extAttrs": [], "members": [ { "type": "iterable", + "extAttrs": [], "idlType": [ { "type": null, @@ -84,12 +86,10 @@ } ], "arguments": [], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/maplike.json b/test/syntax/baseline/maplike.json index 995ca8b3..7b6b6914 100644 --- a/test/syntax/baseline/maplike.json +++ b/test/syntax/baseline/maplike.json @@ -3,9 +3,11 @@ "type": "interface", "name": "MapLike", "inheritance": null, + "extAttrs": [], "members": [ { "type": "maplike", + "extAttrs": [], "idlType": [ { "type": null, @@ -25,21 +27,21 @@ } ], "arguments": [], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "ReadOnlyMapLike", "inheritance": null, + "extAttrs": [], "members": [ { "type": "maplike", + "extAttrs": [], "idlType": [ { "type": null, @@ -59,21 +61,21 @@ } ], "arguments": [], - "extAttrs": [], "readonly": true, "async": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "I", "inheritance": null, + "extAttrs": [], "members": [ { "type": "maplike", + "extAttrs": [], "idlType": [ { "type": null, @@ -107,12 +109,10 @@ } ], "arguments": [], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/mixin.json b/test/syntax/baseline/mixin.json index 9ab5ffe1..24fc349e 100644 --- a/test/syntax/baseline/mixin.json +++ b/test/syntax/baseline/mixin.json @@ -3,10 +3,12 @@ "type": "interface mixin", "name": "GlobalCrypto", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "crypto", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,12 +17,10 @@ "union": false, "idlType": "Crypto" }, - "extAttrs": [], "special": "", "readonly": true } ], - "extAttrs": [], "partial": false }, { @@ -39,10 +39,12 @@ "type": "interface mixin", "name": "WindowOrWorkerGlobalScope", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "crypto", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -51,20 +53,18 @@ "union": false, "idlType": "Crypto" }, - "extAttrs": [], "special": "", "readonly": true } ], - "extAttrs": [], "partial": true }, { "type": "interface mixin", "name": "LocalCrypto", "inheritance": null, - "members": [], "extAttrs": [], + "members": [], "partial": false }, { diff --git a/test/syntax/baseline/namedconstructor.json b/test/syntax/baseline/namedconstructor.json index 0f52c1db..ab23fe15 100644 --- a/test/syntax/baseline/namedconstructor.json +++ b/test/syntax/baseline/namedconstructor.json @@ -3,7 +3,6 @@ "type": "interface", "name": "HTMLAudioElement", "inheritance": "HTMLMediaElement", - "members": [], "extAttrs": [ { "type": "extended-attribute", @@ -41,6 +40,7 @@ ] } ], + "members": [], "partial": false }, { diff --git a/test/syntax/baseline/namespace.json b/test/syntax/baseline/namespace.json index 6a586d24..8d5e3d54 100644 --- a/test/syntax/baseline/namespace.json +++ b/test/syntax/baseline/namespace.json @@ -3,10 +3,12 @@ "type": "namespace", "name": "VectorUtils", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "unit", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +17,13 @@ "union": false, "idlType": "Vector" }, - "extAttrs": [], "special": "", "readonly": true }, { "type": "operation", "name": "dotProduct", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -64,12 +66,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "crossProduct", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -112,12 +114,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "const", "name": "CONST", + "extAttrs": [], "idlType": { "type": "const-type", "extAttrs": [], @@ -126,30 +128,28 @@ "union": false, "idlType": "short" }, - "extAttrs": [], "value": { "type": "number", "value": "3" } } ], - "extAttrs": [], "partial": false }, { "type": "namespace", "name": "SomeNamespace", "inheritance": null, - "members": [], "extAttrs": [], + "members": [], "partial": true }, { "type": "namespace", "name": "ScalarUtils", "inheritance": null, - "members": [], "extAttrs": [], + "members": [], "partial": false }, { diff --git a/test/syntax/baseline/nointerfaceobject.json b/test/syntax/baseline/nointerfaceobject.json index c6414638..c4eea454 100644 --- a/test/syntax/baseline/nointerfaceobject.json +++ b/test/syntax/baseline/nointerfaceobject.json @@ -3,10 +3,19 @@ "type": "interface", "name": "Query", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "NoInterfaceObject", + "rhs": null, + "arguments": [] + } + ], "members": [ { "type": "operation", "name": "lookupEntry", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -33,18 +42,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "NoInterfaceObject", - "rhs": null, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/nullable.json b/test/syntax/baseline/nullable.json index dcd94e1c..15256625 100644 --- a/test/syntax/baseline/nullable.json +++ b/test/syntax/baseline/nullable.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Node", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "namespaceURI", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,12 +17,10 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": true } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/nullableobjects.json b/test/syntax/baseline/nullableobjects.json index c6f404ab..4b0a2ff3 100644 --- a/test/syntax/baseline/nullableobjects.json +++ b/test/syntax/baseline/nullableobjects.json @@ -3,26 +3,28 @@ "type": "interface", "name": "A", "inheritance": null, - "members": [], "extAttrs": [], + "members": [], "partial": false }, { "type": "interface", "name": "B", "inheritance": null, - "members": [], "extAttrs": [], + "members": [], "partial": false }, { "type": "interface", "name": "C", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "f", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -49,12 +51,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "f", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -81,11 +83,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/obsolete-keywords.json b/test/syntax/baseline/obsolete-keywords.json index 0e033602..7ee34fcb 100644 --- a/test/syntax/baseline/obsolete-keywords.json +++ b/test/syntax/baseline/obsolete-keywords.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Keywords", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "implements", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -16,12 +18,12 @@ "idlType": "undefined" }, "arguments": [], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "legacyiterable", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -31,11 +33,9 @@ "idlType": "undefined" }, "arguments": [], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/operation-optional-arg.json b/test/syntax/baseline/operation-optional-arg.json index 5a9e3aa0..15c17201 100644 --- a/test/syntax/baseline/operation-optional-arg.json +++ b/test/syntax/baseline/operation-optional-arg.json @@ -3,10 +3,12 @@ "type": "interface", "name": "ColorCreator", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "createColor", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -78,17 +80,24 @@ }, "default": { "type": "number", + "expression": [ + { + "type": "decimal", + "value": "3.5", + "trivia": " ", + "line": 3, + "index": 19 + } + ], "value": "3.5" }, "optional": true, "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/overloading.json b/test/syntax/baseline/overloading.json index e8748556..84f4aef3 100644 --- a/test/syntax/baseline/overloading.json +++ b/test/syntax/baseline/overloading.json @@ -3,26 +3,28 @@ "type": "interface", "name": "A", "inheritance": null, - "members": [], "extAttrs": [], + "members": [], "partial": false }, { "type": "interface", "name": "B", "inheritance": null, - "members": [], "extAttrs": [], + "members": [], "partial": false }, { "type": "interface", "name": "C", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "f", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -49,12 +51,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "f", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -81,21 +83,21 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "D", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "f", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -122,12 +124,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "f", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -193,12 +195,12 @@ "variadic": true } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "f", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -208,12 +210,12 @@ "idlType": "undefined" }, "arguments": [], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "f", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -288,11 +290,9 @@ "variadic": true } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/overridebuiltins.json b/test/syntax/baseline/overridebuiltins.json index 8910a091..33257ec9 100644 --- a/test/syntax/baseline/overridebuiltins.json +++ b/test/syntax/baseline/overridebuiltins.json @@ -3,10 +3,19 @@ "type": "interface", "name": "StringMap2", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "OverrideBuiltins", + "rhs": null, + "arguments": [] + } + ], "members": [ { "type": "attribute", "name": "length", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +24,13 @@ "union": false, "idlType": "unsigned long" }, - "extAttrs": [], "special": "", "readonly": true }, { "type": "operation", "name": "lookup", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -48,18 +57,9 @@ "variadic": false } ], - "extAttrs": [], "special": "getter" } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "OverrideBuiltins", - "rhs": null, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/partial-interface.json b/test/syntax/baseline/partial-interface.json index af8a701b..32377f3b 100644 --- a/test/syntax/baseline/partial-interface.json +++ b/test/syntax/baseline/partial-interface.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Foo", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "bar", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,22 +17,22 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "Foo", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "quux", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -39,12 +41,10 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": true }, { diff --git a/test/syntax/baseline/primitives.json b/test/syntax/baseline/primitives.json index a61b4ac7..77a866dc 100644 --- a/test/syntax/baseline/primitives.json +++ b/test/syntax/baseline/primitives.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Primitives", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "truth", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +17,13 @@ "union": false, "idlType": "boolean" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "character", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -30,13 +32,13 @@ "union": false, "idlType": "byte" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "value", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -45,13 +47,13 @@ "union": false, "idlType": "octet" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "number", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -60,13 +62,13 @@ "union": false, "idlType": "short" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "positive", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -75,13 +77,13 @@ "union": false, "idlType": "unsigned short" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "big", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -90,13 +92,13 @@ "union": false, "idlType": "long" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "bigpositive", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -105,13 +107,13 @@ "union": false, "idlType": "unsigned long" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "bigbig", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -120,13 +122,13 @@ "union": false, "idlType": "long long" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "bigbigpositive", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -135,13 +137,13 @@ "union": false, "idlType": "unsigned long long" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "real", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -150,13 +152,13 @@ "union": false, "idlType": "float" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "bigreal", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -165,13 +167,13 @@ "union": false, "idlType": "double" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "realwithinfinity", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -180,13 +182,13 @@ "union": false, "idlType": "unrestricted float" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "bigrealwithinfinity", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -195,13 +197,13 @@ "union": false, "idlType": "unrestricted double" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "string", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -210,13 +212,13 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "bytes", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -225,13 +227,13 @@ "union": false, "idlType": "ByteString" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "date", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -240,13 +242,13 @@ "union": false, "idlType": "Date" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "regexp", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -255,12 +257,10 @@ "union": false, "idlType": "RegExp" }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/promise-void.json b/test/syntax/baseline/promise-void.json index 075b9c92..4df42b45 100644 --- a/test/syntax/baseline/promise-void.json +++ b/test/syntax/baseline/promise-void.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Cat", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "meow", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -24,12 +26,10 @@ } ] }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/prototyperoot.json b/test/syntax/baseline/prototyperoot.json index 0967b13c..08ec4430 100644 --- a/test/syntax/baseline/prototyperoot.json +++ b/test/syntax/baseline/prototyperoot.json @@ -3,10 +3,19 @@ "type": "interface", "name": "Node", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "PrototypeRoot", + "rhs": null, + "arguments": [] + } + ], "members": [ { "type": "attribute", "name": "nodeType", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,19 +24,10 @@ "union": false, "idlType": "unsigned short" }, - "extAttrs": [], "special": "", "readonly": true } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "PrototypeRoot", - "rhs": null, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/putforwards.json b/test/syntax/baseline/putforwards.json index a40e3997..376ab6ba 100644 --- a/test/syntax/baseline/putforwards.json +++ b/test/syntax/baseline/putforwards.json @@ -3,18 +3,11 @@ "type": "interface", "name": "Person", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "name", - "idlType": { - "type": "attribute-type", - "extAttrs": [], - "generic": "", - "nullable": false, - "union": false, - "idlType": "Name" - }, "extAttrs": [ { "type": "extended-attribute", @@ -26,12 +19,21 @@ "arguments": [] } ], + "idlType": { + "type": "attribute-type", + "extAttrs": [], + "generic": "", + "nullable": false, + "union": false, + "idlType": "Name" + }, "special": "", "readonly": true }, { "type": "attribute", "name": "age", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -40,12 +42,10 @@ "union": false, "idlType": "unsigned short" }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/record.json b/test/syntax/baseline/record.json index 061d30ce..2cf5ace6 100644 --- a/test/syntax/baseline/record.json +++ b/test/syntax/baseline/record.json @@ -3,10 +3,53 @@ "type": "interface", "name": "Foo", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Constructor", + "rhs": null, + "arguments": [ + { + "type": "argument", + "name": "init", + "extAttrs": [], + "idlType": { + "type": "argument-type", + "extAttrs": [], + "generic": "record", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "argument-type", + "extAttrs": [], + "generic": "", + "nullable": false, + "union": false, + "idlType": "USVString" + }, + { + "type": "argument-type", + "extAttrs": [], + "generic": "", + "nullable": false, + "union": false, + "idlType": "USVString" + } + ] + }, + "default": null, + "optional": false, + "variadic": false + } + ] + } + ], "members": [ { "type": "operation", "name": "foo", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -59,12 +102,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "bar", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -108,62 +151,21 @@ ] }, "arguments": [], - "extAttrs": [], "special": "" } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Constructor", - "rhs": null, - "arguments": [ - { - "type": "argument", - "name": "init", - "extAttrs": [], - "idlType": { - "type": "argument-type", - "extAttrs": [], - "generic": "record", - "nullable": false, - "union": false, - "idlType": [ - { - "type": "argument-type", - "extAttrs": [], - "generic": "", - "nullable": false, - "union": false, - "idlType": "USVString" - }, - { - "type": "argument-type", - "extAttrs": [], - "generic": "", - "nullable": false, - "union": false, - "idlType": "USVString" - } - ] - }, - "default": null, - "optional": false, - "variadic": false - } - ] - } - ], "partial": false }, { "type": "interface", "name": "Bar", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "bar", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -197,11 +199,9 @@ ] }, "arguments": [], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/reflector-interface.json b/test/syntax/baseline/reflector-interface.json index 7f7544d9..f1765dca 100644 --- a/test/syntax/baseline/reflector-interface.json +++ b/test/syntax/baseline/reflector-interface.json @@ -3,18 +3,11 @@ "type": "interface mixin", "name": "Reflector", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "toggle", - "idlType": { - "type": "attribute-type", - "extAttrs": [], - "generic": "", - "nullable": false, - "union": false, - "idlType": "DOMString" - }, "extAttrs": [ { "type": "extended-attribute", @@ -32,12 +25,6 @@ "arguments": [] } ], - "special": "", - "readonly": false - }, - { - "type": "attribute", - "name": "quarter", "idlType": { "type": "attribute-type", "extAttrs": [], @@ -46,6 +33,12 @@ "union": false, "idlType": "DOMString" }, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "quarter", "extAttrs": [ { "type": "extended-attribute", @@ -73,20 +66,20 @@ "arguments": [] } ], - "special": "", - "readonly": false - }, - { - "type": "attribute", - "name": "span", "idlType": { "type": "attribute-type", "extAttrs": [], "generic": "", "nullable": false, "union": false, - "idlType": "unsigned long" + "idlType": "DOMString" }, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "span", "extAttrs": [ { "type": "extended-attribute", @@ -111,11 +104,18 @@ "arguments": [] } ], + "idlType": { + "type": "attribute-type", + "extAttrs": [], + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/reg-operations.json b/test/syntax/baseline/reg-operations.json index 4439d995..d381660f 100644 --- a/test/syntax/baseline/reg-operations.json +++ b/test/syntax/baseline/reg-operations.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Dimensions", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "width", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +17,13 @@ "union": false, "idlType": "unsigned long" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "height", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -30,22 +32,22 @@ "union": false, "idlType": "unsigned long" }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "Button", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "isMouseOver", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -55,12 +57,12 @@ "idlType": "boolean" }, "arguments": [], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "setDimensions", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -87,12 +89,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "setDimensions", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -135,11 +137,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/replaceable.json b/test/syntax/baseline/replaceable.json index e35edb87..6357cd3c 100644 --- a/test/syntax/baseline/replaceable.json +++ b/test/syntax/baseline/replaceable.json @@ -3,18 +3,11 @@ "type": "interface", "name": "Counter", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "value", - "idlType": { - "type": "attribute-type", - "extAttrs": [], - "generic": "", - "nullable": false, - "union": false, - "idlType": "unsigned long" - }, "extAttrs": [ { "type": "extended-attribute", @@ -23,12 +16,21 @@ "arguments": [] } ], + "idlType": { + "type": "attribute-type", + "extAttrs": [], + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, "special": "", "readonly": true }, { "type": "operation", "name": "increment", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -38,11 +40,9 @@ "idlType": "undefined" }, "arguments": [], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/sequence.json b/test/syntax/baseline/sequence.json index be1185ea..3c1e0c3c 100644 --- a/test/syntax/baseline/sequence.json +++ b/test/syntax/baseline/sequence.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Canvas", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "drawPolygon", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -42,12 +44,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "getInflectionPoints", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -66,21 +68,21 @@ ] }, "arguments": [], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "I", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "f1", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -123,11 +125,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/setlike.json b/test/syntax/baseline/setlike.json index 9388573d..a64bdb27 100644 --- a/test/syntax/baseline/setlike.json +++ b/test/syntax/baseline/setlike.json @@ -3,9 +3,11 @@ "type": "interface", "name": "SetLike", "inheritance": null, + "extAttrs": [], "members": [ { "type": "setlike", + "extAttrs": [], "idlType": [ { "type": null, @@ -17,21 +19,21 @@ } ], "arguments": [], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "ReadOnlySetLike", "inheritance": null, + "extAttrs": [], "members": [ { "type": "setlike", + "extAttrs": [], "idlType": [ { "type": null, @@ -43,21 +45,21 @@ } ], "arguments": [], - "extAttrs": [], "readonly": true, "async": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "SetLikeExt", "inheritance": null, + "extAttrs": [], "members": [ { "type": "setlike", + "extAttrs": [], "idlType": [ { "type": null, @@ -76,12 +78,10 @@ } ], "arguments": [], - "extAttrs": [], "readonly": false, "async": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/sharedarraybuffer.json b/test/syntax/baseline/sharedarraybuffer.json index 1bd00f5b..d6342d6a 100644 --- a/test/syntax/baseline/sharedarraybuffer.json +++ b/test/syntax/baseline/sharedarraybuffer.json @@ -3,10 +3,22 @@ "type": "interface", "name": "Foo", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Exposed", + "rhs": { + "type": "identifier", + "value": "Window" + }, + "arguments": [] + } + ], "members": [ { "type": "operation", "name": "foo", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -33,12 +45,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "foo", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -65,21 +77,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Exposed", - "rhs": { - "type": "identifier", - "value": "Window" - }, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/static.json b/test/syntax/baseline/static.json index f6eef467..d6dd369f 100644 --- a/test/syntax/baseline/static.json +++ b/test/syntax/baseline/static.json @@ -3,18 +3,20 @@ "type": "interface", "name": "Point", "inheritance": null, - "members": [], "extAttrs": [], + "members": [], "partial": false }, { "type": "interface", "name": "Circle", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "cx", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -23,13 +25,13 @@ "union": false, "idlType": "float" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "cy", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -38,13 +40,13 @@ "union": false, "idlType": "float" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "radius", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -53,13 +55,13 @@ "union": false, "idlType": "float" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "triangulationCount", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -68,13 +70,13 @@ "union": false, "idlType": "long" }, - "extAttrs": [], "special": "static", "readonly": true }, { "type": "operation", "name": "triangulate", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -133,11 +135,9 @@ "variadic": false } ], - "extAttrs": [], "special": "static" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/stringifier-attribute.json b/test/syntax/baseline/stringifier-attribute.json index 54c651d1..bd0502cb 100644 --- a/test/syntax/baseline/stringifier-attribute.json +++ b/test/syntax/baseline/stringifier-attribute.json @@ -3,10 +3,19 @@ "type": "interface", "name": "Student", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Constructor", + "rhs": null, + "arguments": [] + } + ], "members": [ { "type": "attribute", "name": "id", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +24,13 @@ "union": false, "idlType": "unsigned long" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "name", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -30,19 +39,10 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "stringifier", "readonly": false } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Constructor", - "rhs": null, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/stringifier-custom.json b/test/syntax/baseline/stringifier-custom.json index 0f0bcc41..71fdd124 100644 --- a/test/syntax/baseline/stringifier-custom.json +++ b/test/syntax/baseline/stringifier-custom.json @@ -3,10 +3,19 @@ "type": "interface", "name": "Student", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Constructor", + "rhs": null, + "arguments": [] + } + ], "members": [ { "type": "attribute", "name": "id", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +24,13 @@ "union": false, "idlType": "unsigned long" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "familyName", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -30,13 +39,13 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "givenName", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -45,13 +54,13 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "operation", "name": "", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -61,18 +70,9 @@ "idlType": "DOMString" }, "arguments": [], - "extAttrs": [], "special": "stringifier" } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Constructor", - "rhs": null, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/stringifier.json b/test/syntax/baseline/stringifier.json index ef8b80f3..805550bd 100644 --- a/test/syntax/baseline/stringifier.json +++ b/test/syntax/baseline/stringifier.json @@ -3,10 +3,12 @@ "type": "interface", "name": "A", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -16,27 +18,25 @@ "idlType": "DOMString" }, "arguments": [], - "extAttrs": [], "special": "stringifier" } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "B", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "", - "arguments": [], "extAttrs": [], + "arguments": [], "special": "stringifier" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/treatasnull.json b/test/syntax/baseline/treatasnull.json index 2cce456f..ebf873ab 100644 --- a/test/syntax/baseline/treatasnull.json +++ b/test/syntax/baseline/treatasnull.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Dog", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "name", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +17,13 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "owner", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -30,13 +32,13 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "operation", "name": "isMemberOfBreed", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -73,11 +75,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/treatasundefined.json b/test/syntax/baseline/treatasundefined.json index 47ccc6b7..de4abded 100644 --- a/test/syntax/baseline/treatasundefined.json +++ b/test/syntax/baseline/treatasundefined.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Cat", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "name", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +17,13 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "owner", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -30,13 +32,13 @@ "union": false, "idlType": "DOMString" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "operation", "name": "isMemberOfBreed", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -73,11 +75,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/typedef-union.json b/test/syntax/baseline/typedef-union.json index f5432a59..e7506b73 100644 --- a/test/syntax/baseline/typedef-union.json +++ b/test/syntax/baseline/typedef-union.json @@ -2,6 +2,7 @@ { "type": "typedef", "name": "TexImageSource", + "extAttrs": [], "idlType": { "type": "typedef-type", "extAttrs": [], @@ -42,8 +43,7 @@ "idlType": "HTMLVideoElement" } ] - }, - "extAttrs": [] + } }, { "type": "eof", diff --git a/test/syntax/baseline/typedef.json b/test/syntax/baseline/typedef.json index a441cb5c..70f5b547 100644 --- a/test/syntax/baseline/typedef.json +++ b/test/syntax/baseline/typedef.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Point", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "x", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +17,13 @@ "union": false, "idlType": "float" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "y", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -30,17 +32,16 @@ "union": false, "idlType": "float" }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { "type": "typedef", "name": "PointSequence", + "extAttrs": [], "idlType": { "type": "typedef-type", "extAttrs": [], @@ -57,17 +58,18 @@ "idlType": "Point" } ] - }, - "extAttrs": [] + } }, { "type": "interface", "name": "Rect", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "topleft", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -76,13 +78,13 @@ "union": false, "idlType": "Point" }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "bottomright", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -91,22 +93,22 @@ "union": false, "idlType": "Point" }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { "type": "interface", "name": "Widget", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "bounds", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -115,13 +117,13 @@ "union": false, "idlType": "Rect" }, - "extAttrs": [], "special": "", "readonly": true }, { "type": "operation", "name": "pointWithinBounds", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -148,12 +150,12 @@ "variadic": false } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "allPointsWithinBounds", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -180,16 +182,15 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { "type": "typedef", "name": "value", + "extAttrs": [], "idlType": { "type": "typedef-type", "extAttrs": [ @@ -204,8 +205,7 @@ "nullable": false, "union": false, "idlType": "octet" - }, - "extAttrs": [] + } }, { "type": "eof", diff --git a/test/syntax/baseline/typesuffixes.json b/test/syntax/baseline/typesuffixes.json index 3d8991c2..2c3235d1 100644 --- a/test/syntax/baseline/typesuffixes.json +++ b/test/syntax/baseline/typesuffixes.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Suffixes", "inheritance": null, + "extAttrs": [], "members": [ { "type": "operation", "name": "test", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -42,11 +44,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/undefined.json b/test/syntax/baseline/undefined.json index 1377cbe8..b1d94653 100644 --- a/test/syntax/baseline/undefined.json +++ b/test/syntax/baseline/undefined.json @@ -3,10 +3,22 @@ "type": "interface", "name": "Foo", "inheritance": null, + "extAttrs": [ + { + "type": "extended-attribute", + "name": "Exposed", + "rhs": { + "type": "identifier", + "value": "Window" + }, + "arguments": [] + } + ], "members": [ { "type": "operation", "name": "foo", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -16,12 +28,12 @@ "idlType": "undefined" }, "arguments": [], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "bar", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -57,12 +69,12 @@ ] }, "arguments": [], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "baz", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -89,21 +101,9 @@ "variadic": false } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [ - { - "type": "extended-attribute", - "name": "Exposed", - "rhs": { - "type": "identifier", - "value": "Window" - }, - "arguments": [] - } - ], "partial": false }, { diff --git a/test/syntax/baseline/uniontype.json b/test/syntax/baseline/uniontype.json index bd78ffff..9749667d 100644 --- a/test/syntax/baseline/uniontype.json +++ b/test/syntax/baseline/uniontype.json @@ -3,10 +3,12 @@ "type": "interface", "name": "Union", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "test", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -74,13 +76,13 @@ } ] }, - "extAttrs": [], "special": "", "readonly": false }, { "type": "attribute", "name": "test2", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -113,12 +115,10 @@ } ] }, - "extAttrs": [], "special": "", "readonly": false } ], - "extAttrs": [], "partial": false }, { diff --git a/test/syntax/baseline/variadic-operations.json b/test/syntax/baseline/variadic-operations.json index 4df78240..e0fedb60 100644 --- a/test/syntax/baseline/variadic-operations.json +++ b/test/syntax/baseline/variadic-operations.json @@ -3,10 +3,12 @@ "type": "interface", "name": "IntegerSet", "inheritance": null, + "extAttrs": [], "members": [ { "type": "attribute", "name": "cardinality", + "extAttrs": [], "idlType": { "type": "attribute-type", "extAttrs": [], @@ -15,13 +17,13 @@ "union": false, "idlType": "unsigned long" }, - "extAttrs": [], "special": "", "readonly": true }, { "type": "operation", "name": "union", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -48,12 +50,12 @@ "variadic": true } ], - "extAttrs": [], "special": "" }, { "type": "operation", "name": "intersection", + "extAttrs": [], "idlType": { "type": "return-type", "extAttrs": [], @@ -80,11 +82,9 @@ "variadic": true } ], - "extAttrs": [], "special": "" } ], - "extAttrs": [], "partial": false }, {