From 515dbb0fe430cc7ed8a48d53d6bbe3e520c60f88 Mon Sep 17 00:00:00 2001 From: Sam Sneddon Date: Mon, 13 May 2019 14:29:45 +0100 Subject: [PATCH 1/4] Squashed 'resources/webidl2/' changes from 83cd4a064a..306cf6479f ea389ca278 chore(package): bump version number to 20.0.1 518e5cc12b chore(CHANGELOG): regenerate aa3588b457 chore(dist): update 7ceaf0ee5b refactor(lib/webidl2): enum as a module (#318) 27b0eb31d3 fix(lib/webidl2): emit error message correctly (#317) bcb8c32c69 docs(lib/writer): fix extendedAttribute example 1ddd771ed8 docs(lib/writer): document generic() (#315) 86029c5866 chore(package): bump version number to 20.0.0 f195b986b8 chore(CHANGELOG): regenerate 7423f5d8f7 chore(dist): update 996d4f7e71 feat(lib/writer): introduce generic() hook (#314) 87b07ec705 refactor(lib/webidl2): modularize Default (#312) be140dad86 refactor(lib/webidl2): modularize Token and list() (#311) 464d3a1e2b refactor(lib/webidl2): modularize Includes (#310) 6b3b7c54f5 chore(package): bump version number to 19.0.1 c68baccbb2 chore(CHANGELOG): regenerate 97851631ab chore(dist): update 1cc6b3e257 fix(lib/writer): call ts.trivia with actual string (#309) e84ba4fd34 chore(CHANGELOG): regenerate 37f87e6393 chore(package): bump version number to 19.0.0 6486380999 update dist 6340c3e1e4 fix(lib/webidl2): restore error fields (#308) c6a7c97358 fix(lib/webidl2): rename float as decimal (#307) 048e3d748e BREAKING CHANGE: remove all trivia fields (#306) f37e39e928 BREAKING CHANGE: remove baseName and escaped* fields (#305) b0c5a9e5e6 BREAKING CHANGE: remove token fields (#304) e1aa18822f BREAKING CHANGE: remove trivia from boolean fields (#303) 112862924c refactor: merge error functions (#299) 1926437649 fix(checker): add an empty line between messages (#298) 3de7e3066a chore(package): bump version number to 18.0.1 a3637e9c20 update build 09c4e4f725 chore(package): bump version number to 18.0.0 df4c73deef fix(lib/validator): validate when overloads are all from mixins (#296) a8e81d479e refactor: use module for checker (#295) 679395293f fix(checker): use webpack build result (#294) abd41222d5 refactor: use ES module syntax and bundle by webpack (#293) aa75ae538c feat: add validation feature to the checker page (#292) b7e7b1ba99 feat: a validator for IDL (#262) 852194f5ee refactor: remove remaining JSON idlTypes (#291) b8590cd281 refactor: use Type for primitive types (#290) 44987f3bf5 refactor: generic type as a class (#289) c86dac1295 refactor: union type as a class (#288) 64f0fa50d7 refactor: argument as a class (#287) 209c1d4cf4 fix(lib/webidl2): disallow empty generic type (#286) 927328d5c7 fix(lib/webidl2): disallow null on constants (#284) 45287bf978 refactor: use list() in identifiers()/enums (#285) 2d555baf51 refactor: extended attributes as a class (#283) 11afb8e7ea refactor: extended attribute as a class (#282) 7d1562c406 refactor: default value as a class (#281) 812a292252 BREAKING CHANGE: constant as a class (#280) 44b68f8afc refactor(lib/writer): use tokens object in container() (#273) a9bb14d43e add a test case (#277) 7c07ca4eb5 refactor: attribute as a class (#276) a25f052736 refactor: operation as a class (#275) dba7a4b8b7 test(lib/webidl2): nullable constant with typedef identifiers (#279) 903c374ebb refactor: callback function as a class (#278) f396b5182d refactor: iterable as a class (#274) 810d2db4cf refactor: containers as classes (#272) ce9787caab refactor: namespace as a class (#271) 56a590d327 refactor: dictionary as a class (#270) 5e51ccec85 refactor: field as a class (#268) 9643425b8e refactor(lib/webidl2): move toJSON to Definition (#269) c13e3aa65f refactor: enum as a class (#267) ae4a1b4fd8 refactor: typedef as a class (#266) 81edfc0774 refactor: includes as a class (#265) f9c0d44f49 chore: add .gitattributes (#264) 51618dced6 style: apply no-trailing-spaces (#263) d9c160f4ba chore(package): bump version number to 17.0.2 1a2147bb20 fix(lib/webidl2): apply a preceding hyphen for identifiers (#261) c27f3c3e94 fix(checker): avoid using innerText (#260) 4b0443568c fix(lib/webidl2): restore enum value string form in error (#258) 805e2b2ea2 docs: lowercase the example namespace "Console" (#257) 16d5a92b2d chore(CHANGELOG): regenerate 3bb235ca95 chore(package): bump version number to 17.0.1 1aa1258028 fix: unescape includes/idlTypes/inheritances (#253) e57f46632b fix(lib/webidl2): prevent any in a union type (#254) 8cbec8b4d0 Revert "fix(lib/webidl2): prevent any in a union type" 73c15634ac fix(lib/webidl2): prevent any in a union type c393451a43 feat(lib/webidl): subclass standard error (#247) 6e2a83bfee chore(CHANGELOG): regenerate 3f8ac3f23b 17.0.0 9e2c43da44 BREAKING CHANGE: remove .extAttrs from arguments (#248) ec05bc243b 16.1.0 4ae64a8766 Add unit tests for writer template functions (#245) dd89780e22 feat(lib/webidl2): better error messages (#244) edaf314b6a Add docs for template feature (#243) df4484597e Revert "add test for writer template feature" 19f5e6e8f8 Revert "upgrade eslint" 7e886e9f26 add test for writer template feature 1313c80c16 upgrade eslint 1014b33145 feat(lib/writer): write() with optional templates (#241) 5d5a645936 chore(package): bump version number to 16.0.0 3c538be29f BREAKING CHANGE: merge modifier fields (#240) 7350bb1227 refactor(lib/writer): use container() (#239) b215543038 refactor(lib/writer): use token() (#238) 0a0bfa9ee9 refactor(lib/writer): reduce conditional constructs (#237) 40a048b800 chore: remove jscov (#236) 018b24f7fc chore(package): update eslint (#235) d38c4ed618 eslint: prevent eval() (#234) 8ff7a963cf chore(package-locK): regenerate 731f5edb5a chore(CHANGELOG): regenerated d759b8c968 chore(package): update version + deps 568e1d5db6 docs(README): enum value's type is now enum-value (#233) f3462f9501 BREAKING CHANGE: enum values should be of type enum-value (#232) 46b250286d fix: escape top identifiers (#229) 91bba911e5 fix(lib/webidl): disallow multiple special keywords (#224) b2a9f6c901 BREAKING CHANGE: Drop support for implements statement (#106) da93c9373b refactor(lib/writer): horizontally shorter type() (#221) 2e03190e30 chore(README): operation body always has idlType (#218) 6cc3277c9d chore(package): bump version number to 14.0.1 a3e89c87d2 fix(index): import writer from index (#219) 1582972c21 chore(CHANGELOG): regenerate 402e4e3514 chore(package): bump version number to 14.0.0 698b8e991d Document changes for idlType and extAttrs (#217) 7328816495 Document trivia for root type declarations/members (#214) b3fd89040d BREAKING CHANGE: remove support for legacyiterable (#216) cce0d6d484 Document trivia for iterable-likes (#213) b5b4d90a12 Document trivia for interfaces/mixins/namespaces (#212) 69a0f2b5ac Document generic array, escapedName and removal of sequence (#211) 7d08a0c8af BREAKING CHANGE: support full whitespace conservation (#185) bbe95578bd trivia for implements/includes (#209) 9df331ce7d Add trivia for enums and typedefs (#207) 2559b95c75 Add trivia for callbacks (#206) 4cbd4143ba Add trivia for partial types (#205) fc147026f7 trivia for dictionaries (#204) be9126fa7b Add trivia for mixins and namespaces (#203) b02aa3366a Use eslint minimally (#202) 74cd53340d Add trivia for extended attributes (#201) 7524981417 Add trivia for extended attribute identifiers (#200) 3d682826e2 Add trivia for const member type (#199) 25d5919278 trivia for arguments (#198) b17417ca83 trivia for operation (#197) 6e12a109d1 trivia for inheritance (#195) 79d791a389 Add trivia for iterable declarations (#194) 0cb3e7cba4 Add trivia for modifiers (#193) ecebf30070 Add trivia for idlTypes (#192) 32f11bc730 BREAKING CHANGE: remove nullable field from const type (#189) f4292a7a21 Generics always as an array (#188) 1ea9f9c91a fix: prevent empty iterable declaration (#187) d36f7e4b7e Add trivia field for interfaces/mixins (#186) git-subtree-dir: resources/webidl2 git-subtree-split: 306cf6479f909a38297c4982e79171958669fe55 --- .eslintrc.json | 22 + .gitattributes | 3 + .travis.yml | 2 +- CHANGELOG.md | 400 +- README.md | 471 +- checker/index.html | 102 +- coverage.html | 341 - dist/webidl2.js | 2 + dist/webidl2.js.map | 1 + index.js | 4 +- lib/error.js | 74 + lib/productions/base.js | 23 + lib/productions/default.js | 36 + lib/productions/enum.js | 59 + lib/productions/helpers.js | 68 + lib/productions/includes.js | 33 + lib/productions/token.js | 20 + lib/tokeniser.js | 233 + lib/validator.js | 100 + lib/webidl2.js | 1478 ++-- lib/writer.js | 493 +- package-lock.json | 6424 +++++++++++++++-- package.json | 18 +- test/invalid.js | 56 +- test/invalid/baseline/array.txt | 3 + test/invalid/baseline/caller.txt | 3 + test/invalid/baseline/const-null.txt | 3 + test/invalid/baseline/const-nullable.txt | 3 + .../baseline/dict-field-unterminated.txt | 3 + test/invalid/baseline/dict-no-default.txt | 3 + .../baseline/dict-required-default.txt | 3 + test/invalid/baseline/duplicate-escaped.txt | 3 + test/invalid/baseline/duplicate.txt | 3 + test/invalid/baseline/enum-bodyless.txt | 3 + test/invalid/baseline/enum-empty.txt | 3 + test/invalid/baseline/enum-wo-comma.txt | 3 + test/invalid/baseline/enum.txt | 3 + test/invalid/baseline/exception.txt | 3 + test/invalid/baseline/extattr-double.txt | 3 + test/invalid/baseline/extattr-empty-ids.txt | 3 + test/invalid/baseline/float.txt | 3 + test/invalid/baseline/frozenarray-empty.txt | 3 + .../baseline/id-underscored-number.txt | 3 + test/invalid/baseline/implements.txt | 3 + .../baseline/implements_and_includes_ws.txt | 3 + test/invalid/baseline/iterable-empty.txt | 3 + test/invalid/baseline/iterator.txt | 3 + test/invalid/baseline/legacyiterable.txt | 3 + test/invalid/baseline/maplike-1type.txt | 3 + test/invalid/baseline/module.txt | 3 + test/invalid/baseline/namespace-readwrite.txt | 3 + .../baseline/no-semicolon-callback.txt | 3 + test/invalid/baseline/no-semicolon.txt | 3 + test/invalid/baseline/nonnullableany.txt | 3 + test/invalid/baseline/nonnullableobjects.txt | 3 + .../baseline/operation-too-special.txt | 3 + test/invalid/baseline/overloads.txt | 18 + test/invalid/baseline/promise-empty.txt | 3 + test/invalid/baseline/promise-nullable.txt | 3 + .../promise-with-extended-attribute.txt | 3 + test/invalid/baseline/raises.txt | 3 + test/invalid/baseline/readonly-iterable.txt | 3 + .../record-key-with-extended-attribute.txt | 3 + test/invalid/baseline/record-key.txt | 3 + test/invalid/baseline/record-single.txt | 3 + test/invalid/baseline/scopedname.txt | 3 + test/invalid/baseline/sequence-empty.txt | 3 + test/invalid/baseline/sequenceAsAttribute.txt | 3 + test/invalid/baseline/setlike-2types.txt | 3 + test/invalid/baseline/setter-creator.txt | 3 + .../baseline/spaced-negative-infinity.txt | 3 + test/invalid/baseline/spaced-variadic.txt | 3 + test/invalid/baseline/special-omittable.txt | 3 + test/invalid/baseline/stray-slash.txt | 3 + test/invalid/baseline/stringconstants.txt | 3 + test/invalid/baseline/typedef-nested.txt | 3 + test/invalid/baseline/union-any.txt | 3 + test/invalid/baseline/union-dangling-or.txt | 3 + test/invalid/baseline/union-one.txt | 3 + test/invalid/baseline/union-zero.txt | 3 + test/invalid/baseline/unknown-generic.txt | 3 + test/invalid/idl/const-null.widl | 3 + test/invalid/idl/const-nullable.widl | 4 + test/invalid/idl/dict-field-unterminated.widl | 1 + test/invalid/idl/dict-no-default.widl | 3 + test/invalid/idl/duplicate-escaped.widl | 2 + test/invalid/idl/enum-bodyless.widl | 1 + test/invalid/idl/extattr-double.widl | 2 + test/invalid/idl/float.widl | 1 + test/invalid/idl/frozenarray-empty.widl | 1 + test/{syntax => invalid}/idl/implements.widl | 0 test/invalid/idl/iterable-empty.widl | 3 + .../idl/legacyiterable.widl | 0 test/invalid/idl/operation-too-special.widl | 3 + test/invalid/idl/overloads.widl | 41 + test/invalid/idl/promise-empty.widl | 1 + test/invalid/idl/sequence-empty.widl | 1 + test/invalid/idl/union-any.widl | 1 + test/invalid/json/array.json | 4 - test/invalid/json/caller.json | 4 - test/invalid/json/dict-required-default.json | 4 - test/invalid/json/duplicate.json | 4 - test/invalid/json/enum-empty.json | 4 - test/invalid/json/enum-wo-comma.json | 4 - test/invalid/json/enum.json | 4 - test/invalid/json/exception.json | 4 - test/invalid/json/extattr-empty-ids.json | 4 - test/invalid/json/id-underscored-number.json | 4 - .../json/implements_and_includes_ws.json | 4 - test/invalid/json/iterator.json | 4 - test/invalid/json/maplike-1type.json | 4 - test/invalid/json/module.json | 4 - test/invalid/json/namespace-readwrite.json | 4 - test/invalid/json/no-semicolon-callback.json | 4 - test/invalid/json/no-semicolon.json | 4 - test/invalid/json/nonnullableany.json | 4 - test/invalid/json/nonnullableobjects.json | 4 - test/invalid/json/promise-nullable.json | 4 - .../json/promise-with-extended-attribute.json | 4 - test/invalid/json/raises.json | 4 - test/invalid/json/readonly-iterable.json | 4 - .../record-key-with-extended-attribute.json | 4 - test/invalid/json/record-key.json | 4 - test/invalid/json/record-single.json | 4 - test/invalid/json/scopedname.json | 4 - test/invalid/json/sequenceAsAttribute.json | 4 - test/invalid/json/setlike-2types.json | 4 - test/invalid/json/setter-creator.json | 4 - .../json/spaced-negative-infinity.json | 4 - test/invalid/json/spaced-variadic.json | 4 - test/invalid/json/special-omittable.json | 4 - test/invalid/json/stray-slash.json | 4 - test/invalid/json/stringconstants.json | 4 - test/invalid/json/typedef-nested.json | 4 - test/invalid/json/union-dangling-or.json | 4 - test/invalid/json/union-one.json | 4 - test/invalid/json/union-zero.json | 4 - test/invalid/json/unknown-generic.json | 4 - test/syntax.js | 9 +- test/syntax/baseline/allowany.json | 109 + test/syntax/baseline/attributes.json | 46 + test/syntax/baseline/callback.json | 121 + test/syntax/{json => baseline}/constants.json | 115 +- test/syntax/baseline/constructor.json | 106 + .../dictionary-inherits.json | 71 +- .../syntax/{json => baseline}/dictionary.json | 120 +- test/syntax/baseline/documentation-dos.json | 15 + .../{json => baseline}/documentation.json | 11 +- test/syntax/baseline/enum.json | 131 + test/syntax/baseline/equivalent-decl.json | 295 + test/syntax/baseline/escaped-name.json | 23 + test/syntax/baseline/escaped-type.json | 42 + .../exception-inheritance.json | 0 test/syntax/baseline/extended-attributes.json | 244 + test/syntax/baseline/generic.json | 186 + test/syntax/baseline/getter-setter.json | 111 + test/syntax/baseline/identifier-hyphen.json | 51 + .../baseline/identifier-qualified-names.json | 176 + test/syntax/baseline/indexed-properties.json | 257 + test/syntax/baseline/inherits-getter.json | 98 + test/syntax/baseline/interface-inherits.json | 83 + test/syntax/{json => baseline}/iterable.json | 72 +- test/syntax/{json => baseline}/iterator.json | 0 test/syntax/baseline/maplike.json | 121 + test/syntax/{json => baseline}/mixin.json | 62 +- test/syntax/baseline/namedconstructor.json | 53 + test/syntax/baseline/namespace.json | 138 + test/syntax/baseline/nointerfaceobject.json | 58 + test/syntax/baseline/nullable.json | 31 + test/syntax/baseline/nullableobjects.json | 98 + .../baseline/operation-optional-arg.json | 94 + test/syntax/baseline/overloading.json | 303 + test/syntax/baseline/overridebuiltins.json | 73 + .../{json => baseline}/partial-interface.json | 49 +- test/syntax/baseline/primitives.json | 271 + test/syntax/baseline/promise-void.json | 40 + test/syntax/baseline/prototyperoot.json | 40 + test/syntax/baseline/putforwards.json | 58 + test/syntax/baseline/record.json | 221 + test/syntax/baseline/reg-operations.json | 153 + test/syntax/baseline/replaceable.json | 58 + test/syntax/baseline/sequence.json | 145 + test/syntax/{json => baseline}/setlike.json | 69 +- test/syntax/baseline/static.json | 145 + .../baseline/stringifier-attribute.json | 55 + test/syntax/baseline/stringifier-custom.json | 88 + test/syntax/baseline/stringifier.json | 50 + test/syntax/baseline/treatasnull.json | 91 + test/syntax/baseline/treatasundefined.json | 91 + .../{json => baseline}/typedef-union.json | 41 +- test/syntax/baseline/typedef.json | 219 + test/syntax/baseline/typesuffixes.json | 58 + test/syntax/{json => baseline}/uniontype.json | 123 +- test/syntax/baseline/variadic-operations.json | 97 + test/syntax/idl/attributes.widl | 2 +- test/syntax/idl/dictionary.widl | 4 +- test/syntax/idl/documentation-dos.widl | 66 +- test/syntax/idl/enum.widl | 2 +- test/syntax/idl/escaped-name.widl | 2 + test/syntax/idl/escaped-type.widl | 2 + test/syntax/idl/identifier-hyphen.widl | 3 + test/syntax/idl/mixin.widl | 2 + test/syntax/idl/namespace.widl | 4 +- test/syntax/idl/nullable.widl | 7 +- test/syntax/idl/typedef.widl | 2 +- test/syntax/json/allowany.json | 112 - test/syntax/json/attributes.json | 47 - test/syntax/json/callback.json | 126 - test/syntax/json/constructor.json | 113 - test/syntax/json/documentation-dos.json | 10 - test/syntax/json/enum.json | 138 - test/syntax/json/equivalent-decl.json | 326 - test/syntax/json/extended-attributes.json | 240 - test/syntax/json/generic.json | 176 - test/syntax/json/getter-setter.json | 119 - .../json/identifier-qualified-names.json | 189 - test/syntax/json/implements.json | 113 - test/syntax/json/indexed-properties.json | 283 - test/syntax/json/inherits-getter.json | 101 - test/syntax/json/interface-inherits.json | 83 - test/syntax/json/legacyiterable.json | 25 - test/syntax/json/maplike.json | 112 - test/syntax/json/namedconstructor.json | 46 - test/syntax/json/namespace.json | 141 - test/syntax/json/nointerfaceobject.json | 55 - test/syntax/json/nullable.json | 56 - test/syntax/json/nullableobjects.json | 101 - test/syntax/json/operation-optional-arg.json | 99 - test/syntax/json/overloading.json | 328 - test/syntax/json/overridebuiltins.json | 73 - test/syntax/json/primitives.json | 317 - test/syntax/json/promise-void.json | 36 - test/syntax/json/prototyperoot.json | 36 - test/syntax/json/putforwards.json | 57 - test/syntax/json/record.json | 220 - test/syntax/json/reg-operations.json | 166 - test/syntax/json/replaceable.json | 56 - test/syntax/json/sequence.json | 142 - test/syntax/json/static.json | 160 - test/syntax/json/stringifier-attribute.json | 54 - test/syntax/json/stringifier-custom.json | 92 - test/syntax/json/stringifier.json | 49 - test/syntax/json/treatasnull.json | 94 - test/syntax/json/treatasundefined.json | 94 - test/syntax/json/typedef.json | 233 - test/syntax/json/typesuffixes.json | 55 - test/syntax/json/variadic-operations.json | 103 - test/util/acquire.js | 11 +- test/util/collect.js | 41 +- test/writer.js | 170 +- webpack.config.js | 14 + 251 files changed, 14217 insertions(+), 7853 deletions(-) create mode 100644 .eslintrc.json create mode 100644 .gitattributes delete mode 100644 coverage.html create mode 100644 dist/webidl2.js create mode 100644 dist/webidl2.js.map create mode 100644 lib/error.js create mode 100644 lib/productions/base.js create mode 100644 lib/productions/default.js create mode 100644 lib/productions/enum.js create mode 100644 lib/productions/helpers.js create mode 100644 lib/productions/includes.js create mode 100644 lib/productions/token.js create mode 100644 lib/tokeniser.js create mode 100644 lib/validator.js create mode 100644 test/invalid/baseline/array.txt create mode 100644 test/invalid/baseline/caller.txt create mode 100644 test/invalid/baseline/const-null.txt create mode 100644 test/invalid/baseline/const-nullable.txt create mode 100644 test/invalid/baseline/dict-field-unterminated.txt create mode 100644 test/invalid/baseline/dict-no-default.txt create mode 100644 test/invalid/baseline/dict-required-default.txt create mode 100644 test/invalid/baseline/duplicate-escaped.txt create mode 100644 test/invalid/baseline/duplicate.txt create mode 100644 test/invalid/baseline/enum-bodyless.txt create mode 100644 test/invalid/baseline/enum-empty.txt create mode 100644 test/invalid/baseline/enum-wo-comma.txt create mode 100644 test/invalid/baseline/enum.txt create mode 100644 test/invalid/baseline/exception.txt create mode 100644 test/invalid/baseline/extattr-double.txt create mode 100644 test/invalid/baseline/extattr-empty-ids.txt create mode 100644 test/invalid/baseline/float.txt create mode 100644 test/invalid/baseline/frozenarray-empty.txt create mode 100644 test/invalid/baseline/id-underscored-number.txt create mode 100644 test/invalid/baseline/implements.txt create mode 100644 test/invalid/baseline/implements_and_includes_ws.txt create mode 100644 test/invalid/baseline/iterable-empty.txt create mode 100644 test/invalid/baseline/iterator.txt create mode 100644 test/invalid/baseline/legacyiterable.txt create mode 100644 test/invalid/baseline/maplike-1type.txt create mode 100644 test/invalid/baseline/module.txt create mode 100644 test/invalid/baseline/namespace-readwrite.txt create mode 100644 test/invalid/baseline/no-semicolon-callback.txt create mode 100644 test/invalid/baseline/no-semicolon.txt create mode 100644 test/invalid/baseline/nonnullableany.txt create mode 100644 test/invalid/baseline/nonnullableobjects.txt create mode 100644 test/invalid/baseline/operation-too-special.txt create mode 100644 test/invalid/baseline/overloads.txt create mode 100644 test/invalid/baseline/promise-empty.txt create mode 100644 test/invalid/baseline/promise-nullable.txt create mode 100644 test/invalid/baseline/promise-with-extended-attribute.txt create mode 100644 test/invalid/baseline/raises.txt create mode 100644 test/invalid/baseline/readonly-iterable.txt create mode 100644 test/invalid/baseline/record-key-with-extended-attribute.txt create mode 100644 test/invalid/baseline/record-key.txt create mode 100644 test/invalid/baseline/record-single.txt create mode 100644 test/invalid/baseline/scopedname.txt create mode 100644 test/invalid/baseline/sequence-empty.txt create mode 100644 test/invalid/baseline/sequenceAsAttribute.txt create mode 100644 test/invalid/baseline/setlike-2types.txt create mode 100644 test/invalid/baseline/setter-creator.txt create mode 100644 test/invalid/baseline/spaced-negative-infinity.txt create mode 100644 test/invalid/baseline/spaced-variadic.txt create mode 100644 test/invalid/baseline/special-omittable.txt create mode 100644 test/invalid/baseline/stray-slash.txt create mode 100644 test/invalid/baseline/stringconstants.txt create mode 100644 test/invalid/baseline/typedef-nested.txt create mode 100644 test/invalid/baseline/union-any.txt create mode 100644 test/invalid/baseline/union-dangling-or.txt create mode 100644 test/invalid/baseline/union-one.txt create mode 100644 test/invalid/baseline/union-zero.txt create mode 100644 test/invalid/baseline/unknown-generic.txt create mode 100644 test/invalid/idl/const-null.widl create mode 100644 test/invalid/idl/const-nullable.widl create mode 100644 test/invalid/idl/dict-field-unterminated.widl create mode 100644 test/invalid/idl/dict-no-default.widl create mode 100644 test/invalid/idl/duplicate-escaped.widl create mode 100644 test/invalid/idl/enum-bodyless.widl create mode 100644 test/invalid/idl/extattr-double.widl create mode 100644 test/invalid/idl/float.widl create mode 100644 test/invalid/idl/frozenarray-empty.widl rename test/{syntax => invalid}/idl/implements.widl (100%) create mode 100644 test/invalid/idl/iterable-empty.widl rename test/{syntax => invalid}/idl/legacyiterable.widl (100%) create mode 100644 test/invalid/idl/operation-too-special.widl create mode 100644 test/invalid/idl/overloads.widl create mode 100644 test/invalid/idl/promise-empty.widl create mode 100644 test/invalid/idl/sequence-empty.widl create mode 100644 test/invalid/idl/union-any.widl delete mode 100644 test/invalid/json/array.json delete mode 100644 test/invalid/json/caller.json delete mode 100644 test/invalid/json/dict-required-default.json delete mode 100644 test/invalid/json/duplicate.json delete mode 100644 test/invalid/json/enum-empty.json delete mode 100644 test/invalid/json/enum-wo-comma.json delete mode 100644 test/invalid/json/enum.json delete mode 100644 test/invalid/json/exception.json delete mode 100644 test/invalid/json/extattr-empty-ids.json delete mode 100644 test/invalid/json/id-underscored-number.json delete mode 100644 test/invalid/json/implements_and_includes_ws.json delete mode 100644 test/invalid/json/iterator.json delete mode 100644 test/invalid/json/maplike-1type.json delete mode 100644 test/invalid/json/module.json delete mode 100644 test/invalid/json/namespace-readwrite.json delete mode 100644 test/invalid/json/no-semicolon-callback.json delete mode 100644 test/invalid/json/no-semicolon.json delete mode 100644 test/invalid/json/nonnullableany.json delete mode 100644 test/invalid/json/nonnullableobjects.json delete mode 100644 test/invalid/json/promise-nullable.json delete mode 100644 test/invalid/json/promise-with-extended-attribute.json delete mode 100644 test/invalid/json/raises.json delete mode 100644 test/invalid/json/readonly-iterable.json delete mode 100644 test/invalid/json/record-key-with-extended-attribute.json delete mode 100644 test/invalid/json/record-key.json delete mode 100644 test/invalid/json/record-single.json delete mode 100644 test/invalid/json/scopedname.json delete mode 100644 test/invalid/json/sequenceAsAttribute.json delete mode 100644 test/invalid/json/setlike-2types.json delete mode 100644 test/invalid/json/setter-creator.json delete mode 100644 test/invalid/json/spaced-negative-infinity.json delete mode 100644 test/invalid/json/spaced-variadic.json delete mode 100644 test/invalid/json/special-omittable.json delete mode 100644 test/invalid/json/stray-slash.json delete mode 100644 test/invalid/json/stringconstants.json delete mode 100644 test/invalid/json/typedef-nested.json delete mode 100644 test/invalid/json/union-dangling-or.json delete mode 100644 test/invalid/json/union-one.json delete mode 100644 test/invalid/json/union-zero.json delete mode 100644 test/invalid/json/unknown-generic.json create mode 100644 test/syntax/baseline/allowany.json create mode 100644 test/syntax/baseline/attributes.json create mode 100644 test/syntax/baseline/callback.json rename test/syntax/{json => baseline}/constants.json (64%) create mode 100644 test/syntax/baseline/constructor.json rename test/syntax/{json => baseline}/dictionary-inherits.json (56%) rename test/syntax/{json => baseline}/dictionary.json (53%) create mode 100644 test/syntax/baseline/documentation-dos.json rename test/syntax/{json => baseline}/documentation.json (50%) create mode 100644 test/syntax/baseline/enum.json create mode 100644 test/syntax/baseline/equivalent-decl.json create mode 100644 test/syntax/baseline/escaped-name.json create mode 100644 test/syntax/baseline/escaped-type.json rename test/syntax/{json => baseline}/exception-inheritance.json (100%) create mode 100644 test/syntax/baseline/extended-attributes.json create mode 100644 test/syntax/baseline/generic.json create mode 100644 test/syntax/baseline/getter-setter.json create mode 100644 test/syntax/baseline/identifier-hyphen.json create mode 100644 test/syntax/baseline/identifier-qualified-names.json create mode 100644 test/syntax/baseline/indexed-properties.json create mode 100644 test/syntax/baseline/inherits-getter.json create mode 100644 test/syntax/baseline/interface-inherits.json rename test/syntax/{json => baseline}/iterable.json (51%) rename test/syntax/{json => baseline}/iterator.json (100%) create mode 100644 test/syntax/baseline/maplike.json rename test/syntax/{json => baseline}/mixin.json (51%) create mode 100644 test/syntax/baseline/namedconstructor.json create mode 100644 test/syntax/baseline/namespace.json create mode 100644 test/syntax/baseline/nointerfaceobject.json create mode 100644 test/syntax/baseline/nullable.json create mode 100644 test/syntax/baseline/nullableobjects.json create mode 100644 test/syntax/baseline/operation-optional-arg.json create mode 100644 test/syntax/baseline/overloading.json create mode 100644 test/syntax/baseline/overridebuiltins.json rename test/syntax/{json => baseline}/partial-interface.json (50%) create mode 100644 test/syntax/baseline/primitives.json create mode 100644 test/syntax/baseline/promise-void.json create mode 100644 test/syntax/baseline/prototyperoot.json create mode 100644 test/syntax/baseline/putforwards.json create mode 100644 test/syntax/baseline/record.json create mode 100644 test/syntax/baseline/reg-operations.json create mode 100644 test/syntax/baseline/replaceable.json create mode 100644 test/syntax/baseline/sequence.json rename test/syntax/{json => baseline}/setlike.json (50%) create mode 100644 test/syntax/baseline/static.json create mode 100644 test/syntax/baseline/stringifier-attribute.json create mode 100644 test/syntax/baseline/stringifier-custom.json create mode 100644 test/syntax/baseline/stringifier.json create mode 100644 test/syntax/baseline/treatasnull.json create mode 100644 test/syntax/baseline/treatasundefined.json rename test/syntax/{json => baseline}/typedef-union.json (55%) create mode 100644 test/syntax/baseline/typedef.json create mode 100644 test/syntax/baseline/typesuffixes.json rename test/syntax/{json => baseline}/uniontype.json (54%) create mode 100644 test/syntax/baseline/variadic-operations.json create mode 100644 test/syntax/idl/escaped-name.widl create mode 100644 test/syntax/idl/escaped-type.widl create mode 100644 test/syntax/idl/identifier-hyphen.widl delete mode 100644 test/syntax/json/allowany.json delete mode 100644 test/syntax/json/attributes.json delete mode 100644 test/syntax/json/callback.json delete mode 100644 test/syntax/json/constructor.json delete mode 100644 test/syntax/json/documentation-dos.json delete mode 100644 test/syntax/json/enum.json delete mode 100644 test/syntax/json/equivalent-decl.json delete mode 100644 test/syntax/json/extended-attributes.json delete mode 100644 test/syntax/json/generic.json delete mode 100644 test/syntax/json/getter-setter.json delete mode 100644 test/syntax/json/identifier-qualified-names.json delete mode 100644 test/syntax/json/implements.json delete mode 100644 test/syntax/json/indexed-properties.json delete mode 100644 test/syntax/json/inherits-getter.json delete mode 100644 test/syntax/json/interface-inherits.json delete mode 100644 test/syntax/json/legacyiterable.json delete mode 100644 test/syntax/json/maplike.json delete mode 100644 test/syntax/json/namedconstructor.json delete mode 100644 test/syntax/json/namespace.json delete mode 100644 test/syntax/json/nointerfaceobject.json delete mode 100644 test/syntax/json/nullable.json delete mode 100644 test/syntax/json/nullableobjects.json delete mode 100644 test/syntax/json/operation-optional-arg.json delete mode 100644 test/syntax/json/overloading.json delete mode 100644 test/syntax/json/overridebuiltins.json delete mode 100644 test/syntax/json/primitives.json delete mode 100644 test/syntax/json/promise-void.json delete mode 100644 test/syntax/json/prototyperoot.json delete mode 100644 test/syntax/json/putforwards.json delete mode 100644 test/syntax/json/record.json delete mode 100644 test/syntax/json/reg-operations.json delete mode 100644 test/syntax/json/replaceable.json delete mode 100644 test/syntax/json/sequence.json delete mode 100644 test/syntax/json/static.json delete mode 100644 test/syntax/json/stringifier-attribute.json delete mode 100644 test/syntax/json/stringifier-custom.json delete mode 100644 test/syntax/json/stringifier.json delete mode 100644 test/syntax/json/treatasnull.json delete mode 100644 test/syntax/json/treatasundefined.json delete mode 100644 test/syntax/json/typedef.json delete mode 100644 test/syntax/json/typesuffixes.json delete mode 100644 test/syntax/json/variadic-operations.json create mode 100644 webpack.config.js diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000000000..1f60b8def50ff5 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,22 @@ +{ + "env": { + "browser": true, + "commonjs": true, + "amd": true, + "es6": true, + "node": true, + "mocha": true + }, + "extends": "eslint:recommended", + "rules": { + "no-constant-condition": ["error", { "checkLoops": false }], + "no-eval": "error", + "no-implied-eval": "error", + "no-trailing-spaces": "error", + "prefer-const": "error", + "semi": "error" + }, + "parserOptions": { + "sourceType": "module" + } +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000000..9b5bbd2fab7b93 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# Auto detect text files and perform LF normalization +* text=auto +/test/*/** text eol=lf diff --git a/.travis.yml b/.travis.yml index 6dc8e2bdbaa6cf..f25ddb568a2e09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,4 @@ language: node_js node_js: - node - lts/* - - 6 + - 8 diff --git a/CHANGELOG.md b/CHANGELOG.md index 91e22275e0700e..1ccfd464873a37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,403 @@ # Change Log +## [v20.0.1](https://github.com/w3c/webidl2.js/tree/v20.0.1) (2019-05-01) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v20.0.0...v20.0.1) + +**Closed issues:** + +- Is this the reference parser implementation for the latest webidl spec? [\#316](https://github.com/w3c/webidl2.js/issues/316) + +**Merged pull requests:** + +- refactor\(lib/webidl2\): enum as a module [\#318](https://github.com/w3c/webidl2.js/pull/318) ([saschanaz](https://github.com/saschanaz)) +- fix\(lib/webidl2\): emit error message correctly [\#317](https://github.com/w3c/webidl2.js/pull/317) ([saschanaz](https://github.com/saschanaz)) +- docs\(lib/writer\): document generic\(\) [\#315](https://github.com/w3c/webidl2.js/pull/315) ([saschanaz](https://github.com/saschanaz)) + +## [v20.0.0](https://github.com/w3c/webidl2.js/tree/v20.0.0) (2019-04-30) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v19.0.1...v20.0.0) + +**Merged pull requests:** + +- BREAKING CHANGE: introduce `generic\(\)` writer hook [\#314](https://github.com/w3c/webidl2.js/pull/314) ([saschanaz](https://github.com/saschanaz)) +- refactor\(lib/webidl2\): modularize Default [\#312](https://github.com/w3c/webidl2.js/pull/312) ([saschanaz](https://github.com/saschanaz)) +- refactor: modularize Token and list\(\) [\#311](https://github.com/w3c/webidl2.js/pull/311) ([saschanaz](https://github.com/saschanaz)) +- refactor: modularize Includes [\#310](https://github.com/w3c/webidl2.js/pull/310) ([saschanaz](https://github.com/saschanaz)) + +## [v19.0.1](https://github.com/w3c/webidl2.js/tree/v19.0.1) (2019-04-19) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v19.0.0...v19.0.1) + +**Merged pull requests:** + +- fix\(lib/writer\): call ts.trivia with actual string [\#309](https://github.com/w3c/webidl2.js/pull/309) ([saschanaz](https://github.com/saschanaz)) + +## [v19.0.0](https://github.com/w3c/webidl2.js/tree/v19.0.0) (2019-04-18) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v18.0.1...v19.0.0) + +**Closed issues:** + +- Keyword `float` and type `float` is ambiguous [\#302](https://github.com/w3c/webidl2.js/issues/302) +- Docs: Trivia object not well defined [\#225](https://github.com/w3c/webidl2.js/issues/225) +- Meta - conforming Web IDL validator [\#138](https://github.com/w3c/webidl2.js/issues/138) + +**Merged pull requests:** + +- fix\(lib/webidl2\): restore error fields [\#308](https://github.com/w3c/webidl2.js/pull/308) ([saschanaz](https://github.com/saschanaz)) +- fix\(webidl2\): rename float as decimal [\#307](https://github.com/w3c/webidl2.js/pull/307) ([saschanaz](https://github.com/saschanaz)) +- BREAKING CHANGE: remove all trivia fields [\#306](https://github.com/w3c/webidl2.js/pull/306) ([saschanaz](https://github.com/saschanaz)) +- BREAKING CHANGE: remove baseName and escaped\* fields [\#305](https://github.com/w3c/webidl2.js/pull/305) ([saschanaz](https://github.com/saschanaz)) +- BREAKING CHANGE: remove token fields [\#304](https://github.com/w3c/webidl2.js/pull/304) ([saschanaz](https://github.com/saschanaz)) +- BREAKING CHANGE: remove trivia from boolean fields [\#303](https://github.com/w3c/webidl2.js/pull/303) ([saschanaz](https://github.com/saschanaz)) +- refactor: merge error functions [\#299](https://github.com/w3c/webidl2.js/pull/299) ([saschanaz](https://github.com/saschanaz)) +- fix\(checker\): add an empty line between messages [\#298](https://github.com/w3c/webidl2.js/pull/298) ([saschanaz](https://github.com/saschanaz)) + +## [v18.0.1](https://github.com/w3c/webidl2.js/tree/v18.0.1) (2019-03-22) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v18.0.0...v18.0.1) + +## [v18.0.0](https://github.com/w3c/webidl2.js/tree/v18.0.0) (2019-03-22) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v17.0.2...v18.0.0) + +**Closed issues:** + +- Argument cannot have double extended attributes [\#191](https://github.com/w3c/webidl2.js/issues/191) +- Rename idlType.idlType [\#136](https://github.com/w3c/webidl2.js/issues/136) + +**Merged pull requests:** + +- fix\(lib/validator\): validate when overloads are all from mixins [\#296](https://github.com/w3c/webidl2.js/pull/296) ([saschanaz](https://github.com/saschanaz)) +- refactor: use module for checker [\#295](https://github.com/w3c/webidl2.js/pull/295) ([saschanaz](https://github.com/saschanaz)) +- fix: update checker to use webpack build result [\#294](https://github.com/w3c/webidl2.js/pull/294) ([saschanaz](https://github.com/saschanaz)) +- refactor: use ES module syntax and bundle by webpack [\#293](https://github.com/w3c/webidl2.js/pull/293) ([saschanaz](https://github.com/saschanaz)) +- feat: add validation feature to the checker page [\#292](https://github.com/w3c/webidl2.js/pull/292) ([saschanaz](https://github.com/saschanaz)) +- refactor: remove remaining JSON idlTypes [\#291](https://github.com/w3c/webidl2.js/pull/291) ([saschanaz](https://github.com/saschanaz)) +- refactor: use Type for primitive types [\#290](https://github.com/w3c/webidl2.js/pull/290) ([saschanaz](https://github.com/saschanaz)) +- refactor: generic type as a class [\#289](https://github.com/w3c/webidl2.js/pull/289) ([saschanaz](https://github.com/saschanaz)) +- refactor: union type as a class [\#288](https://github.com/w3c/webidl2.js/pull/288) ([saschanaz](https://github.com/saschanaz)) +- refactor: argument as a class [\#287](https://github.com/w3c/webidl2.js/pull/287) ([saschanaz](https://github.com/saschanaz)) +- fix\(lib/webidl2\): disallow empty generic type [\#286](https://github.com/w3c/webidl2.js/pull/286) ([saschanaz](https://github.com/saschanaz)) +- refactor: use list\(\) in identifiers\(\)/enums [\#285](https://github.com/w3c/webidl2.js/pull/285) ([saschanaz](https://github.com/saschanaz)) +- fix\(lib/webidl2\): disallow null on constants [\#284](https://github.com/w3c/webidl2.js/pull/284) ([saschanaz](https://github.com/saschanaz)) +- refactor: extended attributes as a class [\#283](https://github.com/w3c/webidl2.js/pull/283) ([saschanaz](https://github.com/saschanaz)) +- refactor: extended attribute as a class [\#282](https://github.com/w3c/webidl2.js/pull/282) ([saschanaz](https://github.com/saschanaz)) +- refactor: default value as a class [\#281](https://github.com/w3c/webidl2.js/pull/281) ([saschanaz](https://github.com/saschanaz)) +- BREAKING CHANGE: constant as a class [\#280](https://github.com/w3c/webidl2.js/pull/280) ([saschanaz](https://github.com/saschanaz)) +- test\(lib/webidl2\): nullable constant with typedef identifiers [\#279](https://github.com/w3c/webidl2.js/pull/279) ([saschanaz](https://github.com/saschanaz)) +- refactor: callback function as a class [\#278](https://github.com/w3c/webidl2.js/pull/278) ([saschanaz](https://github.com/saschanaz)) +- test\(lib/webidl2\): case for double extended attributes in arguments [\#277](https://github.com/w3c/webidl2.js/pull/277) ([saschanaz](https://github.com/saschanaz)) +- refactor: attribute as a class [\#276](https://github.com/w3c/webidl2.js/pull/276) ([saschanaz](https://github.com/saschanaz)) +- refactor: operation as a class [\#275](https://github.com/w3c/webidl2.js/pull/275) ([saschanaz](https://github.com/saschanaz)) +- refactor: iterable as a class [\#274](https://github.com/w3c/webidl2.js/pull/274) ([saschanaz](https://github.com/saschanaz)) +- refactor\(lib/writer\): use tokens object in container\(\) [\#273](https://github.com/w3c/webidl2.js/pull/273) ([saschanaz](https://github.com/saschanaz)) +- refactor: interface/mixin as classes [\#272](https://github.com/w3c/webidl2.js/pull/272) ([saschanaz](https://github.com/saschanaz)) +- refactor: namespace as a class [\#271](https://github.com/w3c/webidl2.js/pull/271) ([saschanaz](https://github.com/saschanaz)) +- refactor: dictionary as a class [\#270](https://github.com/w3c/webidl2.js/pull/270) ([saschanaz](https://github.com/saschanaz)) +- refactor\(lib/webidl2\): move toJSON to Definition [\#269](https://github.com/w3c/webidl2.js/pull/269) ([saschanaz](https://github.com/saschanaz)) +- refactor: field as a class [\#268](https://github.com/w3c/webidl2.js/pull/268) ([saschanaz](https://github.com/saschanaz)) +- refactor: enum as a class [\#267](https://github.com/w3c/webidl2.js/pull/267) ([saschanaz](https://github.com/saschanaz)) +- refactor: typedef as a class [\#266](https://github.com/w3c/webidl2.js/pull/266) ([saschanaz](https://github.com/saschanaz)) +- refactor: includes as a class [\#265](https://github.com/w3c/webidl2.js/pull/265) ([saschanaz](https://github.com/saschanaz)) +- chore: add .gitattributes [\#264](https://github.com/w3c/webidl2.js/pull/264) ([saschanaz](https://github.com/saschanaz)) +- style: apply no-trailing-spaces [\#263](https://github.com/w3c/webidl2.js/pull/263) ([saschanaz](https://github.com/saschanaz)) +- refactor: self-containing classes [\#262](https://github.com/w3c/webidl2.js/pull/262) ([saschanaz](https://github.com/saschanaz)) + +## [v17.0.2](https://github.com/w3c/webidl2.js/tree/v17.0.2) (2019-02-15) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v17.0.1...v17.0.2) + +**Closed issues:** + +- Point GitHub Pages at the master branch so the checker can be used online [\#259](https://github.com/w3c/webidl2.js/issues/259) + +**Merged pull requests:** + +- fix\(lib/webidl2\): allow a preceding hyphen for identifiers [\#261](https://github.com/w3c/webidl2.js/pull/261) ([saschanaz](https://github.com/saschanaz)) +- fix\(checker\): avoid using innerText [\#260](https://github.com/w3c/webidl2.js/pull/260) ([saschanaz](https://github.com/saschanaz)) +- fix\(lib/webidl2\): restore enum value string form in error [\#258](https://github.com/w3c/webidl2.js/pull/258) ([saschanaz](https://github.com/saschanaz)) +- Lowercase the example namespace "Console" [\#257](https://github.com/w3c/webidl2.js/pull/257) ([foolip](https://github.com/foolip)) + +## [v17.0.1](https://github.com/w3c/webidl2.js/tree/v17.0.1) (2018-12-11) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v17.0.0...v17.0.1) + +**Closed issues:** + +- idlTypes should unescape type name [\#252](https://github.com/w3c/webidl2.js/issues/252) +- Union type must not allow `any` type [\#250](https://github.com/w3c/webidl2.js/issues/250) +- Include statements do not unescape type names [\#249](https://github.com/w3c/webidl2.js/issues/249) + +**Merged pull requests:** + +- fix\(lib/webidl2\): prevent any in a union type [\#254](https://github.com/w3c/webidl2.js/pull/254) ([saschanaz](https://github.com/saschanaz)) +- fix: unescape includes/idlTypes/inheritances [\#253](https://github.com/w3c/webidl2.js/pull/253) ([saschanaz](https://github.com/saschanaz)) +- feat\(lib/webidl\): subclass standard error [\#247](https://github.com/w3c/webidl2.js/pull/247) ([saschanaz](https://github.com/saschanaz)) + +## [v17.0.0](https://github.com/w3c/webidl2.js/tree/v17.0.0) (2018-12-08) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v16.1.0...v17.0.0) + +**Closed issues:** + +- Arguments shouldn't get its own extended attributes [\#246](https://github.com/w3c/webidl2.js/issues/246) +- Modify writer to be ReSpec compatible [\#210](https://github.com/w3c/webidl2.js/issues/210) + +**Merged pull requests:** + +- BREAKING CHANGE: remove .extAttrs from arguments [\#248](https://github.com/w3c/webidl2.js/pull/248) ([saschanaz](https://github.com/saschanaz)) + +## [v16.1.0](https://github.com/w3c/webidl2.js/tree/v16.1.0) (2018-12-02) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v16.0.0...v16.1.0) + +**Closed issues:** + +- Emit preceding tokens for error messages [\#180](https://github.com/w3c/webidl2.js/issues/180) + +**Merged pull requests:** + +- Add unit tests for writer template functions [\#245](https://github.com/w3c/webidl2.js/pull/245) ([saschanaz](https://github.com/saschanaz)) +- feat\(lib/webidl2\): better error messages [\#244](https://github.com/w3c/webidl2.js/pull/244) ([saschanaz](https://github.com/saschanaz)) +- Add docs for template feature [\#243](https://github.com/w3c/webidl2.js/pull/243) ([saschanaz](https://github.com/saschanaz)) +- \[WIP\] write\(\) with optional templates [\#241](https://github.com/w3c/webidl2.js/pull/241) ([saschanaz](https://github.com/saschanaz)) + +## [v16.0.0](https://github.com/w3c/webidl2.js/tree/v16.0.0) (2018-11-24) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v15.0.0...v16.0.0) + +**Implemented enhancements:** + +- eslint: prevent eval\(\) [\#234](https://github.com/w3c/webidl2.js/pull/234) ([tripu](https://github.com/tripu)) + +**Closed issues:** + +- Revise README document about testing [\#164](https://github.com/w3c/webidl2.js/issues/164) +- document white space [\#97](https://github.com/w3c/webidl2.js/issues/97) +- types of types [\#93](https://github.com/w3c/webidl2.js/issues/93) + +**Merged pull requests:** + +- BREAKING CHANGE: merge modifier fields [\#240](https://github.com/w3c/webidl2.js/pull/240) ([saschanaz](https://github.com/saschanaz)) +- refactor\(lib/writer\): use interface\_like\(\) [\#239](https://github.com/w3c/webidl2.js/pull/239) ([saschanaz](https://github.com/saschanaz)) +- refactor\(lib/writer\): use token\(\) [\#238](https://github.com/w3c/webidl2.js/pull/238) ([saschanaz](https://github.com/saschanaz)) +- refactor\(lib/writer\): reduce conditional constructs [\#237](https://github.com/w3c/webidl2.js/pull/237) ([saschanaz](https://github.com/saschanaz)) +- Remove jscoverage file and guide [\#236](https://github.com/w3c/webidl2.js/pull/236) ([saschanaz](https://github.com/saschanaz)) +- chore\(package\): update eslint [\#235](https://github.com/w3c/webidl2.js/pull/235) ([saschanaz](https://github.com/saschanaz)) + +## [v15.0.0](https://github.com/w3c/webidl2.js/tree/v15.0.0) (2018-10-11) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v14.0.1...v15.0.0) + +**Fixed bugs:** + +- Some leading underscores are no longer removed [\#228](https://github.com/w3c/webidl2.js/issues/228) + +**Closed issues:** + +- Enum value type should be "enum-value" not "string" [\#231](https://github.com/w3c/webidl2.js/issues/231) +- \[ExtendedAttribute=null\] no longer parses [\#227](https://github.com/w3c/webidl2.js/issues/227) +- Promise\ doesn't parse [\#226](https://github.com/w3c/webidl2.js/issues/226) +- Extended attributes parser is too permissive [\#222](https://github.com/w3c/webidl2.js/issues/222) +- Update changelog [\#215](https://github.com/w3c/webidl2.js/issues/215) +- Remove implements statement support [\#98](https://github.com/w3c/webidl2.js/issues/98) + +**Merged pull requests:** + +- docs\(README\): enum value's type is now enum-value [\#233](https://github.com/w3c/webidl2.js/pull/233) ([marcoscaceres](https://github.com/marcoscaceres)) +- fix: enum values should be of type enum-value [\#232](https://github.com/w3c/webidl2.js/pull/232) ([marcoscaceres](https://github.com/marcoscaceres)) +- fix: escape non-member top identifiers [\#229](https://github.com/w3c/webidl2.js/pull/229) ([saschanaz](https://github.com/saschanaz)) +- fix\(lib/webidl\): disallow multiple special keywords [\#224](https://github.com/w3c/webidl2.js/pull/224) ([saschanaz](https://github.com/saschanaz)) +- refactor\(lib/writer\): horizontally shorter type\(\) [\#221](https://github.com/w3c/webidl2.js/pull/221) ([saschanaz](https://github.com/saschanaz)) +- chore\(README\): operation body always has idlType [\#218](https://github.com/w3c/webidl2.js/pull/218) ([saschanaz](https://github.com/saschanaz)) +- DO NOT MERGE YET: Drop support for implements statement [\#106](https://github.com/w3c/webidl2.js/pull/106) ([saschanaz](https://github.com/saschanaz)) + +## [v14.0.1](https://github.com/w3c/webidl2.js/tree/v14.0.1) (2018-06-20) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v14.0.0...v14.0.1) + +**Merged pull requests:** + +- fix\(index\): import writer from index [\#219](https://github.com/w3c/webidl2.js/pull/219) ([saschanaz](https://github.com/saschanaz)) + +## [v14.0.0](https://github.com/w3c/webidl2.js/tree/v14.0.0) (2018-06-19) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v13.0.3...v14.0.0) + +**Closed issues:** + +- Use ESLint \(with Travis\) [\#167](https://github.com/w3c/webidl2.js/issues/167) +- Support full whitespace conservation [\#125](https://github.com/w3c/webidl2.js/issues/125) + +**Merged pull requests:** + +- Document changes for idlType and extAttrs [\#217](https://github.com/w3c/webidl2.js/pull/217) ([saschanaz](https://github.com/saschanaz)) +- BREAKING CHANGE: remove support for legacyiterable [\#216](https://github.com/w3c/webidl2.js/pull/216) ([saschanaz](https://github.com/saschanaz)) +- Document trivia for root type declarations/members [\#214](https://github.com/w3c/webidl2.js/pull/214) ([saschanaz](https://github.com/saschanaz)) +- Document trivia for iterable-likes [\#213](https://github.com/w3c/webidl2.js/pull/213) ([saschanaz](https://github.com/saschanaz)) +- Document trivia for interfaces/mixins/namespaces [\#212](https://github.com/w3c/webidl2.js/pull/212) ([saschanaz](https://github.com/saschanaz)) +- Document generic array, escapedName and removal of sequence [\#211](https://github.com/w3c/webidl2.js/pull/211) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for implements/includes [\#209](https://github.com/w3c/webidl2.js/pull/209) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for enums and typedefs [\#207](https://github.com/w3c/webidl2.js/pull/207) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for callbacks [\#206](https://github.com/w3c/webidl2.js/pull/206) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for partial types [\#205](https://github.com/w3c/webidl2.js/pull/205) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for dictionaries [\#204](https://github.com/w3c/webidl2.js/pull/204) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for mixins and namespaces [\#203](https://github.com/w3c/webidl2.js/pull/203) ([saschanaz](https://github.com/saschanaz)) +- Use eslint minimally [\#202](https://github.com/w3c/webidl2.js/pull/202) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for extended attributes [\#201](https://github.com/w3c/webidl2.js/pull/201) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for extended attribute identifiers [\#200](https://github.com/w3c/webidl2.js/pull/200) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for const member type [\#199](https://github.com/w3c/webidl2.js/pull/199) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for arguments [\#198](https://github.com/w3c/webidl2.js/pull/198) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for operation [\#197](https://github.com/w3c/webidl2.js/pull/197) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for inheritance [\#195](https://github.com/w3c/webidl2.js/pull/195) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for iterable declarations [\#194](https://github.com/w3c/webidl2.js/pull/194) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for modifiers [\#193](https://github.com/w3c/webidl2.js/pull/193) ([saschanaz](https://github.com/saschanaz)) +- Add trivia for idlTypes [\#192](https://github.com/w3c/webidl2.js/pull/192) ([saschanaz](https://github.com/saschanaz)) +- BREAKING CHANGE: move nullable field from const type to .idlType [\#189](https://github.com/w3c/webidl2.js/pull/189) ([saschanaz](https://github.com/saschanaz)) +- Generics always as an array [\#188](https://github.com/w3c/webidl2.js/pull/188) ([saschanaz](https://github.com/saschanaz)) +- fix: prevent empty iterable declaration [\#187](https://github.com/w3c/webidl2.js/pull/187) ([saschanaz](https://github.com/saschanaz)) +- Add trivia field for interfaces/mixins [\#186](https://github.com/w3c/webidl2.js/pull/186) ([saschanaz](https://github.com/saschanaz)) +- BREAKING CHANGE: support full whitespace conservation [\#185](https://github.com/w3c/webidl2.js/pull/185) ([saschanaz](https://github.com/saschanaz)) + +## [v13.0.3](https://github.com/w3c/webidl2.js/tree/v13.0.3) (2018-06-04) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v13.0.2...v13.0.3) + +**Merged pull requests:** + +- refactor\(lib/writer\): remove args\(\) [\#184](https://github.com/w3c/webidl2.js/pull/184) ([saschanaz](https://github.com/saschanaz)) +- refactor: consume argument name in object spread way [\#183](https://github.com/w3c/webidl2.js/pull/183) ([saschanaz](https://github.com/saschanaz)) + +## [v13.0.2](https://github.com/w3c/webidl2.js/tree/v13.0.2) (2018-05-30) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v13.0.1...v13.0.2) + +**Closed issues:** + +- Issue with parsing attribute identifiers [\#181](https://github.com/w3c/webidl2.js/issues/181) + +**Merged pull requests:** + +- fix: allow required for an attribute name [\#182](https://github.com/w3c/webidl2.js/pull/182) ([saschanaz](https://github.com/saschanaz)) + +## [v13.0.1](https://github.com/w3c/webidl2.js/tree/v13.0.1) (2018-05-30) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v13.0.0...v13.0.1) + +**Closed issues:** + +- No opening bracket after sequence [\#178](https://github.com/w3c/webidl2.js/issues/178) + +**Merged pull requests:** + +- refactor: unconsume by position [\#179](https://github.com/w3c/webidl2.js/pull/179) ([saschanaz](https://github.com/saschanaz)) + +## [v13.0.0](https://github.com/w3c/webidl2.js/tree/v13.0.0) (2018-05-29) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v12.1.4...v13.0.0) + +**Fixed bugs:** + +- Trailing comma in arguments list with valid IDL [\#169](https://github.com/w3c/webidl2.js/issues/169) +- Error parsing generic type with Promise\ [\#168](https://github.com/w3c/webidl2.js/issues/168) + +**Closed issues:** + +- Do we want idlType.sequence? [\#174](https://github.com/w3c/webidl2.js/issues/174) +- Spaced three-dot shouldn't recognized as a variadic mark [\#162](https://github.com/w3c/webidl2.js/issues/162) + +**Merged pull requests:** + +- fix: consume return type for promise subtype [\#177](https://github.com/w3c/webidl2.js/pull/177) ([saschanaz](https://github.com/saschanaz)) +- Add probe\(\) function [\#176](https://github.com/w3c/webidl2.js/pull/176) ([saschanaz](https://github.com/saschanaz)) +- BREAKING CHANGE: remove idlType.sequence [\#175](https://github.com/w3c/webidl2.js/pull/175) ([saschanaz](https://github.com/saschanaz)) +- fix: prevent incorrect spaced negative infinity and variadic marks [\#173](https://github.com/w3c/webidl2.js/pull/173) ([saschanaz](https://github.com/saschanaz)) +- refactor: merge operation functions [\#172](https://github.com/w3c/webidl2.js/pull/172) ([saschanaz](https://github.com/saschanaz)) +- fix: allow selected keywords in argument name [\#171](https://github.com/w3c/webidl2.js/pull/171) ([saschanaz](https://github.com/saschanaz)) +- fix: write inherit readonly attribute in proper order [\#170](https://github.com/w3c/webidl2.js/pull/170) ([saschanaz](https://github.com/saschanaz)) +- refactor: merge attribute functions [\#166](https://github.com/w3c/webidl2.js/pull/166) ([saschanaz](https://github.com/saschanaz)) + +## [v12.1.4](https://github.com/w3c/webidl2.js/tree/v12.1.4) (2018-05-23) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v12.1.3...v12.1.4) + +**Merged pull requests:** + +- fix: prevent readwrite attributes on namespaces [\#165](https://github.com/w3c/webidl2.js/pull/165) ([saschanaz](https://github.com/saschanaz)) + +## [v12.1.3](https://github.com/w3c/webidl2.js/tree/v12.1.3) (2018-05-20) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v12.1.2...v12.1.3) + +**Merged pull requests:** + +- fix: prevent incorrect union types [\#163](https://github.com/w3c/webidl2.js/pull/163) ([saschanaz](https://github.com/saschanaz)) + +## [v12.1.2](https://github.com/w3c/webidl2.js/tree/v12.1.2) (2018-05-17) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v12.1.1...v12.1.2) + +## [v12.1.1](https://github.com/w3c/webidl2.js/tree/v12.1.1) (2018-05-17) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v12.1.0...v12.1.1) + +**Closed issues:** + +- Request: tag releases [\#159](https://github.com/w3c/webidl2.js/issues/159) +- Remove test/\* things from npm [\#158](https://github.com/w3c/webidl2.js/issues/158) + +**Merged pull requests:** + +- fix: prevent tokeniser error when it meets \_0 [\#161](https://github.com/w3c/webidl2.js/pull/161) ([saschanaz](https://github.com/saschanaz)) +- Add files field to package.json [\#160](https://github.com/w3c/webidl2.js/pull/160) ([saschanaz](https://github.com/saschanaz)) + +## [v12.1.0](https://github.com/w3c/webidl2.js/tree/v12.1.0) (2018-05-16) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v12.0.0...v12.1.0) + +**Closed issues:** + +- Named terminal symbols cannot be identifiers [\#156](https://github.com/w3c/webidl2.js/issues/156) + +**Merged pull requests:** + +- Prevent keywords from being identifiers [\#157](https://github.com/w3c/webidl2.js/pull/157) ([saschanaz](https://github.com/saschanaz)) + +## [v12.0.0](https://github.com/w3c/webidl2.js/tree/v12.0.0) (2018-05-11) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v11.0.0...v12.0.0) + +**Closed issues:** + +- Reduce release size [\#152](https://github.com/w3c/webidl2.js/issues/152) +- Keep supporting allowNestedTypedefs or not? [\#104](https://github.com/w3c/webidl2.js/issues/104) + +**Merged pull requests:** + +- BREAKING CHANGE: remove allowNestedTypedefs [\#155](https://github.com/w3c/webidl2.js/pull/155) ([saschanaz](https://github.com/saschanaz)) +- Remove all\_ws\(\) and gather trivia implicitly [\#154](https://github.com/w3c/webidl2.js/pull/154) ([saschanaz](https://github.com/saschanaz)) +- tests: Remove test/widlproc [\#153](https://github.com/w3c/webidl2.js/pull/153) ([marcoscaceres](https://github.com/marcoscaceres)) + +## [v11.0.0](https://github.com/w3c/webidl2.js/tree/v11.0.0) (2018-05-10) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.3.3...v11.0.0) + +**Merged pull requests:** + +- Prevent incorrect enums [\#151](https://github.com/w3c/webidl2.js/pull/151) ([saschanaz](https://github.com/saschanaz)) +- BREAKING CHANGE: remove opt.ws [\#150](https://github.com/w3c/webidl2.js/pull/150) ([saschanaz](https://github.com/saschanaz)) +- chore\(package\): bump version number to 10.3.3 [\#149](https://github.com/w3c/webidl2.js/pull/149) ([saschanaz](https://github.com/saschanaz)) + +## [v10.3.3](https://github.com/w3c/webidl2.js/tree/v10.3.3) (2018-05-07) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.3.2...v10.3.3) + +**Merged pull requests:** + +- Refactor simple\_extended\_attr\(\); [\#148](https://github.com/w3c/webidl2.js/pull/148) ([saschanaz](https://github.com/saschanaz)) +- Remove description about typePair [\#147](https://github.com/w3c/webidl2.js/pull/147) ([saschanaz](https://github.com/saschanaz)) +- Add a web page implementing a simple WebIDL checker. [\#146](https://github.com/w3c/webidl2.js/pull/146) ([kenrussell](https://github.com/kenrussell)) + +## [v10.3.2](https://github.com/w3c/webidl2.js/tree/v10.3.2) (2018-04-16) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.3.1...v10.3.2) + +**Merged pull requests:** + +- Fix whitespace handling of implements and includes. [\#145](https://github.com/w3c/webidl2.js/pull/145) ([kenrussell](https://github.com/kenrussell)) +- refactor: remove eas.length check [\#144](https://github.com/w3c/webidl2.js/pull/144) ([saschanaz](https://github.com/saschanaz)) +- refactor: one-to-one match for token matcher [\#143](https://github.com/w3c/webidl2.js/pull/143) ([saschanaz](https://github.com/saschanaz)) + +## [v10.3.1](https://github.com/w3c/webidl2.js/tree/v10.3.1) (2018-03-17) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.3.0...v10.3.1) + +**Merged pull requests:** + +- const-type as full IDL Type [\#142](https://github.com/w3c/webidl2.js/pull/142) ([saschanaz](https://github.com/saschanaz)) + +## [v10.3.0](https://github.com/w3c/webidl2.js/tree/v10.3.0) (2018-03-17) +[Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.2.1...v10.3.0) + +**Merged pull requests:** + +- Always add extAttrs for .idlType [\#141](https://github.com/w3c/webidl2.js/pull/141) ([saschanaz](https://github.com/saschanaz)) +- docs\(README\): add types of types \[ci skip\] [\#140](https://github.com/w3c/webidl2.js/pull/140) ([saschanaz](https://github.com/saschanaz)) + ## [v10.2.1](https://github.com/w3c/webidl2.js/tree/v10.2.1) (2018-03-09) [Full Changelog](https://github.com/w3c/webidl2.js/compare/v10.2.0...v10.2.1) @@ -163,7 +561,7 @@ - Check duplicated names [\#80](https://github.com/w3c/webidl2.js/pull/80) ([saschanaz](https://github.com/saschanaz)) - Remove legacycaller [\#79](https://github.com/w3c/webidl2.js/pull/79) ([saschanaz](https://github.com/saschanaz)) -- Add "sequence" property to IDL Type AST definition [\#76](https://github.com/w3c/webidl2.js/pull/76) ([lerouche](https://github.com/lerouche)) +- Add "sequence" property to IDL Type AST definition [\#76](https://github.com/w3c/webidl2.js/pull/76) ([wilsonzlin](https://github.com/wilsonzlin)) ## [v4.1.0](https://github.com/w3c/webidl2.js/tree/v4.1.0) (2017-07-04) [Full Changelog](https://github.com/w3c/webidl2.js/compare/v4.0.0...v4.1.0) diff --git a/README.md b/README.md index 9a8f3f8e9c1dfb..e7b99dcc829f52 100644 --- a/README.md +++ b/README.md @@ -18,33 +18,125 @@ Just the usual. For Node: npm install webidl2 ``` -In the browser: +In the browser without module support: ```HTML - + ``` ## Documentation -The API to WebIDL2 is trivial: you parse a string of WebIDL and it returns a syntax tree. +WebIDL2 provides two functions: `parse` and `write`. -### Parsing +* `parse`: Converts a WebIDL string into a syntax tree. +* `write`: Converts a syntax tree into a WebIDL string. Useful for programmatic code + modification. In Node, that happens with: ```JS -var WebIDL2 = require("webidl2"); -var tree = WebIDL2.parse("string of WebIDL"); +const { parse, write, validate } = require("webidl2"); +const tree = parse("string of WebIDL"); +const text = write(tree); +const validation = validate(tree); ``` In the browser: ```HTML - + + + ``` +`write()` optionally takes a "templates" object, whose properties are functions that process input in different ways (depending on what is needed for output). Every property is optional. Each property is documented below: + +```js +var result = WebIDL2.write(tree, { + templates: { + /** + * A function that receives syntax strings plus anything the templates returned. + * The items are guaranteed to be ordered. + * The returned value may be again passed to any template functions, + * or it may also be the final return value of `write()`. + * @param {any[]} items + */ + wrap: items => items.join(""), + /** + * @param {string} t A trivia string, which includes whitespaces and comments. + */ + trivia: t => t, + /** + * The identifier for a container type. For example, the `Foo` part of `interface Foo {};`. + * @param {string} escaped The escaped raw name of the definition. + * @param data The definition with the name + * @param parent The parent of the definition, undefined if absent + */ + name: (escaped, { data, parent }) => escaped, + /** + * Called for each type referece, e.g. `Window`, `DOMString`, or `unsigned long`. + * @param escaped The referenced name. Typically string, but may also be the return + * value of `wrap()` if the name contains whitespace. + * @param unescaped Unescaped reference. + */ + reference: (escaped, unescaped) => escaped, + /** + * Called for each generic-form syntax, e.g. `sequence`, `Promise`, or `maplike`. + * @param {string} name The keyword for syntax + */ + generic: name => name, + /** + * Called only once for each types, e.g. `Document`, `Promise`, or `sequence`. + * @param type The `wrap()`ed result of references and syntatic bracket strings. + */ + type: type => type, + /** + * Receives the return value of `reference()`. String if it's absent. + */ + inheritance: inh => inh, + /** + * Called for each IDL type definition, e.g. an interface, an operation, or a typedef. + * @param content The wrapped value of everything the definition contains. + * @param data The original definition object + * @param parent The parent of the definition, undefined if absent + */ + definition: (content, { data, parent }) => content, + /** + * Called for each extended attribute annotation. + * @param content The wrapped value of everything the annotation contains. + */ + extendedAttribute: content => content, + /** + * The `Foo` part of `[Foo=Whatever]`. + * @param ref The name of the referenced extended attribute name. + */ + extendedAttributeReference: ref => ref + } +}); +``` + +"Wrapped value" here will all be raw strings when the `wrap()` callback is absent. + +`validate()` returns semantic errors in a string array form: + +```js +const validations = validate(tree); +for (const validation of validations) { + console.log(validation); +} +// Validation error on line X: ... +// Validation error on line Y: ... +``` + ### Errors When there is a syntax error in the WebIDL, it throws an exception object with the following @@ -77,27 +169,41 @@ attached to a field called `idlType`: ```JS { "type": "attribute-type", - "generic": null, + "generic": "", "idlType": "unsigned short", "nullable": false, "union": false, - "extAttrs": [...] + "extAttrs": { + "items": [...] + } } ``` Where the fields are as follows: * `type`: String indicating where this type is used. Can be `null` if not applicable. -* `generic`: String indicating the generic type (e.g. "Promise", "sequence"). `null` - otherwise. -* `idlType`: Can be different things depending on context. In most cases, this will just - be a string with the type name. But the reason this field isn't called "typeName" is - because it can take more complex values. If the type is a union, then this contains an - array of the types it unites. If it is a generic type, it contains the IDL type - description for the type in the sequence, the eventual value of the promise, etc. -* `nullable`: Boolean indicating whether this is nullable or not. +* `generic`: String indicating the generic type (e.g. "Promise", "sequence"). +* `idlType`: String indicating the type name, or array of subtypes if the type is + generic or a union. +* `nullable`: `true` if the type is nullable. * `union`: Boolean indicating whether this is a union type or not. -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `extAttrs`: An [extended attributes](#extended-attributes) container. + +### Trivia + +Structures often have `trivia` field that represents whitespaces and comments before tokens. It gives a string if the syntatic component is made of a single token or an object with multiple string type fields. + +A trivia object looks like the following example: + +```JS +{ + "base": "\n", + "name": " ", + "...": "..." +} +``` + +Frequently, `base` is for type keywords, `name` is for identifiers, `open`/`close` are for brackets, and `termination` for semicolons. ### Interface @@ -116,8 +222,12 @@ Interfaces look like this: "name": "Human", "partial": false, "members": [...], - "inheritance": "Animal", - "extAttrs": [...] + "inheritance": { + "name": "Animal" + }, + "extAttrs": { + "items": [...] + } } ``` @@ -125,12 +235,10 @@ The fields are as follows: * `type`: Always "interface". * `name`: The name of the interface. -* `partial`: A boolean indicating whether it's a partial interface. +* `partial`: `true` if the type is a partial interface. * `members`: An array of interface members (attributes, operations, etc.). Empty if there are none. -* `inheritance`: A string giving the name of an interface this one inherits from, `null` otherwise. - **NOTE**: In v1 this was an array, but multiple inheritance is no longer supported so this didn't make - sense. -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `inheritance`: An object giving the name of an interface this one inherits from, `null` otherwise. +* `extAttrs`: An [extended attributes](#extended-attributes) container. ### Interface mixins @@ -148,7 +256,9 @@ Interfaces mixins look like this: "name": "Human", "partial": false, "members": [...], - "extAttrs": [...] + "extAttrs": { + "items": [...] + } } ``` @@ -156,9 +266,9 @@ The fields are as follows: * `type`: Always "interface mixin". * `name`: The name of the interface mixin. -* `partial`: A boolean indicating whether it's a partial interface mixin. +* `partial`: `true if the type is a partial interface mixin. * `members`: An array of interface members (attributes, operations, etc.). Empty if there are none. -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `extAttrs`: An [extended attributes](#extended-attributes) container. ### Namespace @@ -167,10 +277,12 @@ Namespaces look like this: ```JS { "type": "namespace", - "name": "Console", + "name": "console", "partial": false, "members": [...], - "extAttrs": [...] + "extAttrs": { + "items": [...] + } } ``` @@ -178,14 +290,15 @@ The fields are as follows: * `type`: Always "namespace". * `name`: The name of the namespace. -* `partial`: A boolean indicating whether it's a partial namespace. +* `partial`: `true if the type is a partial namespace. * `members`: An array of namespace members (attributes and operations). Empty if there are none. -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `extAttrs`: An [extended attributes](#extended-attributes) container. ### Callback Interfaces These are captured by the same structure as [Interfaces](#interface) except that -their `type` field is "callback interface". +their `type` field is "callback interface". Its trivia object additionally +includes a new field `callback`. ### Callback @@ -197,15 +310,14 @@ A callback looks like this: "name": "AsyncOperationCallback", "idlType": { "type": "return-type", - "sequence": false, - "generic": null, + "generic": "", "nullable": false, "union": false, "idlType": "void", - "extAttrs": [] + "extAttrs": null }, "arguments": [...], - "extAttrs": [] + "extAttrs": null } ``` @@ -215,7 +327,7 @@ The fields are as follows: * `name`: The name of the callback. * `idlType`: An [IDL Type](#idl-type) describing what the callback returns. * `arguments`: A list of [arguments](#arguments), as in function paramters. -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `extAttrs`: An [extended attributes](#extended-attributes) container. ### Dictionary @@ -232,21 +344,20 @@ A dictionary looks like this: "required": false, "idlType": { "type": "dictionary-type", - "sequence": false, - "generic": null, - "nullable": true, + "generic": "", + "nullable": true "union": false, "idlType": "DOMString", "extAttrs": [...] }, - "extAttrs": [], + "extAttrs": null, "default": { "type": "string", "value": "black" } }], "inheritance": null, - "extAttrs": [] + "extAttrs": null } ``` @@ -254,18 +365,18 @@ The fields are as follows: * `type`: Always "dictionary". * `name`: The dictionary name. -* `partial`: Boolean indicating whether it's a partial dictionary. +* `partial`: `true` if the type is a partial dictionary. * `members`: An array of members (see below). -* `inheritance`: A string indicating which dictionary is being inherited from, `null` otherwise. -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `inheritance`: An object indicating which dictionary is being inherited from, `null` otherwise. +* `extAttrs`: An [extended attributes](#extended-attributes) container. All the members are fields as follows: * `type`: Always "field". * `name`: The name of the field. -* `required`: Boolean indicating whether this is a [required](https://heycam.github.io/webidl/#required-dictionary-member) field. +* `required`: `true` if the field is required. * `idlType`: An [IDL Type](#idl-type) describing what field's type. -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `extAttrs`: An [extended attributes](#extended-attributes) container. * `default`: A [default value](#default-and-const-values), absent if there is none. ### Enum @@ -277,11 +388,20 @@ An enum looks like this: "type": "enum", "name": "MealType", "values": [ - { "type": "string", "value": "rice" }, - { "type": "string", "value": "noodles" }, - { "type": "string", "value": "other" } - ], - "extAttrs": [] + { + "type": "enum-value", + "value": "rice" + }, + { + "type": "enum-value", + "value": "noodles" + }, + { + "type": "enum-value", + "value": "other" + } + ] + "extAttrs": null } ``` @@ -289,8 +409,8 @@ The fields are as follows: * `type`: Always "enum". * `name`: The enum's name. -* `values`: An array of values. -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `values`: An array of values. The type of value is "enum-value". +* `extAttrs`: An [extended attributes](#extended-attributes) container. ### Typedef @@ -301,23 +421,23 @@ A typedef looks like this: "type": "typedef", "idlType": { "type": "typedef-type", - "sequence": true, "generic": "sequence", "nullable": false, "union": false, - "idlType": { - "type": "typedef-type", - "sequence": false, - "generic": null, - "nullable": false, - "union": false, - "idlType": "Point", - "extAttrs": [...] - }, + "idlType": [ + { + "type": "typedef-type", + "generic": "", + "nullable": false, + "union": false, + "idlType": "Point", + "extAttrs": [...] + } + ], "extAttrs": [...] }, "name": "PointSequence", - "extAttrs": [] + "extAttrs": null } ``` @@ -327,27 +447,7 @@ The fields are as follows: * `type`: Always "typedef". * `name`: The typedef's name. * `idlType`: An [IDL Type](#idl-type) describing what typedef's type. -* `extAttrs`: A list of [extended attributes](#extended-attributes). - -### Implements - -An implements definition looks like this: - -```JS -{ - "type": "implements", - "target": "Node", - "implements": "EventTarget", - "extAttrs": [] -} -``` - -The fields are as follows: - -* `type`: Always "implements". -* `target`: The interface that implements another. -* `implements`: The interface that is being implemented by the target. -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `extAttrs`: An [extended attributes](#extended-attributes) container. ### Includes @@ -358,7 +458,7 @@ An includes definition looks like this: "type": "includes", "target": "Node", "includes": "EventTarget", - "extAttrs": [] + "extAttrs": null } ``` @@ -367,7 +467,7 @@ The fields are as follows: * `type`: Always "includes". * `target`: The interface that includes an interface mixin. * `includes`: The interface mixin that is being included by the target. -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `extAttrs`: An [extended attributes](#extended-attributes) container. ### Operation Member @@ -375,52 +475,48 @@ An operation looks like this: ```JS { "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "sequence": false, - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "intersection", - "arguments": [{ - "optional": false, - "variadic": true, - "extAttrs": [], + "special": "", + "body": { "idlType": { - "type": "argument-type", - "sequence": false, - "generic": null, + "type": "return-type", + "generic": "", "nullable": false, "union": false, - "idlType": "long", - "extAttrs": [...] + "idlType": "void", + "extAttrs": null }, - "name": "ints" - }], - "extAttrs": [] + "name": "intersection", + "arguments": [{ + "optional": false, + "variadic": true, + "extAttrs": null, + "idlType": { + "type": "argument-type", + "generic": "", + "nullable": false, + "union": false, + "idlType": "long", + "extAttrs": [...] + }, + "name": "ints" + }], + }, + "extAttrs": null } ``` The fields are as follows: * `type`: Always "operation". -* `getter`: True if a getter operation. -* `setter`: True if a setter operation. -* `deleter`: True if a deleter operation. -* `static`: True if a static operation. -* `stringifier`: True if a stringifier operation. -* `idlType`: An [IDL Type](#idl-type) of what the operation returns. If a stringifier, may be absent. -* `name`: The name of the operation. If a stringifier, may be `null`. +* `special`: One of `"getter"`, `"setter"`, `"deleter"`, `"static"`, `"stringifier"`, or `null`. +* `body`: The operation body. Can be null if bodyless `stringifier`. +* `extAttrs`: An [extended attributes](#extended-attributes) container. + +The operation body fields are as follows: + +* `idlType`: An [IDL Type](#idl-type) of what the operation returns. +* `name`: The name of the operation if exists. * `arguments`: An array of [arguments](#arguments) for the operation. -* `extAttrs`: A list of [extended attributes](#extended-attributes). ### Attribute Member @@ -429,21 +525,20 @@ An attribute member looks like this: ```JS { "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, + "static": null, + "stringifier": null, + "inherit": null, "readonly": false, "idlType": { "type": "attribute-type", - "sequence": false, - "generic": null, + "generic": "", "nullable": false, "union": false, - "idlType": "RegExp", + "idlType": "any", "extAttrs": [...] }, "name": "regexp", - "extAttrs": [] + "extAttrs": null } ``` @@ -451,12 +546,10 @@ The fields are as follows: * `type`: Always "attribute". * `name`: The attribute's name. -* `static`: True if it's a static attribute. -* `stringifier`: True if it's a stringifier attribute. -* `inherit`: True if it's an inherit attribute. -* `readonly`: True if it's a read-only attribute. +* `special`: One of `"static"`, `"stringifier"`, `"inherit"`, or `null`. +* `readonly`: `true` if the attribute is read-only. * `idlType`: An [IDL Type](#idl-type) for the attribute. -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `extAttrs`: An [extended attributes](#extended-attributes) container. ### Constant Member @@ -465,33 +558,30 @@ A constant member looks like this: ```JS { "type": "const", - "nullable": false, "idlType": { "type": "const-type", - "sequence": false, - "generic": null, + "generic": "", "nullable": false, "union": false, - "idlType": "boolean" - "extAttrs": [] + "idlType": "boolean", + "extAttrs": null }, "name": "DEBUG", "value": { "type": "boolean", "value": false }, - "extAttrs": [] + "extAttrs": null } ``` The fields are as follows: * `type`: Always "const". -* `nullable`: Whether its type is nullable. * `idlType`: An [IDL Type](#idl-type) of the constant that represents a simple type, the type name. * `name`: The name of the constant. * `value`: The constant value as described by [Const Values](#default-and-const-values) -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `extAttrs`: An [extended attributes](#extended-attributes) container. ### Arguments @@ -501,60 +591,62 @@ The arguments (e.g. for an operation) look like this: { "arguments": [{ "optional": false, - "variadic": true, - "extAttrs": [], + "variadic": true + "extAttrs": null "idlType": { "type": "argument-type", - "sequence": false, - "generic": null, + "generic": "", "nullable": false, "union": false, - "idlType": "long", + "idlType": "float", "extAttrs": [...] }, - "name": "ints" + "name": "ints", }] } ``` The fields are as follows: -* `optional`: True if the argument is optional. -* `variadic`: True if the argument is variadic. +* `optional`: `true` if the argument is optional. +* `variadic`: `true` if the argument is variadic. * `idlType`: An [IDL Type](#idl-type) describing the type of the argument. * `name`: The argument's name. -* `extAttrs`: A list of [extended attributes](#extended-attributes). +* `extAttrs`: An [extended attributes](#extended-attributes) container. ### Extended Attributes -Extended attributes are arrays of items that look like this: +Extended attribute container look like this: ```JS { - "extAttrs": [{ - "name": "TreatNullAs", - "arguments": null, - "type": "extended-attribute", - "rhs": { - "type": "identifier", - "value": "EmptyString" - } - }] + "extAttrs": { + "items": [{ + "name": "TreatNullAs", + "arguments": [...], + "type": "extended-attribute", + "rhs": { + "type": "identifier", + "value": "EmptyString" + } + }] + } } ``` The fields are as follows: +* `items`: An array of extended attributes. + +Extended attributes look like this: + * `name`: The extended attribute's name. -* `arguments`: If the extended attribute takes arguments (e.g. `[Foo()]`) or if - its right-hand side does (e.g. `[NamedConstructor=Name(DOMString blah)]`) they - are listed here. Note that an empty arguments list will produce an empty array, - whereas the lack thereof will yield a `null`. If there is an `rhs` field then - they are the right-hand side's arguments, otherwise they apply to the extended - attribute directly. +* `arguments`: An array of [arguments](#arguments), if the extended + attribute has a signature (e.g. `[Foo()]`) or if its right-hand side does (e.g. + `[NamedConstructor=Name(DOMString blah)]`). * `type`: Always `"extended-attribute"`. * `rhs`: If there is a right-hand side, this will capture its `type` (which can be - "identifier" or "identifier-list") and its `value`. + "identifier" or "identifier-list"), its `value`, and its preceding trivia. ### Default and Const Values @@ -571,56 +663,33 @@ For Infinity: * `negative`: Boolean indicating whether this is negative Infinity or not. -### `iterable<>`, `legacyiterable<>`, `maplike<>`, `setlike<>` declarations +### `iterable<>`, `maplike<>`, `setlike<>` declarations These appear as members of interfaces that look like this: ```JS { - "type": "maplike", // or "legacyiterable" / "iterable" / "setlike" + "type": "maplike", // or "iterable" / "setlike" "idlType": /* One or two types */ , "readonly": false, // only for maplike and setlike - "extAttrs": [] + "extAttrs": null } ``` The fields are as follows: -* `type`: Always one of "iterable", "legacyiterable", "maplike" or "setlike". +* `type`: Always one of "iterable", "maplike" or "setlike". * `idlType`: An array with one or more [IDL Types](#idl-type) representing the declared type arguments. -* `readonly`: Whether the maplike or setlike is declared as read only. -* `extAttrs`: A list of [extended attributes](#extended-attributes). - +* `readonly`: `true` if the maplike or setlike is declared as read only. +* `extAttrs`: An [extended attributes](#extended-attributes) container. ## Testing ### Running -The test runs with mocha and expect.js. Normally, running mocha in the root directory +The test runs with mocha and expect.js. Normally, running `npm test` in the root directory should be enough once you're set up. -### Coverage - -Current test coverage, as documented in `coverage.html`, is 95%. You can run your own -coverage analysis with: - -```Bash -jscoverage lib lib-cov -``` - -That will create the lib-cov directory with instrumented code; the test suite knows -to use that if needed. You can then run the tests with: - -```Bash -JSCOV=1 mocha --reporter html-cov > coverage.html -``` - -Note that I've been getting weirdly overescaped results from the html-cov reporter, -so you might wish to try this instead: - -```Bash -JSCOV=1 mocha --reporter html-cov | sed "s/<//g" | sed "s/"/\"/g" > coverage.html -``` ### Browser tests In order to test in the browser, get inside `test/web` and run `make-web-tests.js`. This diff --git a/checker/index.html b/checker/index.html index 9897d8572f22a0..3c9e104f3f0605 100644 --- a/checker/index.html +++ b/checker/index.html @@ -1,55 +1,67 @@ + -WebIDL 2 Checker + + WebIDL 2 Checker + + - - + document.addEventListener("DOMContentLoaded", () => { + document.getElementById("check-idl").addEventListener("click", () => { + checkWebIDL(document.getElementById("webidl-to-check").value); + }); + document.getElementById("pretty-print").addEventListener("change", formatParserOutput); + }); + + + -

WebIDL Checker

-

This is an online checker for WebIDL built on the webidl2.js project.

-

Enter your WebIDL to check below:

- -
- -

Validation results:

- -

Parser output:

- -
-Pretty Print +

WebIDL Checker

+

This is an online checker for WebIDL built on the webidl2.js + project.

+

Enter your WebIDL to check below:

+ +
+ +

Validation results:

+ +

Parser output:

+ +
+ Pretty Print + diff --git a/coverage.html b/coverage.html deleted file mode 100644 index 46e7ed324ec2c8..00000000000000 --- a/coverage.html +++ /dev/null @@ -1,341 +0,0 @@ -Coverage -

Coverage

95%
572
548
24

webidl2.js

95%
572
548
24
LineHitsSource
1
2
31(function () {
41 var tokenise = function (str) {
547 var tokens = []
6 , re = {
7 "float": /^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/
8 , "integer": /^-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/
9 , "identifier": /^[A-Z_a-z][0-9A-Z_a-z]*/
10 , "string": /^"[^"]*"/
11 , "whitespace": /^(?:[\t\n\r ]+|[\t\n\r ]*((\/\/.*|\/\*(.|\n|\r)*?\*\/)[\t\n\r ]*))+/
12 , "other": /^[^\t\n\r 0-9A-Z_a-z]/
13 }
14 , types = []
15 ;
16329 for (var k in re) types.push(k);
1747 while (str.length > 0) {
182914 var matched = false;
192914 for (var i = 0, n = types.length; i < n; i++) {
2013325 var type = types[i];
2113325 str = str.replace(re[type], function (tok) {
222914 tokens.push({ type: type, value: tok });
232914 matched = true;
242914 return "";
25 });
2616239 if (matched) break;
27 }
285828 if (matched) continue;
290 throw new Error("Token stream not progressing");
30 }
3147 return tokens;
32 };
33
341 var parse = function (tokens) {
3547 var line = 1;
3647 tokens = tokens.slice();
37
3847 var FLOAT = "float"
39 , INT = "integer"
40 , ID = "identifier"
41 , STR = "string"
42 , OTHER = "other"
43 ;
44
4547 var WebIDLParseError = function (str, line, input, tokens) {
460 this.message = str;
470 this.line = line;
480 this.input = input;
490 this.tokens = tokens;
50 };
5147 WebIDLParseError.prototype.toString = function () {
520 return this.message + ", line " + this.line + " (tokens: '" + this.input + "')\n" +
53 JSON.stringify(this.tokens, null, 4);
54 };
55
5647 var error = function (str) {
570 var tok = "", numTokens = 0, maxTokens = 5;
580 while (numTokens < maxTokens && tokens.length > numTokens) {
590 tok += tokens[numTokens].value;
600 numTokens++;
61 }
620 throw new WebIDLParseError(str, line, tok, tokens.slice(0, 5));
63 };
64
6547 var last_token = null;
66
6747 var consume = function (type, value) {
688778 if (!tokens.length || tokens[0].type !== type) return;
695470 if (typeof value === "undefined" || tokens[0].value === value) {
701738 last_token = tokens.shift();
711738 return last_token;
72 }
73 };
74
7547 var ws = function () {
766961 if (!tokens.length) return;
77 // console.log("tokens.length", tokens.length, tokens[0]);
786115 if (tokens[0].type === "whitespace") {
791172 var t = tokens.shift();
802294 t.value.replace(/\n/g, function (m) { line++; return m; });
811172 return t;
82 }
83 };
84
8547 var all_ws = function () {
865366 var t = { type: "whitespace", value: "" };
875366 while (true) {
886538 var w = ws();
8911904 if (!w) break;
901172 t.value += w.value;
91 }
926538 if (t.value.length > 0) return t;
93 };
94
9547 var integer_type = function () {
96273 var ret = "";
97273 all_ws();
98312 if (consume(ID, "unsigned")) ret = "unsigned ";
99273 all_ws();
100287 if (consume(ID, "short")) return ret + "short";
101259 if (consume(ID, "long")) {
10241 ret += "long";
10341 all_ws();
10443 if (consume(ID, "long")) return ret + " long";
10539 return ret;
106 }
107218 if (ret) error("Failed to parse integer type");
108 };
109
11047 var float_type = function () {
111218 var ret = "";
112218 all_ws();
113222 if (consume(ID, "unrestricted")) ret = "unrestricted ";
114218 all_ws();
115257 if (consume(ID, "float")) return ret + "float";
116182 if (consume(ID, "double")) return ret + "double";
117176 if (ret) error("Failed to parse float type");
118 };
119
12047 var primitive_type = function () {
121273 var num_type = integer_type() || float_type();
122370 if (num_type) return num_type;
123176 all_ws();
124186 if (consume(ID, "boolean")) return "boolean";
125167 if (consume(ID, "byte")) return "byte";
126168 if (consume(ID, "octet")) return "octet";
127 };
128
12947 var const_value = function () {
13017 if (consume(ID, "true")) return true;
13119 if (consume(ID, "false")) return false;
13217 if (consume(ID, "null")) return null;
13314 if (consume(ID, "Infinity")) return Infinity;
13413 if (consume(ID, "NaN")) return NaN;
13511 var ret = consume(FLOAT) || consume(INT);
13619 if (ret) return 1 * ret.value;
1373 var tok = consume(OTHER, "-");
1383 if (tok) {
1392 if (consume(ID, "Infinity")) return -Infinity;
1400 else tokens.unshift(tok);
141 }
142 };
143
14447 var type_suffix = function (obj) {
145249 while (true) {
146263 all_ws();
147263 if (consume(OTHER, "?")) {
14811 if (obj.nullable) error("Can't nullable more than once");
14911 obj.nullable = true;
150 }
151252 else if (consume(OTHER, "[")) {
1523 all_ws();
1533 consume(OTHER, "]") || error("Unterminated array type");
1545 if (!obj.array) obj.array = 1;
1551 else obj.array++;
156 }
157249 else return;
158 }
159 };
160
16147 var single_type = function () {
162261 var prim = primitive_type()
163 , ret = { sequence: false, nullable: false, array: false, union: false }
164 ;
165261 if (prim) {
16699 ret.idlType = prim;
167 }
168162 else if (consume(ID, "sequence")) {
1694 all_ws();
1704 if (!consume(OTHER, "<")) {
1710 ret.idlType = "sequence";
172 }
173 else {
1744 ret.sequence = true;
1754 ret.idlType = type() || error("Error parsing sequence type");
1764 all_ws();
1774 if (!consume(OTHER, ">")) error("Unterminated sequence");
1784 all_ws();
1795 if (consume(OTHER, "?")) ret.nullable = true;
1804 return ret;
181 }
182 }
183 else {
184158 var name = consume(ID);
185169 if (!name) return;
186147 ret.idlType = name.value;
187 }
188246 type_suffix(ret);
189246 if (ret.nullable && ret.idlType === "any") error("Type any cannot be made nullable");
190246 return ret;
191 };
192
19347 var union_type = function () {
19411 all_ws();
19519 if (!consume(OTHER, "(")) return;
1963 var ret = { sequence: false, nullable: false, array: false, union: true, idlType: [] };
1973 var fst = type() || error("Union type with no content");
1983 ret.idlType.push(fst);
1993 while (true) {
2007 all_ws();
20110 if (!consume(ID, "or")) break;
2024 var typ = type() || error("No type after 'or' in union type");
2034 ret.idlType.push(typ);
204 }
2053 if (!consume(OTHER, ")")) error("Unterminated union type");
2063 type_suffix(ret);
2073 return ret;
208 };
209
21047 var type = function () {
211261 return single_type() || union_type();
212 };
213
21447 var argument = function () {
21579 var ret = { optional: false, variadic: false };
21679 ret.extAttrs = extended_attrs();
21779 all_ws();
21879 if (consume(ID, "optional")) {
2192 ret.optional = true;
2202 all_ws();
221 }
22279 ret.type = type();
22387 if (!ret.type) return;
22471 if (!ret.optional) {
22569 all_ws();
22669 if (tokens.length >= 3 &&
227 tokens[0].type === "other" && tokens[0].value === "." &&
228 tokens[1].type === "other" && tokens[1].value === "." &&
229 tokens[2].type === "other" && tokens[2].value === "."
230 ) {
2314 tokens.shift();
2324 tokens.shift();
2334 tokens.shift();
2344 ret.variadic = true;
235 }
236 }
23771 all_ws();
23871 var name = consume(ID) || error("No name in argument");
23971 ret.name = name.value;
24071 if (ret.optional) {
2412 all_ws();
2422 ret["default"] = default_();
243 }
24471 return ret;
245 };
246
24747 var argument_list = function () {
24859 var arg = argument(), ret = [];
24967 if (!arg) return ret;
25051 ret.push(arg);
25151 while (true) {
25271 all_ws();
253122 if (!consume(OTHER, ",")) return ret;
25420 all_ws();
25520 var nxt = argument() || error("Trailing comma in arguments list");
25620 ret.push(nxt);
257 }
258 };
259
26047 var simple_extended_attr = function () {
26117 all_ws();
26217 var name = consume(ID);
26317 if (!name) return;
26417 var ret = {
265 name: name.value
266 , "arguments": null
267 };
26817 all_ws();
26917 var eq = consume(OTHER, "=");
27017 if (eq) {
2715 all_ws();
2725 ret.rhs = consume(ID);
2735 if (!ret.rhs) return error("No right hand side to extended attribute assignment");
274 }
27517 all_ws();
27617 if (consume(OTHER, "(")) {
2772 ret["arguments"] = argument_list();
2782 all_ws();
2792 consume(OTHER, ")") || error("Unclosed argument in extended attribute");
280 }
28117 return ret;
282 };
283
284 // Note: we parse something simpler than the official syntax. It's all that ever
285 // seems to be used
28647 var extended_attrs = function () {
287415 var eas = [];
288415 all_ws();
289815 if (!consume(OTHER, "[")) return eas;
29015 eas[0] = simple_extended_attr() || error("Extended attribute with not content");
29115 all_ws();
29215 while (consume(OTHER, ",")) {
2932 all_ws();
2942 eas.push(simple_extended_attr() || error("Trailing comma in extended attribute"));
2952 all_ws();
296 }
29715 consume(OTHER, "]") || error("No end of extended attribute");
29815 return eas;
299 };
300
30147 var default_ = function () {
30211 all_ws();
30311 if (consume(OTHER, "=")) {
3045 all_ws();
3055 var def = const_value();
3065 if (typeof def !== "undefined") {
3073 return def;
308 }
309 else {
3102 var str = consume(STR) || error("No value for default");
3112 return str;
312 }
313 }
314 };
315
31647 var const_ = function () {
317180 all_ws();
318348 if (!consume(ID, "const")) return;
31912 var ret = { type: "const", nullable: false };
32012 all_ws();
32112 var typ = primitive_type();
32212 if (!typ) {
3230 typ = consume(ID) || error("No type for const");
3240 typ = typ.value;
325 }
32612 ret.idlType = typ;
32712 all_ws();
32812 if (consume(OTHER, "?")) {
3291 ret.nullable = true;
3301 all_ws();
331 }
33212 var name = consume(ID) || error("No name for const");
33312 ret.name = name.value;
33412 all_ws();
33512 consume(OTHER, "=") || error("No value assignment for const");
33612 all_ws();
33712 var cnt = const_value();
33824 if (typeof cnt !== "undefined") ret.value = cnt;
3390 else error("No value for const");
34012 all_ws();
34112 consume(OTHER, ";") || error("Unterminated const");
34212 return ret;
343 };
344
34547 var inheritance = function () {
34689 all_ws();
34789 if (consume(OTHER, ":")) {
3489 all_ws();
3499 var inh = consume(ID) || error ("No type in inheritance");
3509 return inh.value;
351 }
352 };
353
35447 var operation_rest = function (ret) {
35556 all_ws();
35657 if (!ret) ret = {};
35756 var name = consume(ID);
35856 ret.name = name ? name.value : null;
35956 all_ws();
36056 consume(OTHER, "(") || error("Invalid operation");
36156 ret["arguments"] = argument_list();
36256 all_ws();
36356 consume(OTHER, ")") || error("Unterminated operation");
36456 all_ws();
36556 consume(OTHER, ";") || error("Unterminated operation");
36656 return ret;
367 };
368
36947 var callback = function () {
370144 all_ws();
371144 var ret;
372286 if (!consume(ID, "callback")) return;
3732 all_ws();
3742 var tok = consume(ID, "interface");
3752 if (tok) {
3761 tokens.unshift(tok);
3771 ret = interface_();
3781 ret.type = "callback interface";
3791 return ret;
380 }
3811 var name = consume(ID) || error("No name for callback");
3821 ret = { type: "callback", name: name.value };
3831 all_ws();
3841 consume(OTHER, "=") || error("No assignment in callback");
3851 all_ws();
3861 ret.idlType = return_type();
3871 all_ws();
3881 consume(OTHER, "(") || error("No arguments in callback");
3891 ret["arguments"] = argument_list();
3901 all_ws();
3911 consume(OTHER, ")") || error("Unterminated callback");
3921 all_ws();
3931 consume(OTHER, ";") || error("Unterminated callback");
3941 return ret;
395 };
396
39747 var attribute = function () {
398154 all_ws();
399154 var grabbed = []
400 , ret = {
401 type: "attribute"
402 , "static": false
403 , stringifier: false
404 , inherit: false
405 , readonly: false
406 };
407154 if (consume(ID, "static")) {
4082 ret["static"] = true;
4092 grabbed.push(last_token);
410 }
411152 else if (consume(ID, "stringifier")) {
4124 ret.stringifier = true;
4134 grabbed.push(last_token);
414 }
415154 var w = all_ws();
416159 if (w) grabbed.push(w);
417154 if (consume(ID, "inherit")) {
4181 if (ret["static"] || ret.stringifier) error("Cannot have a static or stringifier inherit");
4191 ret.inherit = true;
4201 grabbed.push(last_token);
4211 var w = all_ws();
4222 if (w) grabbed.push(w);
423 }
424154 if (consume(ID, "readonly")) {
42532 ret.readonly = true;
42632 grabbed.push(last_token);
42732 var w = all_ws();
42864 if (w) grabbed.push(w);
429 }
430154 if (!consume(ID, "attribute")) {
43160 tokens = grabbed.concat(tokens);
43260 return;
433 }
43494 all_ws();
43594 ret.idlType = type() || error("No type in attribute");
43694 if (ret.idlType.sequence) error("Attributes cannot accept sequence types");
43794 all_ws();
43894 var name = consume(ID) || error("No name in attribute");
43994 ret.name = name.value;
44094 all_ws();
44194 consume(OTHER, ";") || error("Unterminated attribute");
44294 return ret;
443 };
444
44547 var return_type = function () {
44661 var typ = type();
44761 if (!typ) {
4480 if (consume(ID, "void")) {
4490 return "void";
450 }
4510 else error("No return type");
452 }
45361 return typ;
454 };
455
45647 var operation = function () {
45760 all_ws();
45860 var ret = {
459 type: "operation"
460 , getter: false
461 , setter: false
462 , creator: false
463 , deleter: false
464 , legacycaller: false
465 , "static": false
466 , stringifier: false
467 };
46860 while (true) {
46978 all_ws();
47087 if (consume(ID, "getter")) ret.getter = true;
47174 else if (consume(ID, "setter")) ret.setter = true;
47265 else if (consume(ID, "creator")) ret.creator = true;
47365 else if (consume(ID, "deleter")) ret.deleter = true;
47462 else if (consume(ID, "legacycaller")) ret.legacycaller = true;
47560 else break;
476 }
47760 if (ret.getter || ret.setter || ret.creator || ret.deleter || ret.legacycaller) {
47817 all_ws();
47917 ret.idlType = return_type();
48017 operation_rest(ret);
48117 return ret;
482 }
48343 if (consume(ID, "static")) {
4841 ret["static"] = true;
4851 ret.idlType = return_type();
4861 operation_rest(ret);
4871 return ret;
488 }
48942 else if (consume(ID, "stringifier")) {
4903 ret.stringifier = true;
4913 all_ws();
4924 if (consume(OTHER, ";")) return ret;
4932 ret.idlType = return_type();
4942 operation_rest(ret);
4952 return ret;
496 }
49739 ret.idlType = return_type();
49839 all_ws();
49939 if (consume(ID, "iterator")) {
5004 all_ws();
5014 ret.type = "iterator";
5024 if (consume(ID, "object")) {
5031 ret.iteratorObject = "object";
504 }
5053 else if (consume(OTHER, "=")) {
5062 all_ws();
5072 var name = consume(ID) || error("No right hand side in iterator");
5082 ret.iteratorObject = name.value;
509 }
5104 all_ws();
5114 consume(OTHER, ";") || error("Unterminated iterator");
5124 return ret;
513 }
514 else {
51535 operation_rest(ret);
51635 return ret;
517 }
518 };
519
52047 var identifiers = function (arr) {
5215 while (true) {
52211 all_ws();
52311 if (consume(OTHER, ",")) {
5246 all_ws();
5256 var name = consume(ID) || error("Trailing comma in identifiers list");
5266 arr.push(name.value);
527 }
5285 else break;
529 }
530 };
531
53247 var serialiser = function () {
533164 all_ws();
534318 if (!consume(ID, "serializer")) return;
53510 var ret = { type: "serializer" };
53610 all_ws();
53710 if (consume(OTHER, "=")) {
5388 all_ws();
5398 if (consume(OTHER, "{")) {
5405 ret.patternMap = true;
5415 all_ws();
5425 var id = consume(ID);
5435 if (id && id.value === "getter") {
5441 ret.names = ["getter"];
545 }
5464 else if (id && id.value === "inherit") {
5472 ret.names = ["inherit"];
5482 identifiers(ret.names);
549 }
5502 else if (id) {
5512 ret.names = [id.value];
5522 identifiers(ret.names);
553 }
554 else {
5550 ret.names = [];
556 }
5575 all_ws();
5585 consume(OTHER, "}") || error("Unterminated serializer pattern map");
559 }
5603 else if (consume(OTHER, "[")) {
5612 ret.patternList = true;
5622 all_ws();
5632 var id = consume(ID);
5642 if (id && id.value === "getter") {
5651 ret.names = ["getter"];
566 }
5671 else if (id) {
5681 ret.names = [id.value];
5691 identifiers(ret.names);
570 }
571 else {
5720 ret.names = [];
573 }
5742 all_ws();
5752 consume(OTHER, "]") || error("Unterminated serializer pattern list");
576 }
577 else {
5781 var name = consume(ID) || error("Invalid serializer");
5791 ret.name = name.value;
580 }
5818 all_ws();
5828 consume(OTHER, ";") || error("Unterminated serializer");
5838 return ret;
584 }
5852 else if (consume(OTHER, ";")) {
586 // noop, just parsing
587 }
588 else {
5891 ret.idlType = return_type();
5901 all_ws();
5911 ret.operation = operation_rest();
592 }
5932 return ret;
594 };
595
59647 var interface_ = function (isPartial) {
597144 all_ws();
598210 if (!consume(ID, "interface")) return;
59978 all_ws();
60078 var name = consume(ID) || error("No name for interface");
60178 var ret = {
602 type: "interface"
603 , name: name.value
604 , partial: false
605 , members: []
606 };
607155 if (!isPartial) ret.inheritance = inheritance() || null;
60878 all_ws();
60978 consume(OTHER, "{") || error("Bodyless interface");
61078 while (true) {
611251 all_ws();
612251 if (consume(OTHER, "}")) {
61378 all_ws();
61478 consume(OTHER, ";") || error("Missing semicolon after interface");
61578 return ret;
616 }
617173 var ea = extended_attrs();
618173 all_ws();
619173 var cnt = const_();
620173 if (cnt) {
6219 cnt.extAttrs = ea;
6229 ret.members.push(cnt);
6239 continue;
624 }
625164 var mem = serialiser() || attribute() || operation() || error("Unknown member");
626164 mem.extAttrs = ea;
627164 ret.members.push(mem);
628 }
629 };
630
63147 var partial = function () {
63266 all_ws();
633130 if (!consume(ID, "partial")) return;
6342 var thing = dictionary(true) || interface_(true) || error("Partial doesn't apply to anything");
6352 thing.partial = true;
6362 return thing;
637 };
638
63947 var dictionary = function (isPartial) {
64066 all_ws();
641128 if (!consume(ID, "dictionary")) return;
6424 all_ws();
6434 var name = consume(ID) || error("No name for dictionary");
6444 var ret = {
645 type: "dictionary"
646 , name: name.value
647 , partial: false
648 , members: []
649 };
6507 if (!isPartial) ret.inheritance = inheritance() || null;
6514 all_ws();
6524 consume(OTHER, "{") || error("Bodyless dictionary");
6534 while (true) {
65413 all_ws();
65513 if (consume(OTHER, "}")) {
6564 all_ws();
6574 consume(OTHER, ";") || error("Missing semicolon after dictionary");
6584 return ret;
659 }
6609 var ea = extended_attrs();
6619 all_ws();
6629 var typ = type() || error("No type for dictionary member");
6639 all_ws();
6649 var name = consume(ID) || error("No name for dictionary member");
6659 ret.members.push({
666 type: "field"
667 , name: name.value
668 , idlType: typ
669 , extAttrs: ea
670 , "default": default_()
671 });
6729 all_ws();
6739 consume(OTHER, ";") || error("Unterminated dictionary member");
674 }
675 };
676
67747 var exception = function () {
67861 all_ws();
679113 if (!consume(ID, "exception")) return;
6809 all_ws();
6819 var name = consume(ID) || error("No name for exception");
6829 var ret = {
683 type: "exception"
684 , name: name.value
685 , members: []
686 };
6879 ret.inheritance = inheritance() || null;
6889 all_ws();
6899 consume(OTHER, "{") || error("Bodyless exception");
6909 while (true) {
69116 all_ws();
69216 if (consume(OTHER, "}")) {
6939 all_ws();
6949 consume(OTHER, ";") || error("Missing semicolon after exception");
6959 return ret;
696 }
6977 var ea = extended_attrs();
6987 all_ws();
6997 var cnt = const_();
7007 if (cnt) {
7013 cnt.extAttrs = ea;
7023 ret.members.push(cnt);
703 }
704 else {
7054 var typ = type();
7064 all_ws();
7074 var name = consume(ID);
7084 all_ws();
7094 if (!typ || !name || !consume(OTHER, ";")) error("Unknown member in exception body");
7104 ret.members.push({
711 type: "field"
712 , name: name.value
713 , idlType: typ
714 , extAttrs: ea
715 });
716 }
717 }
718 };
719
72047 var enum_ = function () {
72152 all_ws();
722103 if (!consume(ID, "enum")) return;
7231 all_ws();
7241 var name = consume(ID) || error("No name for enum");
7251 var ret = {
726 type: "enum"
727 , name: name.value
728 , values: []
729 };
7301 all_ws();
7311 consume(OTHER, "{") || error("No curly for enum");
7321 var saw_comma = false;
7331 while (true) {
7344 all_ws();
7354 if (consume(OTHER, "}")) {
7361 all_ws();
7371 if (saw_comma) error("Trailing comma in enum");
7381 consume(OTHER, ";") || error("No semicolon after enum");
7391 return ret;
740 }
7413 var val = consume(STR) || error("Unexpected value in enum");
7423 ret.values.push(val.value.replace(/"/g, ""));
7433 all_ws();
7443 if (consume(OTHER, ",")) {
7452 all_ws();
7462 saw_comma = true;
747 }
748 else {
7491 saw_comma = false;
750 }
751 }
752 };
753
75447 var typedef = function () {
75551 all_ws();
75699 if (!consume(ID, "typedef")) return;
7573 var ret = {
758 type: "typedef"
759 };
7603 all_ws();
7613 ret.extAttrs = extended_attrs();
7623 all_ws();
7633 ret.idlType = type() || error("No type in typedef");
7643 all_ws();
7653 var name = consume(ID) || error("No name in typedef");
7663 ret.name = name.value;
7673 all_ws();
7683 consume(OTHER, ";") || error("Unterminated typedef");
7693 return ret;
770 };
771
77247 var implements_ = function () {
77348 all_ws();
77448 var target = consume(ID);
77595 if (!target) return;
7761 var w = all_ws();
7771 if (consume(ID, "implements")) {
7781 var ret = {
779 type: "implements"
780 , target: target.value
781 };
7821 all_ws();
7831 var imp = consume(ID) || error("Incomplete implements statement");
7841 ret["implements"] = imp.value;
7851 all_ws();
7861 consume(OTHER, ";") || error("No terminating ; for implements statement");
7871 return ret;
788 }
789 else {
790 // rollback
7910 tokens.unshift(w);
7920 tokens.unshift(target);
793 }
794 };
795
79647 var definition = function () {
797144 return callback() ||
798 interface_() ||
799 partial() ||
800 dictionary() ||
801 exception() ||
802 enum_() ||
803 typedef() ||
804 implements_()
805 ;
806 };
807
80847 var definitions = function () {
80947 if (!tokens.length) return [];
81047 var defs = [];
81147 while (true) {
812144 var ea = extended_attrs()
813 , def = definition();
814144 if (!def) {
81547 if (ea.length) error("Stray extended attributes");
81647 break;
817 }
81897 def.extAttrs = ea;
81997 defs.push(def);
820 }
82147 return defs;
822 };
82347 var res = definitions();
82447 if (tokens.length) error("Unrecognised tokens");
82547 return res;
826 };
827
8281 var obj = {
829 parse: function (str) {
83047 var tokens = tokenise(str);
831 // console.log(tokens);
83247 return parse(tokens);
833 }
834 };
8351 if (typeof module !== "undefined" && module.exports) {
8361 module.exports = obj;
837 }
838 else {
8390 window.WebIDL2 = obj;
840 }
841}());
diff --git a/dist/webidl2.js b/dist/webidl2.js new file mode 100644 index 00000000000000..e5176005075afe --- /dev/null +++ b/dist/webidl2.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WebIDL2=t():e.WebIDL2=t()}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(r,s,function(t){return e[t]}.bind(null,s));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e){return e.startsWith("_")?e.slice(1):e}function s(e,{parser:t,allowDangler:n,listName:r="list"}){const s=t(e);if(!s)return[];s.tokens.separator=e.consume(",");const a=[s];for(;s.tokens.separator;){const s=t(e);if(!s){n||error(`Trailing comma in ${r}`);break}if(s.tokens.separator=e.consume(","),a.push(s),!s.tokens.separator)break}return a}function a(e){return e.consume("true","false","Infinity","-Infinity","NaN","decimal","integer")}function i({type:e,value:t}){switch(e){case"true":case"false":return{type:"boolean",value:"true"===e};case"Infinity":case"-Infinity":return{type:"Infinity",negative:e.startsWith("-")};case"[":return{type:"sequence",value:[]};case"decimal":case"integer":return{type:"number",value:t};case"string":return{type:"string",value:t.slice(1,-1)};default:return{type:e}}}function o(e,t,n,r,s){function a(n){return n>0?e.slice(t,t+n):e.slice(Math.max(t+n,0),t)}function i(n,{precedes:r}={}){const s=n.map(e=>e.trivia+e.value).join(""),a=e[t];return"eof"===a.type?s:r?s+a.trivia:s.slice(a.trivia.length)}const o="eof"!==e[t].type?e[t].line:e.length>1?e[t-1].line:1,u=function(e){const t=e.split("\n");return t[t.length-1]}(i(a(-5),{precedes:!0})),c=a(5),l=i(c),p=u+l.split("\n")[0]+"\n"+(" ".repeat(u.length)+"^ "+r);return{message:`${s} error at line ${o}${n?`, ${"Syntax"===s?"since":"inside"} \`${n.partial?"partial ":""}${n.type} ${n.name}\``:""}:\n${p}`,line:o,input:l,tokens:c}}function u(e,t,n,r){return o(e,t.index,n,r,"Validation").message}n.r(t);const c={decimal:/-?(?=[0-9]*\.|[0-9]+[eE])(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y,integer:/-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y,identifier:/[_-]?[A-Za-z][0-9A-Z_a-z-]*/y,string:/"[^"]*"/y,whitespace:/[\t\n\r ]+/y,comment:/((\/(\/.*|\*([^*]|\*[^\/])*\*\/)[\t\n\r ]*)+)/y,other:/[^\t\n\r 0-9A-Za-z]/y},l=["ByteString","DOMString","USVString"],p=["attribute","callback","const","deleter","dictionary","enum","getter","includes","inherit","interface","iterable","maplike","namespace","partial","required","setlike","setter","static","stringifier","typedef","unrestricted"],d=["-Infinity","FrozenArray","Infinity","NaN","Promise","boolean","byte","double","false","float","implements","legacyiterable","long","mixin","null","octet","optional","or","readonly","record","sequence","short","true","unsigned","void"].concat(p,l),f=["(",")",",","...",":",";","<","=",">","?","[","]","{","}"];class m{constructor(e){this.source=function(e){const t=[];let n=0,r="",s=1,a=0;for(;nthis.position&&this.source[this.position].type===e}consume(...e){for(const t of e){if(!this.probe(t))continue;const e=this.source[this.position];return this.position++,e}}unconsume(e){this.position=e}}class y extends Error{constructor({message:e,line:t,input:n,tokens:r}){super(e),this.name="WebIDLParseError",this.line=t,this.input=n,this.tokens=r}}class k{constructor({source:e,tokens:t}){Object.defineProperties(this,{source:{value:e},tokens:{value:t}})}toJSON(){const e={type:void 0,name:void 0};let t=this;for(;t!==Object.prototype;){const n=Object.getOwnPropertyDescriptors(t);for(const[t,r]of Object.entries(n))(r.enumerable||r.get)&&(e[t]=this[t]);t=Object.getPrototypeOf(t)}return e}}class b extends k{static parser(e,t){return()=>{const n=e.consume(t);if(n)return new b({source:e.source,tokens:{value:n}})}}get value(){return this.tokens.value.value}}class g extends k{static parse(e){const t=e.consume("=");if(!t)return null;const n=a(e)||e.consume("string","null","[")||e.error("No value for default"),r=[n];if("["===n.type){const t=e.consume("]")||error("Default sequence value must be empty");r.push(t)}return new g({source:e.source,tokens:{assign:t},expression:r})}constructor({source:e,tokens:t,expression:n}){super({source:e,tokens:t}),Object.defineProperty(this,"expression",{value:n})}get type(){return i(this.expression[0]).type}get value(){return i(this.expression[0]).value}get negative(){return i(this.expression[0]).negative}}class h extends b{static parse(e){const t=e.consume("string");if(t)return new h({source:e.source,tokens:{value:t}})}get type(){return"enum-value"}get value(){return super.value.slice(1,-1)}}class v extends k{static parse(e){const t={};if(t.base=e.consume("enum"),!t.base)return;t.name=e.consume("identifier")||e.error("No name for enum");const n=e.current=new v({source:e.source,tokens:t});return t.open=e.consume("{")||e.error("Bodyless enum"),n.values=s(e,{parser:h.parse,allowDangler:!0,listName:"enumeration"}),e.probe("string")&&e.error("No comma between enum values"),t.close=e.consume("}")||e.error("Unexpected value in enum"),n.values.length||e.error("No value in enum"),t.termination=e.consume(";")||e.error("No semicolon after enum"),n}get type(){return"enum"}get name(){return r(this.tokens.name.value)}}class x extends k{static parse(e){const t=e.consume("identifier");if(!t)return;const n={target:t};if(n.includes=e.consume("includes"),n.includes)return n.mixin=e.consume("identifier")||e.error("Incomplete includes statement"),n.termination=e.consume(";")||e.error("No terminating ; for includes statement"),new x({source:e.source,tokens:n});e.unconsume(t.index)}get type(){return"includes"}get target(){return r(this.tokens.target.value)}get includes(){return r(this.tokens.mixin.value)}}function w(e){const t=e.source,n="decimal",o="integer",u="identifier",c="string";function d(t){e.error(t)}function f(t){return e.probe(t)}function m(...t){return e.consume(...t)}function y(t){return e.unconsume(t)}function h(){const e=function(){const e=m("unsigned"),n=m("short","long");if(n){const r=m("long");return new T({source:t,tokens:{prefix:e,base:n,postfix:r}})}e&&d("Failed to parse integer type")}()||function(){const e=m("unrestricted"),n=m("float","double");if(n)return new T({source:t,tokens:{prefix:e,base:n}});e&&d("Failed to parse float type")}();if(e)return e;const n=m("boolean","byte","octet");return n?new T({source:t,tokens:{base:n}}):void 0}function w(e){const t=m("?");t&&(e.tokens.nullable=t),f("?")&&d("Can't nullable more than once")}class T extends k{constructor({source:e,tokens:t}){super({source:e,tokens:t}),Object.defineProperty(this,"subtype",{value:[]}),this.extAttrs=null}get generic(){return""}get nullable(){return!!this.tokens.nullable}get union(){return!1}get idlType(){if(this.subtype.length)return this.subtype;return r([this.tokens.prefix,this.tokens.base,this.tokens.postfix].filter(e=>e).map(e=>e.value).join(" "))}}class N extends T{static parse(e){const n=m("FrozenArray","Promise","sequence","record");if(!n)return;const r=new N({source:t,tokens:{base:n}});switch(r.tokens.open=m("<")||d(`No opening bracket after ${n.type}`),n.type){case"Promise":{f("[")&&d("Promise type cannot have extended attribute");const t=F(e)||d("Missing Promise subtype");r.subtype.push(t);break}case"sequence":case"FrozenArray":{const t=j(e)||d(`Missing ${n.type} subtype`);r.subtype.push(t);break}case"record":{f("[")&&d("Record key cannot have extended attribute");const n=m(...l)||d(`Record key must be one of: ${l.join(", ")}`),s=new T({source:t,tokens:{base:n}});s.tokens.separator=m(",")||d("Missing comma after record key type"),s.type=e;const a=j(e)||d("Error parsing generic type record");r.subtype.push(s,a);break}}return r.idlType||d(`Error parsing generic type ${n.type}`),r.tokens.close=m(">")||d(`Missing closing bracket after ${n.type}`),r}get generic(){return this.tokens.base.value}}class A extends T{static parse(e){const n={};if(n.open=m("("),!n.open)return;const r=new A({source:t,tokens:n});for(r.type=e||null;;){const e=j()||d("No type after open parenthesis or 'or' in union type");"any"===e.idlType&&d("Type `any` cannot be included in a union type"),r.subtype.push(e);const t=m("or");if(!t)break;e.tokens.separator=t}return r.idlType.length<2&&d("At least two types are expected in a union type but found less"),n.close=m(")")||d("Unterminated union type"),w(r),r}get union(){return!0}}function $(e){return function(e){let n=N.parse(e)||h();if(!n){const e=m(u,...l);if(!e)return;n=new T({source:t,tokens:{base:e}}),f("<")&&d(`Unsupported generic type ${e.value}`)}return"Promise"===n.generic&&f("?")&&d("Promise type cannot be nullable"),n.type=e||null,w(n),n.nullable&&"any"===n.idlType&&d("Type `any` cannot be made nullable"),n}(e)||A.parse(e)}function j(e){const t=U.parse(),n=$(e);return n&&(n.extAttrs=t),n}class M extends k{static parse(){const n=e.position,r={},s=new M({source:t,tokens:r});return r.optional=m("optional"),s.idlType=j("argument-type"),s.idlType?(r.optional||(r.variadic=m("...")),r.name=m(u,...p),r.name?(s.default=r.optional?g.parse(e):null,s):y(n)):y(n)}get optional(){return!!this.tokens.optional}get variadic(){return!!this.tokens.variadic}get name(){return r(this.tokens.name.value)}}function O(){return s(e,{parser:M.parse,listName:"arguments list"})}class P extends k{static parse(){const r={assign:m("=")},a=new P({source:t,tokens:r});return r.assign&&(r.secondaryName=m(u,n,o,c)),r.open=m("("),r.open?(a.list="identifier-list"===a.rhsType?function(){const t=s(e,{parser:b.parser(e,u),listName:"identifier list"});return t.length||d("Expected identifiers but none found"),t}():O(),r.close=m(")")||d("Unexpected token in extended attribute argument list")):a.hasRhs&&!r.secondaryName&&d("No right hand side to extended attribute assignment"),a}get rhsType(){return this.tokens.assign?this.tokens.secondaryName?this.tokens.secondaryName.type:"identifier-list":null}}class q extends k{static parse(){const e=m(u);if(e)return new q({tokens:{name:e},params:P.parse()})}constructor({source:e,tokens:t,params:n}){super({source:e,tokens:t}),Object.defineProperty(this,"params",{value:n})}get type(){return"extended-attribute"}get name(){return this.tokens.name.value}get rhs(){const{rhsType:e,tokens:t,list:n}=this.params;return e?{type:e,value:"identifier-list"===e?n:t.secondaryName.value}:null}get arguments(){const{rhsType:e,list:t}=this.params;return t&&"identifier-list"!==e?t:[]}}class U extends k{static parse(){const n={};if(n.open=m("["),!n.open)return null;const r=new U({source:t,tokens:n});return r.items=s(e,{parser:q.parse,listName:"extended attribute"}),n.close=m("]")||d("Unexpected form of extended attribute"),r.items.length||d("Found an empty extended attribute"),r}}class I extends k{static parse(){const n={};if(n.base=m("const"),!n.base)return;let r=h();if(!r){const e=m(u)||d("No type for const");r=new T({source:t,tokens:{base:e}})}f("?")&&d("Unexpected nullable constant type"),r.type="const-type",n.name=m(u)||d("No name for const"),n.assign=m("=")||d("No value assignment for const"),n.value=a(e)||d("No value for const"),n.termination=m(";")||d("Unterminated const");const s=new I({source:t,tokens:n});return s.idlType=r,s}get type(){return"const"}get name(){return r(this.tokens.name.value)}get value(){return i(this.tokens.value)}}class S extends k{static parse(n){const r={base:n},s=new S({source:t,tokens:r});return r.name=m(u)||d("No name for callback"),e.current=s,r.assign=m("=")||d("No assignment in callback"),s.idlType=F()||d("Missing return type"),r.open=m("(")||d("No arguments in callback"),s.arguments=O(),r.close=m(")")||d("Unterminated callback"),r.termination=m(";")||d("Unterminated callback"),s}get type(){return"callback"}get name(){return r(this.tokens.name.value)}}class E extends k{static parse({special:n,noInherit:r=!1,readonly:s=!1}={}){const a=e.position,i={special:n},o=new E({source:t,tokens:i});if(n||r||(i.special=m("inherit")),i.readonly=m("readonly"),s&&!i.readonly&&f("attribute")&&d("Attributes must be readonly in this context"),i.base=m("attribute"),i.base){switch(o.idlType=j("attribute-type")||d("No type in attribute"),o.idlType.generic){case"sequence":case"record":d(`Attributes cannot accept ${o.idlType.generic} types`)}return i.name=m(u,"required")||d("No name in attribute"),i.termination=m(";")||d("Unterminated attribute"),o}y(a)}get type(){return"attribute"}get special(){return this.tokens.special?this.tokens.special.value:""}get readonly(){return!!this.tokens.readonly}get name(){return r(this.tokens.name.value)}}function F(e){const n=$(e||"return-type");if(n)return n;const r=m("void");if(r){const e=new T({source:t,tokens:{base:r}});return e.type="return-type",e}}class _ extends k{static parse(){const e={},n=new _({source:t,tokens:e});return n.idlType=F()||d("Missing return type"),e.name=m(u),e.open=m("(")||d("Invalid operation"),n.arguments=O(),e.close=m(")")||d("Unterminated operation"),n}get name(){const{name:e}=this.tokens;return e?r(e.value):""}}class D extends k{static parse({special:e,regular:n}={}){const r={special:e},s=new D({source:t,tokens:r});return e&&"stringifier"===e.value&&(r.termination=m(";"),r.termination)?(s.body=null,s):(e||n||(r.special=m("getter","setter","deleter")),s.body=_.parse(),r.termination=m(";")||d("Unterminated attribute"),s)}get type(){return"operation"}get name(){return this.body&&this.body.name||""}get special(){return this.tokens.special?this.tokens.special.value:""}}function z(){const e=m("static");if(e)return E.parse({special:e})||D.parse({special:e})||d("No body in static member")}function R(){const e=m("stringifier");if(e)return E.parse({special:e})||D.parse({special:e})||d("Unterminated stringifier")}class W extends k{static parse(){const n=e.position,r={},s=new W({source:t,tokens:r});if(r.readonly=m("readonly"),r.base=r.readonly?m("maplike","setlike"):m("iterable","maplike","setlike"),!r.base)return void y(n);const{type:a}=s,i="maplike"===a,o=i||"iterable"===a;r.open=m("<")||d(`Error parsing ${a} declaration`);const u=j()||d(`Error parsing ${a} declaration`);return s.idlType=[u],o&&(u.tokens.separator=m(","),u.tokens.separator?s.idlType.push(j()):i&&d(`Missing second type argument in ${a} declaration`)),r.close=m(">")||d(`Unterminated ${a} declaration`),r.termination=m(";")||d(`Missing semicolon after ${a} declaration`),s}get type(){return this.tokens.base.value}get readonly(){return!!this.tokens.readonly}}class Z extends k{static parse(){const e=m(":");if(!e)return;const n=m(u)||d("No type in inheritance");return new Z({source:t,tokens:{colon:e,name:n}})}get name(){return r(this.tokens.name.value)}}class B extends k{static parse(t,{type:n,inheritable:r,allowedMembers:s}){const{tokens:a}=t;for(a.name=m(u)||d("No name for interface"),e.current=t,r&&(t.inheritance=Z.parse()||null),a.open=m("{")||d(`Bodyless ${n}`),t.members=[];;){if(a.close=m("}"),a.close)return a.termination=m(";")||d(`Missing semicolon after ${n}`),t;const e=U.parse();let r;for(const[e,...t]of s)if(r=e(...t))break;r||d("Unknown member"),r.extAttrs=e,t.members.push(r)}}get partial(){return!!this.tokens.partial}get name(){return r(this.tokens.name.value)}}class L extends B{static parse(e,{callback:n=null,partial:r=null}={}){const s={callback:n,partial:r,base:e};return B.parse(new L({source:t,tokens:s}),{type:"interface",inheritable:!r,allowedMembers:[[I.parse],[z],[R],[W.parse],[E.parse],[D.parse]]})}get type(){return this.tokens.callback?"callback interface":"interface"}}class V extends B{static parse(e,{partial:n}={}){const r={partial:n,base:e};if(r.mixin=m("mixin"),r.mixin)return B.parse(new V({source:t,tokens:r}),{type:"interface mixin",allowedMembers:[[I.parse],[R],[E.parse,{noInherit:!0}],[D.parse,{regular:!0}]]})}get type(){return"interface mixin"}}function C(e){const t=m("interface");if(t)return V.parse(t,e)||L.parse(t,e)||d("Interface has no proper body")}class J extends B{static parse({partial:e}={}){const n={partial:e};if(n.base=m("namespace"),n.base)return B.parse(new J({source:t,tokens:n}),{type:"namespace",allowedMembers:[[E.parse,{noInherit:!0,readonly:!0}],[D.parse,{regular:!0}]]})}get type(){return"namespace"}}class X extends B{static parse({partial:e}={}){const n={partial:e};if(n.base=m("dictionary"),n.base)return B.parse(new X({source:t,tokens:n}),{type:"dictionary",inheritable:!e,allowedMembers:[[G.parse]]})}get type(){return"dictionary"}}class G extends k{static parse(){const n={},r=new G({source:t,tokens:n});return r.extAttrs=U.parse(),n.required=m("required"),r.idlType=j("dictionary-type")||d("No type for dictionary member"),n.name=m(u)||d("No name for dictionary member"),r.default=g.parse(e),n.required&&r.default&&d("Required member must not have a default"),n.termination=m(";")||d("Unterminated dictionary member"),r}get type(){return"field"}get name(){return r(this.tokens.name.value)}get required(){return!!this.tokens.required}}class H extends k{static parse(){const n={},r=new H({source:t,tokens:n});if(n.base=m("typedef"),n.base)return r.idlType=j("typedef-type")||d("No type in typedef"),n.name=m(u)||d("No name in typedef"),e.current=r,n.termination=m(";")||d("Unterminated typedef"),r}get type(){return"typedef"}get name(){return r(this.tokens.name.value)}}function K(){return function(){const e=m("callback");if(!e)return;const t=m("interface");return t?L.parse(t,{callback:e}):S.parse(e)}()||C()||function(){const e=m("partial");if(e)return X.parse({partial:e})||C({partial:e})||J.parse({partial:e})||d("Partial doesn't apply to anything")}()||X.parse()||v.parse(e)||H.parse()||x.parse(e)||J.parse()}const Q=function(){if(!t.length)return[];const e=[];for(;;){const t=U.parse(),n=K();if(!n){t&&d("Stray extended attributes");break}n.extAttrs=t,e.push(n)}return e.push(m("eof")),e}();return e.positione.join(""),trivia:N,name:N,reference:N,type:N,generic:N,inheritance:N,definition:N,extendedAttribute:N,extendedAttributeReference:N};function $(e,{templates:t=A}={}){function n(e,n){return t.reference(e,n||e)}function r(e,n=N,...r){if(!e)return"";const s=n(e.value,...r);return t.wrap([t.trivia(e.trivia),s])}function s(e,t){return r(e,n,t)}function a(e,n){return r(e,t.name,n)}function i(e){if(e.union||e.generic)return t.wrap([r(e.tokens.base,t.generic),r(e.tokens.open),...e.subtype.map(o),r(e.tokens.close)]);const s=e.tokens.prefix||e.tokens.base,a=e.tokens.prefix?[e.tokens.prefix.value,t.trivia(e.tokens.base.trivia)]:[],i=n(t.wrap([...a,e.tokens.base.value,r(e.tokens.postfix)]),e.idlType);return t.wrap([t.trivia(s.trivia),i])}function o(e){return t.wrap([d(e.extAttrs),i(e),r(e.tokens.nullable),r(e.tokens.separator)])}function u(e){return e?t.wrap([r(e.tokens.assign),...e.expression.map(e=>r(e))]):""}function c(e){return t.wrap([d(e.extAttrs),r(e.tokens.optional),t.type(o(e.idlType)),r(e.tokens.variadic),a(e.tokens.name,{data:e}),u(e.default),r(e.tokens.separator)])}function l(e){return t.wrap([s(e.tokens.value),r(e.tokens.separator)])}function p(e){const{rhsType:n}=e.params;return t.wrap([t.trivia(e.tokens.name.trivia),t.extendedAttribute(t.wrap([t.extendedAttributeReference(e.name),r(e.params.tokens.assign),s(e.params.tokens.secondaryName),r(e.params.tokens.open),...e.params.list?e.params.list.map("identifier-list"===n?l:c):[],r(e.params.tokens.close)])),r(e.tokens.separator)])}function d(e){return e?t.wrap([r(e.tokens.open),...e.items.map(p),r(e.tokens.close)]):""}function f(e){return t.definition(t.wrap([d(e.extAttrs),r(e.tokens.callback),r(e.tokens.partial),r(e.tokens.base),r(e.tokens.mixin),a(e.tokens.name,{data:e}),(s=e.inheritance,s?t.wrap([r(s.tokens.colon),t.trivia(s.tokens.name.trivia),t.inheritance(n(s.tokens.name.value,s.name))]):""),r(e.tokens.open),k(e.members,e),r(e.tokens.close),r(e.tokens.termination)]),{data:e});var s}function m(e,n){return t.definition(t.wrap([d(e.extAttrs),r(e.tokens.readonly),r(e.tokens.base,t.generic),r(e.tokens.open),t.wrap(e.idlType.map(o)),r(e.tokens.close),r(e.tokens.termination)]),{data:e,parent:n})}t=Object.assign({},A,t);const y={interface:f,"interface mixin":f,namespace:f,operation:function(e,n){const s=e.body?[t.type(o(e.body.idlType)),a(e.body.tokens.name,{data:e,parent:n}),r(e.body.tokens.open),t.wrap(e.body.arguments.map(c)),r(e.body.tokens.close)]:[];return t.definition(t.wrap([d(e.extAttrs),r(e.tokens.special),...s,r(e.tokens.termination)]),{data:e,parent:n})},attribute:function(e,n){return t.definition(t.wrap([d(e.extAttrs),r(e.tokens.special),r(e.tokens.readonly),r(e.tokens.base),t.type(o(e.idlType)),a(e.tokens.name,{data:e,parent:n}),r(e.tokens.termination)]),{data:e,parent:n})},dictionary:f,field:function(e,n){return t.definition(t.wrap([d(e.extAttrs),r(e.tokens.required),t.type(o(e.idlType)),a(e.tokens.name,{data:e,parent:n}),u(e.default),r(e.tokens.termination)]),{data:e,parent:n})},const:function(e,n){return t.definition(t.wrap([d(e.extAttrs),r(e.tokens.base),t.type(o(e.idlType)),a(e.tokens.name,{data:e,parent:n}),r(e.tokens.assign),r(e.tokens.value),r(e.tokens.termination)]),{data:e,parent:n})},typedef:function(e){return t.definition(t.wrap([d(e.extAttrs),r(e.tokens.base),t.type(o(e.idlType)),a(e.tokens.name,{data:e}),r(e.tokens.termination)]),{data:e})},includes:function(e){return t.definition(t.wrap([d(e.extAttrs),s(e.tokens.target,e.target),r(e.tokens.includes),s(e.tokens.mixin,e.includes),r(e.tokens.termination)]),{data:e})},callback:function(e){return t.definition(t.wrap([d(e.extAttrs),r(e.tokens.base),a(e.tokens.name,{data:e}),r(e.tokens.assign),t.type(o(e.idlType)),r(e.tokens.open),...e.arguments.map(c),r(e.tokens.close),r(e.tokens.termination)]),{data:e})},enum:function(e){return t.definition(t.wrap([d(e.extAttrs),r(e.tokens.base),a(e.tokens.name,{data:e}),r(e.tokens.open),k(e.values,e),r(e.tokens.close),r(e.tokens.termination)]),{data:e})},"enum-value":function(e,n){return t.wrap([t.trivia(e.tokens.value.trivia),t.definition(t.wrap(['"',t.name(e.value,{data:e,parent:n}),'"']),{data:e,parent:n}),r(e.tokens.separator)])},iterable:m,legacyiterable:m,maplike:m,setlike:m,"callback interface":f,eof:function(e){return t.trivia(e.trivia)}};function k(e,n){if(!e)return;const r=e.map(e=>(function(e,t){if(!y[e.type])throw new Error(`Type "${e.type}" is unsupported`);return y[e.type](e,t)})(e,n));return t.wrap(r)}return k(e)}function*j({unique:e,duplicates:t}){for(const n of t){const{name:t}=n,r=`The name "${t}" of type "${e.get(t).type}" was already seen`;yield u(n.source,n.tokens.name,n,r)}}function*M(e){const t=[...e.unique.values()].filter(e=>"interface"===e.type),n=function(){const t=new Map,n=e.all.filter(e=>"includes"===e.type);for(const r of n){const n=t.get(r.target),s=e.unique.get(r.includes);s&&(n?n.push(s):t.set(r.target,[s]))}return t}();for(const e of t)yield*r(e);function*r(t){const r=new Set(a(t).map(e=>e.name)),i=e.partials.get(t.name)||[],o=n.get(t.name)||[];for(const e of[...i,...o]){const n=a(e);yield*s(n,r,e,t);for(const e of n)r.add(e.name)}}function*s(e,t,n,r){for(const s of e){const{name:e}=s;if(e&&t.has(e)){const t=`The operation "${e}" has already been defined for the base interface "${r.name}" either in itself or in a mixin`;yield u(n.source,s.body.tokens.name,n,t)}}}function a(e){return e.members.filter(({type:e})=>"operation"===e)}}function O(e){const t=function(e){const t=new Map,n=new Set,r=new Map;for(const s of e)if(s.partial){const e=r.get(s.name);e?e.push(s):r.set(s.name,[s])}else s.name&&(t.has(s.name)?n.add(s):t.set(s.name,s));return{all:e,unique:t,partials:r,duplicates:n}}(e);return[...j(t),...M(t)]}n.d(t,"parse",function(){return T}),n.d(t,"write",function(){return $}),n.d(t,"validate",function(){return O})}])}); +//# sourceMappingURL=webidl2.js.map \ No newline at end of file diff --git a/dist/webidl2.js.map b/dist/webidl2.js.map new file mode 100644 index 00000000000000..d5c76c95ba9e40 --- /dev/null +++ b/dist/webidl2.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://WebIDL2/webpack/universalModuleDefinition","webpack://WebIDL2/webpack/bootstrap","webpack://WebIDL2/./lib/productions/helpers.js","webpack://WebIDL2/./lib/error.js","webpack://WebIDL2/./lib/tokeniser.js","webpack://WebIDL2/./lib/productions/base.js","webpack://WebIDL2/./lib/productions/token.js","webpack://WebIDL2/./lib/productions/default.js","webpack://WebIDL2/./lib/productions/enum.js","webpack://WebIDL2/./lib/productions/includes.js","webpack://WebIDL2/./lib/webidl2.js","webpack://WebIDL2/./lib/writer.js","webpack://WebIDL2/./lib/validator.js","webpack://WebIDL2/./index.js"],"names":["root","factory","exports","module","define","amd","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","helpers_unescape","identifier","startsWith","slice","list","tokeniser","parser","allowDangler","listName","first","tokens","separator","consume","items","item","error","push","const_value","const_data","type","negative","error_error","source","position","current","message","sliceTokens","count","Math","max","tokensToText","inputs","precedes","text","map","trivia","join","nextToken","length","line","precedingLine","splitted","split","lastLine","subsequentTokens","subsequentText","contextualMessage","repeat","partial","input","validationError","token","index","tokenRe","decimal","integer","string","whitespace","comment","other","stringTypes","argumentNameKeywords","nonRegexTerminals","concat","punctuations","tokeniser_Tokeniser","[object Object]","idl","str","lastCharIndex","nextChar","charAt","result","test","attemptTokenMatch","noFlushTrivia","currentTrivia","pop","match","includes","punctuation","Error","re","lastIndex","exec","tokenise","WebIDLParseError","syntaxError","candidates","probe","super","Base","defineProperties","json","undefined","proto","descMap","getOwnPropertyDescriptors","entries","getPrototypeOf","token_Token","default_Default","assign","def","expression","close","enum_EnumValue","enum_Enum","base","ret","open","values","parse","termination","includes_Includes","target","mixin","unconsume","parseByTokens","DECIMAL","INT","ID","STR","primitive_type","num_type","prefix","postfix","Type","integer_type","float_type","type_suffix","obj","nullable","extAttrs","generic","union","idlType","subtype","filter","GenericType","typeName","return_type","type_with_extended_attributes","keyType","keyIdlType","valueType","UnionType","typ","or","single_type","ExtendedAttributes","Argument","start_position","optional","variadic","default","argument_list","ExtendedAttributeParameters","secondaryName","rhsType","ids","identifiers","hasRhs","SimpleExtendedAttribute","params","rhs","arguments","Constant","CallbackFunction","Attribute","special","noInherit","readonly","voidToken","OperationBody","Operation","regular","body","static_member","stringifier","IterableLike","secondTypeRequired","secondTypeAllowed","Inheritance","colon","Container","instance","inheritable","allowedMembers","inheritance","members","ea","mem","args","Interface","callback","Mixin","interface_","opts","Namespace","Dictionary","Field","required","Typedef","definition","tok","res","defs","definitions","noop","arg","templates","wrap","reference","extendedAttribute","extendedAttributeReference","write","ast","ts","raw","unescaped","wrapper","reference_token","name_token","type_body","it","firstToken","ref","extended_attributes","default_","argument","data","id","make_ext_at","eats","container","inh","iterate","iterable_like","parent","table","interface","interface mixin","namespace","operation","attribute","dictionary","field","const","typedef","enum","enum-value","v","iterable","legacyiterable","maplike","setlike","callback interface","eof","things","results","thing","dispatch","checkDuplicatedNames","unique","duplicates","dup","checkInterfaceMemberDuplication","interfaces","includesMap","Map","all","include","array","set","getIncludesMap","forEachInterface","opNames","Set","getOperations","op","partials","mixins","ext","additions","forEachExtension","addition","add","existings","has","validate","groupDefinitions","__webpack_exports__"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,OAAA,GAAAH,GACA,iBAAAC,QACAA,QAAA,QAAAD,IAEAD,EAAA,QAAAC,IARA,CASCK,KAAA,WACD,mBCTA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,GAAA,CACAC,EAAAD,EACAE,GAAA,EACAT,QAAA,IAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAQ,GAAA,EAGAR,EAAAD,QA0DA,OArDAM,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAd,EAAAe,EAAAC,GACAV,EAAAW,EAAAjB,EAAAe,IACAG,OAAAC,eAAAnB,EAAAe,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CV,EAAAgB,EAAA,SAAAtB,GACA,oBAAAuB,eAAAC,aACAN,OAAAC,eAAAnB,EAAAuB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAnB,EAAA,cAAiDyB,OAAA,KAQjDnB,EAAAoB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAAnB,EAAAmB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFAxB,EAAAgB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAAnB,EAAAQ,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAvB,EAAA2B,EAAA,SAAAhC,GACA,IAAAe,EAAAf,KAAA2B,WACA,WAA2B,OAAA3B,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAK,EAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAiB,EAAAC,GAAsD,OAAAjB,OAAAkB,UAAAC,eAAA1B,KAAAuB,EAAAC,IAGtD7B,EAAAgC,EAAA,GAIAhC,IAAAiC,EAAA,kCC/EO,SAASC,EAAQC,GACxB,OAAAA,EAAAC,WAAA,KAAAD,EAAAE,MAAA,GAAAF,EAWO,SAAAG,EAAAC,GAAAC,OAA0BA,EAAAC,eAAAC,WAAA,SACjC,MAAAC,EAAAH,EAAAD,GACA,IAAAI,EACA,SAEAA,EAAAC,OAAAC,UAAAN,EAAAO,QAAA,KACA,MAAAC,EAAA,CAAAJ,GACA,KAAAA,EAAAC,OAAAC,WAAA,CACA,MAAAG,EAAAR,EAAAD,GACA,IAAAS,EAAA,CACAP,GACAQ,2BAAmCP,KAEnC,MAIA,GAFAM,EAAAJ,OAAAC,UAAAN,EAAAO,QAAA,KACAC,EAAAG,KAAAF,IACAA,EAAAJ,OAAAC,UAAA,MAEA,OAAAE,EAMO,SAAAI,EAAAZ,GACP,OAAAA,EAAAO,QAAA,iEAQO,SAAAM,GAAAC,KAAqBA,EAAAlC,UAC5B,OAAAkC,GACA,WACA,YACA,OAAcA,KAAA,UAAAlC,MAAA,SAAAkC,GACd,eACA,gBACA,OAAcA,KAAA,WAAAC,SAAAD,EAAAjB,WAAA,MACd,QACA,OAAciB,KAAA,WAAAlC,MAAA,IACd,cACA,cACA,OAAgBkC,KAAA,SAAAlC,SAChB,aACA,OAAckC,KAAA,SAAAlC,QAAAkB,MAAA,OACd,QACA,OAAcgB,SCrDd,SAASE,EAAKC,EAAAC,EAAAC,EAAAC,EAAAN,GAId,SAAAO,EAAAC,GACA,OAAAA,EAAA,EACAL,EAAAnB,MAAAoB,IAAAI,GACAL,EAAAnB,MAAAyB,KAAAC,IAAAN,EAAAI,EAAA,GAAAJ,GAGA,SAAAO,EAAAC,GAAAC,SAAiCA,GAAW,IAC5C,MAAAC,EAAAF,EAAAG,IAAAhD,KAAAiD,OAAAjD,EAAAD,OAAAmD,KAAA,IACAC,EAAAf,EAAAC,GACA,cAAAc,EAAAlB,KACAc,EAEAD,EACAC,EAAAI,EAAAF,OAEAF,EAAA9B,MAAAkC,EAAAF,OAAAG,QAGA,MACAC,EACA,QAAAjB,EAAAC,GAAAJ,KAAAG,EAAAC,GAAAgB,KACAjB,EAAAgB,OAAA,EAAAhB,EAAAC,EAAA,GAAAgB,KACA,EAEAC,EArCA,SAAAP,GACA,MAAAQ,EAAAR,EAAAS,MAAA,MACA,OAAAD,IAAAH,OAAA,GAmCAK,CACAb,EAAAJ,GAPA,GAOA,CAA2CM,UAAA,KAG3CY,EAAAlB,EAVA,GAWAmB,EAAAf,EAAAc,GAIAE,EAAAN,EAHAK,EAAAH,MAAA,SAGA,MADA,IAAAK,OAAAP,EAAAF,QAAA,KAAAb,GAKA,OACAA,WAAgBN,mBAAsBoB,IAFtCf,OADA,WAAAL,EAAA,sBAC6DK,EAAAwB,QAAA,gBAAoCxB,EAAAL,QAAgBK,EAAAjD,SAAa,QAEzDuE,IACrEP,OACAU,MAAAJ,EACAnC,OAAAkC,GAcO,SAAAM,EAAA5B,EAAA6B,EAAA3B,EAAAC,GACP,OAASJ,EAAKC,EAAA6B,EAAAC,MAAA5B,EAAAC,EAAA,cAAAA,eCpEd,MAAA4B,EAAA,CAGAC,QAAA,sGACAC,QAAA,8CACAtD,WAAA,+BACAuD,OAAA,WACAC,WAAA,cACAC,QAAA,iDACAC,MAAA,wBAGOC,EAAA,CACP,aACA,YACA,aAGOC,EAAA,CACP,YACA,WACA,QACA,UACA,aACA,OACA,SACA,WACA,UACA,YACA,WACA,UACA,YACA,UACA,WACA,UACA,SACA,SACA,cACA,UACA,gBAGAC,EAAA,CACA,YACA,cACA,WACA,MACA,UACA,UACA,OACA,SACA,QACA,QACA,aACA,iBACA,OACA,QACA,OACA,QACA,WACA,KACA,WACA,SACA,WACA,QACA,OACA,WACA,QACAC,OAAAF,EAAAD,GAEAI,EAAA,CACA,IACA,IACA,IACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KA6FO,MAAMC,EAIbC,YAAAC,GACAvG,KAAA0D,OA5FA,SAAA8C,GACA,MAAA1D,EAAA,GACA,IAAA2D,EAAA,EACAlC,EAAA,GACAI,EAAA,EACAa,EAAA,EACA,KAAAiB,EAAAD,EAAA9B,QAAA,CACA,MAAAgC,EAAAF,EAAAG,OAAAF,GACA,IAAAG,GAAA,EAQA,GANA,YAAAC,KAAAH,GACAE,EAAAE,EAAA,cAAgDC,eAAA,IAC3C,MAAAL,IACLE,EAAAE,EAAA,WAA6CC,eAAA,MAG7C,IAAAH,EAAA,CACA,MAAAI,EAAAlE,EAAAmE,MAAA5F,MACAsD,IAAAqC,EAAAE,MAAA,YAAAxC,OACAH,GAAAyC,EACAxB,GAAA,OACK,oBAAAqB,KAAAH,IAKL,IAHA,KADAE,EAAAE,EAAA,cAEAF,EAAAE,EAAA,aAEA,IAAAF,EAAA,CACAA,EAAAE,EAAA,cACA,MAAAvB,EAAAzC,IAAA4B,OAAA,IACA,IAAAkC,GAAAV,EAAAiB,SAAA5B,EAAAlE,SACAkE,EAAAhC,KAAAgC,EAAAlE,YAGK,MAAAqF,IACLE,EAAAE,EAAA,WAGA,UAAAM,KAAAhB,EACA,GAAAI,EAAAlE,WAAA8E,EAAAX,GAAA,CACA3D,EAAAM,KAAA,CAAqBG,KAAA6D,EAAA/F,MAAA+F,EAAA7C,SAAAI,OAAAa,UACrBjB,EAAA,GAEAqC,EADAH,GAAAW,EAAA1C,OAEA,MAQA,IAHA,IAAAkC,IACAA,EAAAE,EAAA,WAEA,IAAAF,EACA,UAAAS,MAAA,gCAEAZ,EAAAG,EACApB,GAAA,EAUA,OANA1C,EAAAM,KAAA,CACAG,KAAA,MACAlC,MAAA,GACAkD,WAGAzB,EAOA,SAAAgE,EAAAvD,GAAAwD,cAAoCA,GAAgB,IACpD,MAAAO,EAAA7B,EAAAlC,GACA+D,EAAAC,UAAAd,EACA,MAAAG,EAAAU,EAAAE,KAAAhB,GACA,OAAAI,GACA9D,EAAAM,KAAA,CAAmBG,OAAAlC,MAAAuF,EAAA,GAAArC,SAAAI,OAAAa,UACnBuB,IACAxC,EAAA,IAEA+C,EAAAC,YAEA,GASAE,CAAAlB,GACAvG,KAAA2D,SAAA,EAMA2C,MAAAzC,GACA,UAAA6D,EDlIO,SAAAhE,EAAAC,EAAAC,EAAAC,GACP,OAASJ,EAAKC,EAAAC,EAAAC,EAAAC,EAAA,UCiIiB8D,CAAW3H,KAAA0D,OAAA1D,KAAA2D,SAAA3D,KAAA4D,QAAAC,IAM1CyC,MAAA/C,GACA,OAAAvD,KAAA0D,OAAAgB,OAAA1E,KAAA2D,UAAA3D,KAAA0D,OAAA1D,KAAA2D,UAAAJ,SAMA+C,WAAAsB,GACA,UAAArE,KAAAqE,EAAA,CACA,IAAA5H,KAAA6H,MAAAtE,GAAA,SACA,MAAAgC,EAAAvF,KAAA0D,OAAA1D,KAAA2D,UAEA,OADA3D,KAAA2D,WACA4B,GAOAe,UAAA3C,GACA3D,KAAA2D,YAIA,MAAA+D,UAAAL,MACAf,aAAAzC,QAAeA,EAAAc,OAAAU,QAAAvC,WACfgF,MAAAjE,GACA7D,KAAAW,KAAA,mBACAX,KAAA2E,OACA3E,KAAAqF,QACArF,KAAA8C,UCtOO,MAAAiF,EACPzB,aAAA5C,OAAeA,EAAAZ,WACfhC,OAAAkH,iBAAAhI,KAAA,CACA0D,OAAA,CAAerC,MAAAqC,GACfZ,OAAA,CAAezB,MAAAyB,KAIfwD,SACA,MAAA2B,EAAA,CAAkB1E,UAAA2E,EAAAvH,UAAAuH,GAClB,IAAAC,EAAAnI,KACA,KAAAmI,IAAArH,OAAAkB,WAAA,CACA,MAAAoG,EAAAtH,OAAAuH,0BAAAF,GACA,UAAAxG,EAAAN,KAAAP,OAAAwH,QAAAF,IACA/G,EAAAL,YAAAK,EAAAJ,OACAgH,EAAAtG,GAAA3B,KAAA2B,IAGAwG,EAAArH,OAAAyH,eAAAJ,GAEA,OAAAF,GClBO,MAAMO,UAAcT,EAK3BzB,cAAA7D,EAAAc,GACA,WACA,MAAAlC,EAAAoB,EAAAO,QAAAO,GACA,GAAAlC,EACA,WAAmBmH,EAAK,CAAE9E,OAAAjB,EAAAiB,OAAAZ,OAAA,CAAoCzB,YAK9DA,YACA,OAAArB,KAAA8C,OAAAzB,aCdO,MAAMoH,UAAgBV,EAI7BzB,aAAA7D,GACA,MAAAiG,EAAAjG,EAAAO,QAAA,KACA,IAAA0F,EACA,YAEA,MAAAC,EAAgBtF,EAAWZ,MAAAO,QAAA,sBAAAP,EAAAU,MAAA,wBAC3ByF,EAAA,CAAAD,GACA,SAAAA,EAAApF,KAAA,CACA,MAAAsF,EAAApG,EAAAO,QAAA,MAAAG,MAAA,wCACAyF,EAAAxF,KAAAyF,GAEA,WAAeJ,EAAO,CAAE/E,OAAAjB,EAAAiB,OAAAZ,OAAA,CAAoC4F,UAASE,eAGrEtC,aAAA5C,OAAeA,EAAAZ,SAAA8F,eACfd,MAAA,CAAWpE,SAAAZ,WACXhC,OAAAC,eAAAf,KAAA,cAA+CqB,MAAAuH,IAG/CrF,WACA,OAAWD,EAAUtD,KAAA4I,WAAA,IAAArF,KAErBlC,YACA,OAAWiC,EAAUtD,KAAA4I,WAAA,IAAAvH,MAErBmC,eACA,OAAWF,EAAUtD,KAAA4I,WAAA,IAAApF,UC7BrB,MAAMsF,UAAkBN,EAIxBlC,aAAA7D,GACA,MAAApB,EAAAoB,EAAAO,QAAA,UACA,GAAA3B,EACA,WAAiByH,EAAS,CAAEpF,OAAAjB,EAAAiB,OAAAZ,OAAA,CAAoCzB,WAIhEkC,WACA,mBAEAlC,YACA,OAAAyG,MAAAzG,MAAAkB,MAAA,OAIO,MAAMwG,UAAahB,EAI1BzB,aAAA7D,GACA,MAAAK,EAAA,GAEA,GADAA,EAAAkG,KAAAvG,EAAAO,QAAA,SACAF,EAAAkG,KACA,OAEAlG,EAAAnC,KAAA8B,EAAAO,QAAA,eAAAP,EAAAU,MAAA,oBACA,MAAA8F,EAAAxG,EAAAmB,QAAA,IAAwCmF,EAAI,CAAErF,OAAAjB,EAAAiB,OAAAZ,WAe9C,OAdAA,EAAAoG,KAAAzG,EAAAO,QAAA,MAAsCP,EAAAU,MAAA,iBACtC8F,EAAAE,OAAiB3G,EAAIC,EAAA,CACrBC,OAAcoG,EAASM,MACvBzG,cAAA,EACAC,SAAA,gBAEAH,EAAAoF,MAAA,WACApF,EAAAU,MAAA,gCAEAL,EAAA+F,MAAApG,EAAAO,QAAA,MAAuCP,EAAAU,MAAA,4BACvC8F,EAAAE,OAAAzE,QACAjC,EAAAU,MAAA,oBAEAL,EAAAuG,YAAA5G,EAAAO,QAAA,MAA6CP,EAAAU,MAAA,2BAC7C8F,EAGA1F,WACA,aAEA5C,WACA,OAAWyB,EAAQpC,KAAA8C,OAAAnC,KAAAU,QCrDZ,MAAMiI,UAAiBvB,EAI9BzB,aAAA7D,GACA,MAAA8G,EAAA9G,EAAAO,QAAA,cACA,IAAAuG,EACA,OAEA,MAAAzG,EAAA,CAAoByG,UAEpB,GADAzG,EAAAqE,SAAA1E,EAAAO,QAAA,YACAF,EAAAqE,SAMA,OAFArE,EAAA0G,MAAA/G,EAAAO,QAAA,eAAAP,EAAAU,MAAA,iCACAL,EAAAuG,YAAA5G,EAAAO,QAAA,MAA6CP,EAAAU,MAAA,2CAC7C,IAAemG,EAAQ,CAAE5F,OAAAjB,EAAAiB,OAAAZ,WALzBL,EAAAgH,UAAAF,EAAA/D,OAQAjC,WACA,iBAEAgG,aACA,OAAWnH,EAAQpC,KAAA8C,OAAAyG,OAAAlI,OAEnB8F,eACA,OAAW/E,EAAQpC,KAAA8C,OAAA0G,MAAAnI,QCjBnB,SAAAqI,EAAAjH,GACA,MAAAiB,EAAAjB,EAAAiB,OAEAiG,EAAA,UACAC,EAAA,UACAC,EAAA,aACAC,EAAA,SAEA,SAAA3G,EAAAqD,GACA/D,EAAAU,MAAAqD,GAGA,SAAAqB,EAAAtE,GACA,OAAAd,EAAAoF,MAAAtE,GAGA,SAAAP,KAAA4E,GACA,OAAAnF,EAAAO,WAAA4E,GAGA,SAAA6B,EAAA9F,GACA,OAAAlB,EAAAgH,UAAA9F,GAsBA,SAAAoG,IACA,MAAAC,EApBA,WACA,MAAAC,EAAAjH,EAAA,YACAgG,EAAAhG,EAAA,gBACA,GAAAgG,EAAA,CACA,MAAAkB,EAAAlH,EAAA,QACA,WAAAmH,EAAA,CAAuBzG,SAAAZ,OAAA,CAAkBmH,SAAAjB,OAAAkB,aAEzCD,GAAA9G,EAAA,gCAaAiH,IAVA,WACA,MAAAH,EAAAjH,EAAA,gBACAgG,EAAAhG,EAAA,kBACA,GAAAgG,EACA,WAAAmB,EAAA,CAAuBzG,SAAAZ,OAAA,CAAkBmH,SAAAjB,UAEzCiB,GAAA9G,EAAA,8BAIAkH,GACA,GAAAL,EAAA,OAAAA,EACA,MAAAhB,EAAAhG,EAAA,0BACA,OAAAgG,EACA,IAAAmB,EAAA,CAAuBzG,SAAAZ,OAAA,CAAkBkG,eADzC,EAKA,SAAAsB,EAAAC,GACA,MAAAC,EAAAxH,EAAA,KACAwH,IACAD,EAAAzH,OAAA0H,YAEA3C,EAAA,MAAA1E,EAAA,iCAGA,MAAAgH,UAAqBpC,EACrBzB,aAAA5C,OAAiBA,EAAAZ,WACjBgF,MAAA,CAAapE,SAAAZ,WACbhC,OAAAC,eAAAf,KAAA,WAA8CqB,MAAA,KAC9CrB,KAAAyK,SAAA,KAGAC,cACA,SAEAF,eACA,QAAAxK,KAAA8C,OAAA0H,SAEAG,YACA,SAEAC,cACA,GAAA5K,KAAA6K,QAAAnG,OACA,OAAA1E,KAAA6K,QAQA,OAAazI,EALb,CACApC,KAAA8C,OAAAmH,OACAjK,KAAA8C,OAAAkG,KACAhJ,KAAA8C,OAAAoH,SACAY,OAAAxJ,MAAAgD,IAAAhD,KAAAD,OAAAmD,KAAA,OAKA,MAAAuG,UAAAZ,EACA7D,aAAA0E,GACA,MAAAhC,EAAAhG,EAAA,6CACA,IAAAgG,EACA,OAEA,MAAAC,EAAA,IAAA8B,EAAA,CAAmCrH,SAAAZ,OAAA,CAAkBkG,UAErD,OADAC,EAAAnG,OAAAoG,KAAAlG,EAAA,MAAAG,8BAA0E6F,EAAAzF,QAC1EyF,EAAAzF,MACA,eACAsE,EAAA,MAAA1E,EAAA,+CACA,MAAA0H,EAAAI,EAAAD,IAAA7H,EAAA,2BACA8F,EAAA4B,QAAAzH,KAAAyH,GACA,MAEA,eACA,mBACA,MAAAA,EAAAK,EAAAF,IAAA7H,aAAsF6F,EAAAzF,gBACtF0F,EAAA4B,QAAAzH,KAAAyH,GACA,MAEA,cACAhD,EAAA,MAAA1E,EAAA,6CACA,MAAAgI,EAAAnI,KAAqCgD,IAAW7C,gCAAyC6C,EAAWxB,KAAA,SACpG4G,EAAA,IAAAjB,EAAA,CAAuCzG,SAAAZ,OAAA,CAAkBkG,KAAAmC,KACzDC,EAAAtI,OAAAC,UAAAC,EAAA,MAAAG,EAAA,uCACAiI,EAAA7H,KAAAyH,EACA,MAAAK,EAAAH,EAAAF,IAAA7H,EAAA,qCACA8F,EAAA4B,QAAAzH,KAAAgI,EAAAC,GACA,OAKA,OAFApC,EAAA2B,SAAAzH,gCAA4D6F,EAAAzF,QAC5D0F,EAAAnG,OAAA+F,MAAA7F,EAAA,MAAAG,mCAAgF6F,EAAAzF,QAChF0F,EAGAyB,cACA,OAAA1K,KAAA8C,OAAAkG,KAAA3H,OAuBA,MAAAiK,UAAAnB,EACA7D,aAAA/C,GACA,MAAAT,EAAA,GAEA,GADAA,EAAAoG,KAAAlG,EAAA,MACAF,EAAAoG,KAAA,OACA,MAAAD,EAAA,IAAAqC,EAAA,CAAiC5H,SAAAZ,WAEjC,IADAmG,EAAA1F,QAAA,OACA,CACA,MAAAgI,EAAAL,KAAA/H,EAAA,wDACA,QAAAoI,EAAAX,SAAAzH,EAAA,iDACA8F,EAAA4B,QAAAzH,KAAAmI,GACA,MAAAC,EAAAxI,EAAA,MACA,IAAAwI,EAGA,MAFAD,EAAAzI,OAAAC,UAAAyI,EASA,OALAvC,EAAA2B,QAAAlG,OAAA,GACAvB,EAAA,kEAEAL,EAAA+F,MAAA7F,EAAA,MAAAG,EAAA,2BACAmH,EAAArB,GACAA,EAGA0B,YACA,UAIA,SAAApH,EAAAyH,GACA,OAlDA,SAAAA,GACA,IAAA/B,EAAA8B,EAAA3B,MAAA4B,IAAAjB,IACA,IAAAd,EAAA,CACA,MAAAD,EAAAhG,EAAA6G,KAAkC7D,GAClC,IAAAgD,EACA,OAEAC,EAAA,IAAAkB,EAAA,CAAsBzG,SAAAZ,OAAA,CAAkBkG,UACxCnB,EAAA,MAAA1E,8BAAwD6F,EAAA3H,SAQxD,MANA,YAAA4H,EAAAyB,SAAA7C,EAAA,MACA1E,EAAA,mCAEA8F,EAAA1F,KAAAyH,GAAA,KACAV,EAAArB,GACAA,EAAAuB,UAAA,QAAAvB,EAAA2B,SAAAzH,EAAA,sCACA8F,EAkCAwC,CAAAT,IAAAM,EAAAlC,MAAA4B,GAGA,SAAAE,EAAAF,GACA,MAAAP,EAAAiB,EAAAtC,QACAH,EAAA1F,EAAAyH,GAEA,OADA/B,MAAAwB,YACAxB,EAGA,MAAA0C,UAAyB5D,EACzBzB,eACA,MAAAsF,EAAAnJ,EAAAkB,SACAb,EAAA,GACAmG,EAAA,IAAA0C,EAAA,CAAgCjI,SAAAZ,WAGhC,OAFAA,EAAA+I,SAAA7I,EAAA,YACAiG,EAAA2B,QAAAM,EAAA,iBACAjC,EAAA2B,SAGA9H,EAAA+I,WACA/I,EAAAgJ,SAAA9I,EAAA,QAEAF,EAAAnC,KAAAqC,EAAA6G,KAAmC5D,GACnCnD,EAAAnC,MAGAsI,EAAA8C,QAAAjJ,EAAA+I,SAAsCpD,EAAOW,MAAA3G,GAAA,KAC7CwG,GAHAQ,EAAAmC,IAPAnC,EAAAmC,GAaAC,eACA,QAAA7L,KAAA8C,OAAA+I,SAEAC,eACA,QAAA9L,KAAA8C,OAAAgJ,SAEAnL,WACA,OAAayB,EAAQpC,KAAA8C,OAAAnC,KAAAU,QAIrB,SAAA2K,IACA,OAAWxJ,EAAIC,EAAA,CAAaC,OAAAiJ,EAAAvC,MAAAxG,SAAA,mBAW5B,MAAAqJ,UAA4ClE,EAC5CzB,eACA,MAAAxD,EAAA,CAAsB4F,OAAA1F,EAAA,MACtBiG,EAAA,IAAAgD,EAAA,CAAmDvI,SAAAZ,WAenD,OAdAA,EAAA4F,SACA5F,EAAAoJ,cAAAlJ,EAAA6G,EAAAF,EAAAC,EAAAE,IAEAhH,EAAAoG,KAAAlG,EAAA,KACAF,EAAAoG,MACAD,EAAAzG,KAAA,oBAAAyG,EAAAkD,QAjBA,WACA,MAAAC,EAAgB5J,EAAIC,EAAA,CAAaC,OAAS8F,EAAK9F,OAAAD,EAAAoH,GAAAjH,SAAA,oBAI/C,OAHAwJ,EAAA1H,QACAvB,EAAA,uCAEAiJ,EAcAC,GAEAL,IACAlJ,EAAA+F,MAAA7F,EAAA,MAAAG,EAAA,yDACO8F,EAAAqD,SAAAxJ,EAAAoJ,eACP/I,EAAA,uDAEA8F,EAGAkD,cACA,OAAAnM,KAAA8C,OAAA4F,OACA1I,KAAA8C,OAAAoJ,cACAlM,KAAA8C,OAAAoJ,cAAA3I,KADA,kBADA,MAMA,MAAAgJ,UAAwCxE,EACxCzB,eACA,MAAA3F,EAAAqC,EAAA6G,GACA,GAAAlJ,EACA,WAAA4L,EAAA,CACAzJ,OAAA,CAAmBnC,QACnB6L,OAAAP,EAAA7C,UAKA9C,aAAA5C,OAAiBA,EAAAZ,SAAA0J,WACjB1E,MAAA,CAAapE,SAAAZ,WACbhC,OAAAC,eAAAf,KAAA,UAA6CqB,MAAAmL,IAG7CjJ,WACA,2BAEA5C,WACA,OAAAX,KAAA8C,OAAAnC,KAAAU,MAEAoL,UACA,MAAaN,QAAA5I,EAAAT,SAAAN,QAA8BxC,KAAAwM,OAC3C,OAAAjJ,EAIA,CAAcA,OAAAlC,MADd,oBAAAkC,EAAAf,EAAAM,EAAAoJ,cAAA7K,OAFA,KAKAqL,gBACA,MAAAP,QAAaA,EAAA3J,QAAgBxC,KAAAwM,OAC7B,OAAAhK,GAAA,oBAAA2J,EAGA3J,EAFA,IAQA,MAAAkJ,UAAmC3D,EACnCzB,eACA,MAAAxD,EAAA,GAEA,GADAA,EAAAoG,KAAAlG,EAAA,MACAF,EAAAoG,KAAA,YACA,MAAAD,EAAA,IAAAyC,EAAA,CAA0ChI,SAAAZ,WAS1C,OARAmG,EAAAhG,MAAkBT,EAAIC,EAAA,CACtBC,OAAA6J,EAAAnD,MACAxG,SAAA,uBAEAE,EAAA+F,MAAA7F,EAAA,MAAAG,EAAA,yCACA8F,EAAAhG,MAAAyB,QACAvB,EAAA,qCAEA8F,GAIA,MAAA0D,UAAyB5E,EACzBzB,eACA,MAAAxD,EAAA,GAEA,GADAA,EAAAkG,KAAAhG,EAAA,UACAF,EAAAkG,KACA,OAEA,IAAA4B,EAAAb,IACA,IAAAa,EAAA,CACA,MAAA5B,EAAAhG,EAAA6G,IAAA1G,EAAA,qBACAyH,EAAA,IAAAT,EAAA,CAA4BzG,SAAAZ,OAAA,CAAkBkG,UAE9CnB,EAAA,MACA1E,EAAA,qCAEAyH,EAAArH,KAAA,aACAT,EAAAnC,KAAAqC,EAAA6G,IAAA1G,EAAA,qBACAL,EAAA4F,OAAA1F,EAAA,MAAAG,EAAA,iCACAL,EAAAzB,MAAqBgC,EAAWZ,IAAAU,EAAA,sBAChCL,EAAAuG,YAAArG,EAAA,MAAqCG,EAAA,sBACrC,MAAA8F,EAAA,IAAA0D,EAAA,CAAgCjJ,SAAAZ,WAEhC,OADAmG,EAAA2B,UACA3B,EAGA1F,WACA,cAEA5C,WACA,OAAayB,EAAQpC,KAAA8C,OAAAnC,KAAAU,OAErBA,YACA,OAAaiC,EAAUtD,KAAA8C,OAAAzB,QAIvB,MAAAuL,UAAiC7E,EACjCzB,aAAA0C,GACA,MAAAlG,EAAA,CAAsBkG,QACtBC,EAAA,IAAA2D,EAAA,CAAwClJ,SAAAZ,WASxC,OARAA,EAAAnC,KAAAqC,EAAA6G,IAAA1G,EAAA,wBACAV,EAAAmB,QAAAqF,EACAnG,EAAA4F,OAAA1F,EAAA,MAAAG,EAAA,6BACA8F,EAAA2B,QAAAK,KAAA9H,EAAA,uBACAL,EAAAoG,KAAAlG,EAAA,MAAAG,EAAA,4BACA8F,EAAAyD,UAAAV,IACAlJ,EAAA+F,MAAA7F,EAAA,MAAAG,EAAA,yBACAL,EAAAuG,YAAArG,EAAA,MAAqCG,EAAA,yBACrC8F,EAGA1F,WACA,iBAEA5C,WACA,OAAayB,EAAQpC,KAAA8C,OAAAnC,KAAAU,QAcrB,MAAAwL,UAA0B9E,EAC1BzB,cAAAwG,QAAkBA,EAAAC,aAAA,EAAAC,YAAA,GAA+C,IACjE,MAAApB,EAAAnJ,EAAAkB,SACAb,EAAA,CAAsBgK,WACtB7D,EAAA,IAAA4D,EAAA,CAAiCnJ,SAAAZ,WASjC,GARAgK,GAAAC,IACAjK,EAAAgK,QAAA9J,EAAA,YAEAF,EAAAkK,SAAAhK,EAAA,YACAgK,IAAAlK,EAAAkK,UAAAnF,EAAA,cACA1E,EAAA,+CAEAL,EAAAkG,KAAAhG,EAAA,aACAF,EAAAkG,KAAA,CAKA,OADAC,EAAA2B,QAAAM,EAAA,mBAAA/H,EAAA,wBACA8F,EAAA2B,QAAAF,SACA,eACA,aAAAvH,8BAAyD8F,EAAA2B,QAAAF,iBAIzD,OAFA5H,EAAAnC,KAAAqC,EAAA6G,EAAA,aAAA1G,EAAA,wBACAL,EAAAuG,YAAArG,EAAA,MAAqCG,EAAA,0BACrC8F,EAVAQ,EAAAmC,GAaArI,WACA,kBAEAuJ,cACA,OAAA9M,KAAA8C,OAAAgK,QAGA9M,KAAA8C,OAAAgK,QAAAzL,MAFA,GAIA2L,eACA,QAAAhN,KAAA8C,OAAAkK,SAEArM,WACA,OAAayB,EAAQpC,KAAA8C,OAAAnC,KAAAU,QAIrB,SAAA4J,EAAAD,GACA,MAAAO,EAAAhI,EAAAyH,GAAA,eACA,GAAAO,EACA,OAAAA,EAEA,MAAA0B,EAAAjK,EAAA,QACA,GAAAiK,EAAA,CACA,MAAAhE,EAAA,IAAAkB,EAAA,CAA4BzG,SAAAZ,OAAA,CAAkBkG,KAAAiE,KAE9C,OADAhE,EAAA1F,KAAA,cACA0F,GAIA,MAAAiE,UAA8BnF,EAC9BzB,eACA,MAAAxD,EAAA,GACAmG,EAAA,IAAAiE,EAAA,CAAqCxJ,SAAAZ,WAMrC,OALAmG,EAAA2B,QAAAK,KAAA9H,EAAA,uBACAL,EAAAnC,KAAAqC,EAAA6G,GACA/G,EAAAoG,KAAAlG,EAAA,MAAAG,EAAA,qBACA8F,EAAAyD,UAAAV,IACAlJ,EAAA+F,MAAA7F,EAAA,MAAAG,EAAA,0BACA8F,EAGAtI,WACA,MAAAA,KAAaA,GAAOX,KAAA8C,OACpB,OAAAnC,EAGayB,EAAQzB,EAAAU,OAFrB,IAMA,MAAA8L,UAA0BpF,EAC1BzB,cAAAwG,QAAkBA,EAAAM,WAAmB,IACrC,MAAAtK,EAAA,CAAsBgK,WACtB7D,EAAA,IAAAkE,EAAA,CAAiCzJ,SAAAZ,WACjC,OAAAgK,GAAA,gBAAAA,EAAAzL,QACAyB,EAAAuG,YAAArG,EAAA,KACAF,EAAAuG,cACAJ,EAAAoE,KAAA,KACApE,IAGA6D,GAAAM,IACAtK,EAAAgK,QAAA9J,EAAA,8BAEAiG,EAAAoE,KAAAH,EAAA9D,QACAtG,EAAAuG,YAAArG,EAAA,MAAqCG,EAAA,0BACrC8F,GAGA1F,WACA,kBAEA5C,WACA,OAAAX,KAAAqN,MAAArN,KAAAqN,KAAA1M,MAAA,GAEAmM,cACA,OAAA9M,KAAA8C,OAAAgK,QAGA9M,KAAA8C,OAAAgK,QAAAzL,MAFA,IAMA,SAAAiM,IACA,MAAAR,EAAA9J,EAAA,UACA,GAAA8J,EAIA,OAHAD,EAAAzD,MAAA,CAAoC0D,aACpCK,EAAA/D,MAAA,CAAuB0D,aACvB3J,EAAA,4BAIA,SAAAoK,IACA,MAAAT,EAAA9J,EAAA,eACA,GAAA8J,EAIA,OAHAD,EAAAzD,MAAA,CAAoC0D,aACpCK,EAAA/D,MAAA,CAAuB0D,aACvB3J,EAAA,4BAIA,MAAAqK,UAA6BzF,EAC7BzB,eACA,MAAAsF,EAAAnJ,EAAAkB,SACAb,EAAA,GACAmG,EAAA,IAAAuE,EAAA,CAAoC9J,SAAAZ,WAKpC,GAJAA,EAAAkK,SAAAhK,EAAA,YACAF,EAAAkG,KAAAlG,EAAAkK,SACAhK,EAAA,qBACAA,EAAA,iCACAF,EAAAkG,KAEA,YADAS,EAAAmC,GAIA,MAAArI,KAAaA,GAAO0F,EACpBwE,EAAA,YAAAlK,EACAmK,EAAAD,GAAA,aAAAlK,EAEAT,EAAAoG,KAAAlG,EAAA,MAAAG,mBAA2DI,iBAC3D,MAAAV,EAAAqI,KAAA/H,mBAA8EI,iBAa9E,OAZA0F,EAAA2B,QAAA,CAAA/H,GACA6K,IACA7K,EAAAC,OAAAC,UAAAC,EAAA,KACAH,EAAAC,OAAAC,UACAkG,EAAA2B,QAAAxH,KAAA8H,KAEAuC,GACAtK,qCAAmDI,kBAEnDT,EAAA+F,MAAA7F,EAAA,MAAAG,kBAA2DI,iBAC3DT,EAAAuG,YAAArG,EAAA,MAAqCG,6BAAuCI,iBAE5E0F,EAGA1F,WACA,OAAAvD,KAAA8C,OAAAkG,KAAA3H,MAEA2L,eACA,QAAAhN,KAAA8C,OAAAkK,UAIA,MAAAW,UAA4B5F,EAC5BzB,eACA,MAAAsH,EAAA5K,EAAA,KACA,IAAA4K,EACA,OAEA,MAAAjN,EAAAqC,EAAA6G,IAAA1G,EAAA,0BACA,WAAAwK,EAAA,CAA8BjK,SAAAZ,OAAA,CAAkB8K,QAAAjN,UAGhDA,WACA,OAAayB,EAAQpC,KAAA8C,OAAAnC,KAAAU,QAIrB,MAAAwM,UAA0B9F,EAC1BzB,aAAAwH,GAAAvK,KAA4BA,EAAAwK,cAAAC,mBAC5B,MAAAlL,OAAaA,GAASgL,EAQtB,IAPAhL,EAAAnC,KAAAqC,EAAA6G,IAAA1G,EAAA,yBACAV,EAAAmB,QAAAkK,EACAC,IACAD,EAAAG,YAAAN,EAAAvE,SAAA,MAEAtG,EAAAoG,KAAAlG,EAAA,MAA8BG,cAAwBI,KACtDuK,EAAAI,QAAA,KACA,CAEA,GADApL,EAAA+F,MAAA7F,EAAA,KACAF,EAAA+F,MAEA,OADA/F,EAAAuG,YAAArG,EAAA,MAAyCG,6BAAuCI,KAChFuK,EAEA,MAAAK,EAAAzC,EAAAtC,QACA,IAAAgF,EACA,UAAA1L,KAAA2L,KAAAL,EAEA,GADAI,EAAA1L,KAAA2L,GAEA,MAGAD,GACAjL,EAAA,kBAEAiL,EAAA3D,SAAA0D,EACAL,EAAAI,QAAA9K,KAAAgL,IAIAhJ,cACA,QAAApF,KAAA8C,OAAAsC,QAEAzE,WACA,OAAayB,EAAQpC,KAAA8C,OAAAnC,KAAAU,QAIrB,MAAAiN,UAAAT,EACAvH,aAAA0C,GAAAuF,SAAwBA,EAAA,KAAAnJ,UAAA,MAAkC,IAC1D,MAAAtC,EAAA,CAAsByL,WAAAnJ,UAAA4D,QACtB,OAAA6E,EAAAzE,MAAA,IAAAkF,EAAA,CAA4C5K,SAAAZ,WAAiB,CAC7DS,KAAA,YACAwK,aAAA3I,EACA4I,eAAA,CACA,CAAArB,EAAAvD,OACA,CAAAkE,GACA,CAAAC,GACA,CAAAC,EAAApE,OACA,CAAAyD,EAAAzD,OACA,CAAA+D,EAAA/D,UAKA7F,WACA,OAAAvD,KAAA8C,OAAAyL,SACA,qBAEA,aAIA,MAAAC,UAAAX,EACAvH,aAAA0C,GAAA5D,QAAwBA,GAAU,IAClC,MAAAtC,EAAA,CAAsBsC,UAAA4D,QAEtB,GADAlG,EAAA0G,MAAAxG,EAAA,SACAF,EAAA0G,MAGA,OAAAqE,EAAAzE,MAAA,IAAAoF,EAAA,CAAwC9K,SAAAZ,WAAiB,CACzDS,KAAA,kBACAyK,eAAA,CACA,CAAArB,EAAAvD,OACA,CAAAmE,GACA,CAAAV,EAAAzD,MAAA,CAA6B2D,WAAA,IAC7B,CAAAI,EAAA/D,MAAA,CAA6BgE,SAAA,OAK7B7J,WACA,yBAIA,SAAAkL,EAAAC,GACA,MAAA1F,EAAAhG,EAAA,aACA,GAAAgG,EAIA,OAHAwF,EAAApF,MAAAJ,EAAA0F,IACAJ,EAAAlF,MAAAJ,EAAA0F,IACAvL,EAAA,gCAIA,MAAAwL,UAAAd,EACAvH,cAAAlB,QAAkBA,GAAU,IAC5B,MAAAtC,EAAA,CAAsBsC,WAEtB,GADAtC,EAAAkG,KAAAhG,EAAA,aACAF,EAAAkG,KAGA,OAAA6E,EAAAzE,MAAA,IAAAuF,EAAA,CAA4CjL,SAAAZ,WAAiB,CAC7DS,KAAA,YACAyK,eAAA,CACA,CAAAnB,EAAAzD,MAAA,CAA6B2D,WAAA,EAAAC,UAAA,IAC7B,CAAAG,EAAA/D,MAAA,CAA6BgE,SAAA,OAK7B7J,WACA,mBAaA,MAAAqL,UAAAf,EACAvH,cAAAlB,QAAkBA,GAAU,IAC5B,MAAAtC,EAAA,CAAsBsC,WAEtB,GADAtC,EAAAkG,KAAAhG,EAAA,cACAF,EAAAkG,KAGA,OAAA6E,EAAAzE,MAAA,IAAAwF,EAAA,CAA6ClL,SAAAZ,WAAiB,CAC9DS,KAAA,aACAwK,aAAA3I,EACA4I,eAAA,CACA,CAAAa,EAAAzF,UAKA7F,WACA,oBAIA,MAAAsL,UAAsB9G,EACtBzB,eACA,MAAAxD,EAAA,GACAmG,EAAA,IAAA4F,EAAA,CAA6BnL,SAAAZ,WAQ7B,OAPAmG,EAAAwB,SAAAiB,EAAAtC,QACAtG,EAAAgM,SAAA9L,EAAA,YACAiG,EAAA2B,QAAAM,EAAA,oBAAA/H,EAAA,iCACAL,EAAAnC,KAAAqC,EAAA6G,IAAA1G,EAAA,iCACA8F,EAAA8C,QAAoBtD,EAAOW,MAAA3G,GAC3BK,EAAAgM,UAAA7F,EAAA8C,SAAA5I,EAAA,2CACAL,EAAAuG,YAAArG,EAAA,MAAqCG,EAAA,kCACrC8F,EAGA1F,WACA,cAEA5C,WACA,OAAayB,EAAQpC,KAAA8C,OAAAnC,KAAAU,OAErByN,eACA,QAAA9O,KAAA8C,OAAAgM,UAIA,MAAAC,UAAwBhH,EACxBzB,eACA,MAAAxD,EAAA,GACAmG,EAAA,IAAA8F,EAAA,CAA+BrL,SAAAZ,WAE/B,GADAA,EAAAkG,KAAAhG,EAAA,WACAF,EAAAkG,KAOA,OAJAC,EAAA2B,QAAAM,EAAA,iBAAA/H,EAAA,sBACAL,EAAAnC,KAAAqC,EAAA6G,IAAA1G,EAAA,sBACAV,EAAAmB,QAAAqF,EACAnG,EAAAuG,YAAArG,EAAA,MAAqCG,EAAA,wBACrC8F,EAGA1F,WACA,gBAEA5C,WACA,OAAayB,EAAQpC,KAAA8C,OAAAnC,KAAAU,QAIrB,SAAA2N,IACA,OA1YA,WACA,MAAAT,EAAAvL,EAAA,YACA,IAAAuL,EAAA,OACA,MAAAU,EAAAjM,EAAA,aACA,OAAAiM,EACAX,EAAAlF,MAAA6F,EAAA,CAAmCV,aAEnC3B,EAAAxD,MAAAmF,GAmYAA,IACAE,KAhFA,WACA,MAAArJ,EAAApC,EAAA,WACA,GAAAoC,EACA,OAAAwJ,EAAAxF,MAAA,CAA6BhE,aAC7BqJ,EAAA,CAAkBrJ,aAClBuJ,EAAAvF,MAAA,CAAuBhE,aACvBjC,EAAA,qCA2EAiC,IACAwJ,EAAAxF,SACML,EAAIK,MAAA3G,IACVsM,EAAA3F,SACME,EAAQF,MAAA3G,IACdkM,EAAAvF,QAmBA,MAAA8F,EAhBA,WACA,IAAAxL,EAAAgB,OAAA,SACA,MAAAyK,EAAA,GACA,QACA,MAAAhB,EAAAzC,EAAAtC,QACAT,EAAAqG,IACA,IAAArG,EAAA,CACAwF,GAAAhL,EAAA,6BACA,MAEAwF,EAAA8B,SAAA0D,EACAgB,EAAA/L,KAAAuF,GAGA,OADAwG,EAAA/L,KAAAJ,EAAA,QACAmM,EAEAC,GAEA,OADA3M,EAAAkB,SAAAD,EAAAgB,QAAAvB,EAAA,uBACA+L,EAGO,SAAA9F,EAAA5C,GAEP,OAAAkD,EADA,IAAwBrD,EAASG,ICnzBjC,SAAA6I,EAAAC,GACA,OAAAA,EAGA,MAAAC,EAAA,CACAC,KAAAvM,KAAAuB,KAAA,IACAD,OAAA8K,EACA1O,KAAA0O,EACAI,UAAAJ,EACA9L,KAAA8L,EACA3E,QAAA2E,EACApB,YAAAoB,EACAL,WAAAK,EACAK,kBAAAL,EACAM,2BAAAN,GAGO,SAAAO,EAAAC,GAAqBN,UAAAO,EAAAP,GAA4B,IAGxD,SAAAE,EAAAM,EAAAC,GACA,OAAAF,EAAAL,UAAAM,EAAAC,GAAAD,GAGA,SAAAxK,EAAAjE,EAAA2O,EAAAZ,KAAAhB,GACA,IAAA/M,EACA,SAEA,MAAAD,EAAA4O,EAAA3O,EAAAD,SAAAgN,GACA,OAAAyB,EAAAN,KAAA,CAAAM,EAAAvL,OAAAjD,EAAAiD,QAAAlD,IAGA,SAAA6O,EAAA5O,EAAA0O,GACA,OAAAzK,EAAAjE,EAAAmO,EAAAO,GAGA,SAAAG,EAAA7O,EAAAgO,GACA,OAAA/J,EAAAjE,EAAAwO,EAAAnP,KAAA2O,GAGA,SAAAc,EAAAC,GACA,GAAAA,EAAA1F,OAAA0F,EAAA3F,QACA,OAAAoF,EAAAN,KAAA,CACAjK,EAAA8K,EAAAvN,OAAAkG,KAAA8G,EAAApF,SACAnF,EAAA8K,EAAAvN,OAAAoG,SACAmH,EAAAxF,QAAAvG,IAAAf,GACAgC,EAAA8K,EAAAvN,OAAA+F,SAGA,MAAAyH,EAAAD,EAAAvN,OAAAmH,QAAAoG,EAAAvN,OAAAkG,KACAiB,EAAAoG,EAAAvN,OAAAmH,OAAA,CACAoG,EAAAvN,OAAAmH,OAAA5I,MACAyO,EAAAvL,OAAA8L,EAAAvN,OAAAkG,KAAAzE,SACA,GACAgM,EAAAd,EAAAK,EAAAN,KAAA,IACAvF,EACAoG,EAAAvN,OAAAkG,KAAA3H,MACAkE,EAAA8K,EAAAvN,OAAAoH,WACAmG,EAAAzF,SACA,OAAAkF,EAAAN,KAAA,CAAAM,EAAAvL,OAAA+L,EAAA/L,QAAAgM,IAEA,SAAAhN,EAAA8M,GACA,OAAAP,EAAAN,KAAA,CACAgB,EAAAH,EAAA5F,UACA2F,EAAAC,GACA9K,EAAA8K,EAAAvN,OAAA0H,UACAjF,EAAA8K,EAAAvN,OAAAC,aAGA,SAAA0N,EAAA9H,GACA,OAAAA,EAGAmH,EAAAN,KAAA,CACAjK,EAAAoD,EAAA7F,OAAA4F,WACAC,EAAAC,WAAAtE,IAAAhD,GAAAiE,EAAAjE,MAJA,GAOA,SAAAoP,EAAApB,GACA,OAAAQ,EAAAN,KAAA,CACAgB,EAAAlB,EAAA7E,UACAlF,EAAA+J,EAAAxM,OAAA+I,UACAiE,EAAAvM,OAAA+L,EAAA1E,UACArF,EAAA+J,EAAAxM,OAAAgJ,UACAqE,EAAAb,EAAAxM,OAAAnC,KAAA,CAAmCgQ,KAAArB,IACnCmB,EAAAnB,EAAAvD,SACAxG,EAAA+J,EAAAxM,OAAAC,aAGA,SAAAV,EAAAuO,GACA,OAAAd,EAAAN,KAAA,CACAU,EAAAU,EAAA9N,OAAAzB,OACAkE,EAAAqL,EAAA9N,OAAAC,aAGA,SAAA8N,EAAAR,GACA,MAAAlE,QAAWA,GAAUkE,EAAA7D,OACrB,OAAAsD,EAAAN,KAAA,CACAM,EAAAvL,OAAA8L,EAAAvN,OAAAnC,KAAA4D,QACAuL,EAAAJ,kBAAAI,EAAAN,KAAA,CACAM,EAAAH,2BAAAU,EAAA1P,MACA4E,EAAA8K,EAAA7D,OAAA1J,OAAA4F,QACAwH,EAAAG,EAAA7D,OAAA1J,OAAAoJ,eACA3G,EAAA8K,EAAA7D,OAAA1J,OAAAoG,SACAmH,EAAA7D,OAAAhK,KACA6N,EAAA7D,OAAAhK,KAAA8B,IACA,oBAAA6H,EAAA9J,EAAAqO,GAFA,GAIAnL,EAAA8K,EAAA7D,OAAA1J,OAAA+F,UAEAtD,EAAA8K,EAAAvN,OAAAC,aAGA,SAAAyN,EAAAM,GACA,OAAAA,EACAhB,EAAAN,KAAA,CACAjK,EAAAuL,EAAAhO,OAAAoG,SACA4H,EAAA7N,MAAAqB,IAAAuM,GACAtL,EAAAuL,EAAAhO,OAAA+F,SAJA,GA+CA,SAAAkI,EAAAV,GACA,OAAAP,EAAAd,WAAAc,EAAAN,KAAA,CACAgB,EAAAH,EAAA5F,UACAlF,EAAA8K,EAAAvN,OAAAyL,UACAhJ,EAAA8K,EAAAvN,OAAAsC,SACAG,EAAA8K,EAAAvN,OAAAkG,MACAzD,EAAA8K,EAAAvN,OAAA0G,OACA2G,EAAAE,EAAAvN,OAAAnC,KAAA,CAAkCgQ,KAAAN,KAlBlCW,EAmBAX,EAAApC,YAlBA+C,EAGAlB,EAAAN,KAAA,CACAjK,EAAAyL,EAAAlO,OAAA8K,OACAkC,EAAAvL,OAAAyM,EAAAlO,OAAAnC,KAAA4D,QACAuL,EAAA7B,YAAAwB,EAAAuB,EAAAlO,OAAAnC,KAAAU,MAAA2P,EAAArQ,SALA,IAkBA4E,EAAA8K,EAAAvN,OAAAoG,MACA+H,EAAAZ,EAAAnC,QAAAmC,GACA9K,EAAA8K,EAAAvN,OAAA+F,OACAtD,EAAA8K,EAAAvN,OAAAuG,eACA,CAASsH,KAAAN,IAxBT,IAAAW,EAoGA,SAAAE,EAAAb,EAAAc,GACA,OAAArB,EAAAd,WAAAc,EAAAN,KAAA,CACAgB,EAAAH,EAAA5F,UACAlF,EAAA8K,EAAAvN,OAAAkK,UACAzH,EAAA8K,EAAAvN,OAAAkG,KAAA8G,EAAApF,SACAnF,EAAA8K,EAAAvN,OAAAoG,MACA4G,EAAAN,KAAAa,EAAAzF,QAAAtG,IAAAf,IACAgC,EAAA8K,EAAAvN,OAAA+F,OACAtD,EAAA8K,EAAAvN,OAAAuG,eACA,CAASsH,KAAAN,EAAAc,WAjPTrB,EAAAhP,OAAA4H,OAAA,GAAuB6G,EAAAO,GAuPvB,MAAAsB,EAAA,CACAC,UAAAN,EACAO,kBAAAP,EACAQ,UAAAR,EACAS,UAnJA,SAAAnB,EAAAc,GACA,MAAA9D,EAAAgD,EAAAhD,KAAA,CACAyC,EAAAvM,OAAA8M,EAAAhD,KAAAzC,UACAuF,EAAAE,EAAAhD,KAAAvK,OAAAnC,KAAA,CAAuCgQ,KAAAN,EAAAc,WACvC5L,EAAA8K,EAAAhD,KAAAvK,OAAAoG,MACA4G,EAAAN,KAAAa,EAAAhD,KAAAX,UAAApI,IAAAoM,IACAnL,EAAA8K,EAAAhD,KAAAvK,OAAA+F,QACA,GACA,OAAAiH,EAAAd,WAAAc,EAAAN,KAAA,CACAgB,EAAAH,EAAA5F,UACAlF,EAAA8K,EAAAvN,OAAAgK,YACAO,EACA9H,EAAA8K,EAAAvN,OAAAuG,eACA,CAASsH,KAAAN,EAAAc,YAuITM,UApIA,SAAApB,EAAAc,GACA,OAAArB,EAAAd,WAAAc,EAAAN,KAAA,CACAgB,EAAAH,EAAA5F,UACAlF,EAAA8K,EAAAvN,OAAAgK,SACAvH,EAAA8K,EAAAvN,OAAAkK,UACAzH,EAAA8K,EAAAvN,OAAAkG,MACA8G,EAAAvM,OAAA8M,EAAAzF,UACAuF,EAAAE,EAAAvN,OAAAnC,KAAA,CAAkCgQ,KAAAN,EAAAc,WAClC5L,EAAA8K,EAAAvN,OAAAuG,eACA,CAASsH,KAAAN,EAAAc,YA4HTO,WAAAX,EACAY,MA/FA,SAAAtB,EAAAc,GACA,OAAArB,EAAAd,WAAAc,EAAAN,KAAA,CACAgB,EAAAH,EAAA5F,UACAlF,EAAA8K,EAAAvN,OAAAgM,UACAgB,EAAAvM,OAAA8M,EAAAzF,UACAuF,EAAAE,EAAAvN,OAAAnC,KAAA,CAAkCgQ,KAAAN,EAAAc,WAClCV,EAAAJ,EAAAtE,SACAxG,EAAA8K,EAAAvN,OAAAuG,eACA,CAASsH,KAAAN,EAAAc,YAwFTS,MAtFA,SAAAvB,EAAAc,GACA,OAAArB,EAAAd,WAAAc,EAAAN,KAAA,CACAgB,EAAAH,EAAA5F,UACAlF,EAAA8K,EAAAvN,OAAAkG,MACA8G,EAAAvM,OAAA8M,EAAAzF,UACAuF,EAAAE,EAAAvN,OAAAnC,KAAA,CAAkCgQ,KAAAN,EAAAc,WAClC5L,EAAA8K,EAAAvN,OAAA4F,QACAnD,EAAA8K,EAAAvN,OAAAzB,OACAkE,EAAA8K,EAAAvN,OAAAuG,eACA,CAASsH,KAAAN,EAAAc,YA8ETU,QA5EA,SAAAxB,GACA,OAAAP,EAAAd,WAAAc,EAAAN,KAAA,CACAgB,EAAAH,EAAA5F,UACAlF,EAAA8K,EAAAvN,OAAAkG,MACA8G,EAAAvM,OAAA8M,EAAAzF,UACAuF,EAAAE,EAAAvN,OAAAnC,KAAA,CAAkCgQ,KAAAN,IAClC9K,EAAA8K,EAAAvN,OAAAuG,eACA,CAASsH,KAAAN,KAsETlJ,SApEA,SAAAkJ,GACA,OAAAP,EAAAd,WAAAc,EAAAN,KAAA,CACAgB,EAAAH,EAAA5F,UACAyF,EAAAG,EAAAvN,OAAAyG,OAAA8G,EAAA9G,QACAhE,EAAA8K,EAAAvN,OAAAqE,UACA+I,EAAAG,EAAAvN,OAAA0G,MAAA6G,EAAAlJ,UACA5B,EAAA8K,EAAAvN,OAAAuG,eACA,CAASsH,KAAAN,KA8DT9B,SA5DA,SAAA8B,GACA,OAAAP,EAAAd,WAAAc,EAAAN,KAAA,CACAgB,EAAAH,EAAA5F,UACAlF,EAAA8K,EAAAvN,OAAAkG,MACAmH,EAAAE,EAAAvN,OAAAnC,KAAA,CAAkCgQ,KAAAN,IAClC9K,EAAA8K,EAAAvN,OAAA4F,QACAoH,EAAAvM,OAAA8M,EAAAzF,UACArF,EAAA8K,EAAAvN,OAAAoG,SACAmH,EAAA3D,UAAApI,IAAAoM,GACAnL,EAAA8K,EAAAvN,OAAA+F,OACAtD,EAAA8K,EAAAvN,OAAAuG,eACA,CAASsH,KAAAN,KAkDTyB,KAhDA,SAAAzB,GACA,OAAAP,EAAAd,WAAAc,EAAAN,KAAA,CACAgB,EAAAH,EAAA5F,UACAlF,EAAA8K,EAAAvN,OAAAkG,MACAmH,EAAAE,EAAAvN,OAAAnC,KAAA,CAAkCgQ,KAAAN,IAClC9K,EAAA8K,EAAAvN,OAAAoG,MACA+H,EAAAZ,EAAAlH,OAAAkH,GACA9K,EAAA8K,EAAAvN,OAAA+F,OACAtD,EAAA8K,EAAAvN,OAAAuG,eACA,CAASsH,KAAAN,KAwCT0B,aAtCA,SAAAC,EAAAb,GACA,OAAArB,EAAAN,KAAA,CACAM,EAAAvL,OAAAyN,EAAAlP,OAAAzB,MAAAkD,QACAuL,EAAAd,WACAc,EAAAN,KAAA,KAAAM,EAAAnP,KAAAqR,EAAA3Q,MAAA,CAAwCsP,KAAAqB,EAAAb,WAAkB,MAC1D,CAASR,KAAAqB,EAAAb,WAET5L,EAAAyM,EAAAlP,OAAAC,cAgCAkP,SAAAf,EACAgB,eAAAhB,EACAiB,QAAAjB,EACAkB,QAAAlB,EACAmB,qBAAAtB,EACAuB,IAvBA,SAAAjC,GACA,OAAAP,EAAAvL,OAAA8L,EAAA9L,UA+BA,SAAA0M,EAAAsB,EAAApB,GACA,IAAAoB,EAAA,OACA,MAAAC,EAAAD,EAAAjO,IAAAmO,IATA,SAAApC,EAAAc,GAEA,IADAC,EAAAf,EAAA9M,MAEA,UAAA8D,eAA+BgJ,EAAA9M,wBAE/B,OAAA6N,EAAAf,EAAA9M,MAAA8M,EAAAc,IAIAuB,CAAAD,EAAAtB,IACA,OAAArB,EAAAN,KAAAgD,GAEA,OAAAvB,EAAApB,GC9QA,SAAA8C,GAAAC,OAAgCA,EAAAC,eAChC,UAAAC,KAAAD,EAAA,CACA,MAAAlS,KAAWA,GAAOmS,EAClBjP,eAAiClD,eAAkBiS,EAAA3R,IAAAN,GAAA4C,+BACzC+B,EAAKwN,EAAApP,OAAAoP,EAAAhQ,OAAAnC,KAAAmS,EAAAjP,IAIf,SAAAkP,EAAA5D,GACA,MAAA6D,EAAA,IAAA7D,EAAAyD,OAAAzJ,UAAA2B,OAAAnC,GAAA,cAAAA,EAAApF,MACA0P,EAkCA,WACA,MAAA3O,EAAA,IAAA4O,IACA/L,EAAAgI,EAAAgE,IAAArI,OAAAnC,GAAA,aAAAA,EAAApF,MACA,UAAA6P,KAAAjM,EAAA,CACA,MAAAkM,EAAA/O,EAAArD,IAAAmS,EAAA7J,QACAC,EAAA2F,EAAAyD,OAAA3R,IAAAmS,EAAAjM,UACAqC,IAGA6J,EACAA,EAAAjQ,KAAAoG,GAEAlF,EAAAgP,IAAAF,EAAA7J,OAAA,CAAAC,KAGA,OAAAlF,EAjDAiP,GAEA,UAAAnT,KAAA4S,QACAQ,EAAApT,GAGA,SAAAoT,EAAApT,GACA,MAAAqT,EAAA,IAAAC,IAAAC,EAAAvT,GAAAkE,IAAAsP,KAAAjT,OACAkT,EAAA1E,EAAA0E,SAAA5S,IAAAb,EAAAO,OAAA,GACAmT,EAAAb,EAAAhS,IAAAb,EAAAO,OAAA,GACA,UAAAoT,IAAA,IAAAF,KAAAC,GAAA,CACA,MAAAE,EAAAL,EAAAI,SACAE,EAAAD,EAAAP,EAAAM,EAAA3T,GACA,UAAA8T,KAAAF,EACAP,EAAAU,IAAAD,EAAAvT,OAKA,SAAAsT,EAAAD,EAAAI,EAAAL,EAAA/K,GACA,UAAAkL,KAAAF,EAAA,CACA,MAAArT,KAAaA,GAAOuT,EACpB,GAAAvT,GAAAyT,EAAAC,IAAA1T,GAAA,CACA,MAAAkD,oBAA0ClD,uDAA0DqI,EAAArI,6CACtF2E,EAAKyO,EAAArQ,OAAAwQ,EAAA7G,KAAAvK,OAAAnC,KAAAoT,EAAAlQ,KAKnB,SAAA8P,EAAAvT,GACA,OAAAA,EAAA8N,QACApD,OAAA,EAAgBvH,UAAK,cAAAA,IAsBd,SAAA+Q,EAAAzE,GACP,MAAAV,EA1FA,SAAAgE,GACA,MAAAP,EAAA,IAAAM,IACAL,EAAA,IAAAa,IACAG,EAAA,IAAAX,IACA,UAAAvK,KAAAwK,EACA,GAAAxK,EAAAvD,QAAA,CACA,MAAAiO,EAAAQ,EAAA5S,IAAA0H,EAAAhI,MACA0S,EACAA,EAAAjQ,KAAAuF,GAEAkL,EAAAP,IAAA3K,EAAAhI,KAAA,CAAAgI,SAIAA,EAAAhI,OAGAiS,EAAAyB,IAAA1L,EAAAhI,MAGAkS,EAAAsB,IAAAxL,GAFAiK,EAAAU,IAAA3K,EAAAhI,KAAAgI,IAKA,OAAUwK,MAAAP,SAAAiB,WAAAhB,cAmEV0B,CAAA1E,GACA,UACA8C,EAAAxD,MACA4D,EAAA5D,ICjGAjP,EAAAQ,EAAA8T,EAAA,0BAAApL,IAAAlJ,EAAAQ,EAAA8T,EAAA,0BAAA5E,IAAA1P,EAAAQ,EAAA8T,EAAA,6BAAAF","file":"webidl2.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"WebIDL2\"] = factory();\n\telse\n\t\troot[\"WebIDL2\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/**\r\n * @param {string} identifier \r\n */\r\nexport function unescape(identifier) {\r\n return identifier.startsWith('_') ? identifier.slice(1) : identifier;\r\n}\r\n\r\n/**\r\n * Parses comma-separated list\r\n * @param {import(\"../tokeniser\").Tokeniser} tokeniser\r\n * @param {object} args\r\n * @param {Function} args.parser parser function for each item\r\n * @param {boolean} [args.allowDangler] whether to allow dangling comma\r\n * @param {string} [args.listName] the name to be shown on error messages\r\n */\r\nexport function list(tokeniser, { parser, allowDangler, listName = \"list\" }) {\r\n const first = parser(tokeniser);\r\n if (!first) {\r\n return [];\r\n }\r\n first.tokens.separator = tokeniser.consume(\",\");\r\n const items = [first];\r\n while (first.tokens.separator) {\r\n const item = parser(tokeniser);\r\n if (!item) {\r\n if (!allowDangler) {\r\n error(`Trailing comma in ${listName}`);\r\n }\r\n break;\r\n }\r\n item.tokens.separator = tokeniser.consume(\",\");\r\n items.push(item);\r\n if (!item.tokens.separator) break;\r\n }\r\n return items;\r\n}\r\n\r\n/**\r\n * @param {import(\"../tokeniser\").Tokeniser} tokeniser\r\n */\r\nexport function const_value(tokeniser) {\r\n return tokeniser.consume(\"true\", \"false\", \"Infinity\", \"-Infinity\", \"NaN\", \"decimal\", \"integer\");\r\n}\r\n\r\n/**\r\n * @param {object} token\r\n * @param {string} token.type\r\n * @param {string} token.value\r\n */\r\nexport function const_data({ type, value }) {\r\n switch (type) {\r\n case \"true\":\r\n case \"false\":\r\n return { type: \"boolean\", value: type === \"true\" };\r\n case \"Infinity\":\r\n case \"-Infinity\":\r\n return { type: \"Infinity\", negative: type.startsWith(\"-\") };\r\n case \"[\":\r\n return { type: \"sequence\", value: [] };\r\n case \"decimal\":\r\n case \"integer\":\r\n return { type: \"number\", value };\r\n case \"string\":\r\n return { type: \"string\", value: value.slice(1, -1) };\r\n default:\r\n return { type };\r\n }\r\n}\r\n","/**\r\n * @param {string} text\r\n */\r\nfunction lastLine(text) {\r\n const splitted = text.split(\"\\n\");\r\n return splitted[splitted.length - 1];\r\n}\r\n\r\n/**\r\n * @param {string} message error message\r\n * @param {\"Syntax\" | \"Validation\"} type error type\r\n */\r\nfunction error(source, position, current, message, type) {\r\n /**\r\n * @param {number} count\r\n */\r\n function sliceTokens(count) {\r\n return count > 0 ?\r\n source.slice(position, position + count) :\r\n source.slice(Math.max(position + count, 0), position);\r\n }\r\n\r\n function tokensToText(inputs, { precedes } = {}) {\r\n const text = inputs.map(t => t.trivia + t.value).join(\"\");\r\n const nextToken = source[position];\r\n if (nextToken.type === \"eof\") {\r\n return text;\r\n }\r\n if (precedes) {\r\n return text + nextToken.trivia;\r\n }\r\n return text.slice(nextToken.trivia.length);\r\n }\r\n\r\n const maxTokens = 5; // arbitrary but works well enough\r\n const line =\r\n source[position].type !== \"eof\" ? source[position].line :\r\n source.length > 1 ? source[position - 1].line :\r\n 1;\r\n\r\n const precedingLine = lastLine(\r\n tokensToText(sliceTokens(-maxTokens), { precedes: true })\r\n );\r\n\r\n const subsequentTokens = sliceTokens(maxTokens);\r\n const subsequentText = tokensToText(subsequentTokens);\r\n const sobsequentLine = subsequentText.split(\"\\n\")[0];\r\n\r\n const spaced = \" \".repeat(precedingLine.length) + \"^ \" + message;\r\n const contextualMessage = precedingLine + sobsequentLine + \"\\n\" + spaced;\r\n\r\n const contextType = type === \"Syntax\" ? \"since\" : \"inside\";\r\n const grammaticalContext = current ? `, ${contextType} \\`${current.partial ? \"partial \" : \"\"}${current.type} ${current.name}\\`` : \"\";\r\n return {\r\n message: `${type} error at line ${line}${grammaticalContext}:\\n${contextualMessage}`,\r\n line,\r\n input: subsequentText,\r\n tokens: subsequentTokens\r\n };\r\n}\r\n\r\n/**\r\n * @param {string} message error message\r\n */\r\nexport function syntaxError(source, position, current, message) {\r\n return error(source, position, current, message, \"Syntax\");\r\n}\r\n\r\n/**\r\n * @param {string} message error message\r\n */\r\nexport function validationError(source, token, current, message) {\r\n return error(source, token.index, current, message, \"Validation\").message;\r\n}\r\n","import { syntaxError } from \"./error.js\";\r\n\r\n// These regular expressions use the sticky flag so they will only match at\r\n// the current location (ie. the offset of lastIndex).\r\nconst tokenRe = {\r\n // This expression uses a lookahead assertion to catch false matches\r\n // against integers early.\r\n \"decimal\": /-?(?=[0-9]*\\.|[0-9]+[eE])(([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y,\r\n \"integer\": /-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y,\r\n \"identifier\": /[_-]?[A-Za-z][0-9A-Z_a-z-]*/y,\r\n \"string\": /\"[^\"]*\"/y,\r\n \"whitespace\": /[\\t\\n\\r ]+/y,\r\n \"comment\": /((\\/(\\/.*|\\*([^*]|\\*[^/])*\\*\\/)[\\t\\n\\r ]*)+)/y,\r\n \"other\": /[^\\t\\n\\r 0-9A-Za-z]/y\r\n};\r\n\r\nexport const stringTypes = [\r\n \"ByteString\",\r\n \"DOMString\",\r\n \"USVString\"\r\n];\r\n\r\nexport const argumentNameKeywords = [\r\n \"attribute\",\r\n \"callback\",\r\n \"const\",\r\n \"deleter\",\r\n \"dictionary\",\r\n \"enum\",\r\n \"getter\",\r\n \"includes\",\r\n \"inherit\",\r\n \"interface\",\r\n \"iterable\",\r\n \"maplike\",\r\n \"namespace\",\r\n \"partial\",\r\n \"required\",\r\n \"setlike\",\r\n \"setter\",\r\n \"static\",\r\n \"stringifier\",\r\n \"typedef\",\r\n \"unrestricted\"\r\n];\r\n\r\nconst nonRegexTerminals = [\r\n \"-Infinity\",\r\n \"FrozenArray\",\r\n \"Infinity\",\r\n \"NaN\",\r\n \"Promise\",\r\n \"boolean\",\r\n \"byte\",\r\n \"double\",\r\n \"false\",\r\n \"float\",\r\n \"implements\",\r\n \"legacyiterable\",\r\n \"long\",\r\n \"mixin\",\r\n \"null\",\r\n \"octet\",\r\n \"optional\",\r\n \"or\",\r\n \"readonly\",\r\n \"record\",\r\n \"sequence\",\r\n \"short\",\r\n \"true\",\r\n \"unsigned\",\r\n \"void\"\r\n].concat(argumentNameKeywords, stringTypes);\r\n\r\nconst punctuations = [\r\n \"(\",\r\n \")\",\r\n \",\",\r\n \"...\",\r\n \":\",\r\n \";\",\r\n \"<\",\r\n \"=\",\r\n \">\",\r\n \"?\",\r\n \"[\",\r\n \"]\",\r\n \"{\",\r\n \"}\"\r\n];\r\n\r\n/**\r\n * @param {string} str\r\n */\r\nfunction tokenise(str) {\r\n const tokens = [];\r\n let lastCharIndex = 0;\r\n let trivia = \"\";\r\n let line = 1;\r\n let index = 0;\r\n while (lastCharIndex < str.length) {\r\n const nextChar = str.charAt(lastCharIndex);\r\n let result = -1;\r\n\r\n if (/[\\t\\n\\r ]/.test(nextChar)) {\r\n result = attemptTokenMatch(\"whitespace\", { noFlushTrivia: true });\r\n } else if (nextChar === '/') {\r\n result = attemptTokenMatch(\"comment\", { noFlushTrivia: true });\r\n }\r\n\r\n if (result !== -1) {\r\n const currentTrivia = tokens.pop().value;\r\n line += (currentTrivia.match(/\\n/g) || []).length;\r\n trivia += currentTrivia;\r\n index -= 1;\r\n } else if (/[-0-9.A-Z_a-z]/.test(nextChar)) {\r\n result = attemptTokenMatch(\"decimal\");\r\n if (result === -1) {\r\n result = attemptTokenMatch(\"integer\");\r\n }\r\n if (result === -1) {\r\n result = attemptTokenMatch(\"identifier\");\r\n const token = tokens[tokens.length - 1];\r\n if (result !== -1 && nonRegexTerminals.includes(token.value)) {\r\n token.type = token.value;\r\n }\r\n }\r\n } else if (nextChar === '\"') {\r\n result = attemptTokenMatch(\"string\");\r\n }\r\n\r\n for (const punctuation of punctuations) {\r\n if (str.startsWith(punctuation, lastCharIndex)) {\r\n tokens.push({ type: punctuation, value: punctuation, trivia, line, index });\r\n trivia = \"\";\r\n lastCharIndex += punctuation.length;\r\n result = lastCharIndex;\r\n break;\r\n }\r\n }\r\n\r\n // other as the last try\r\n if (result === -1) {\r\n result = attemptTokenMatch(\"other\");\r\n }\r\n if (result === -1) {\r\n throw new Error(\"Token stream not progressing\");\r\n }\r\n lastCharIndex = result;\r\n index += 1;\r\n }\r\n\r\n // remaining trivia as eof\r\n tokens.push({\r\n type: \"eof\",\r\n value: \"\",\r\n trivia\r\n });\r\n\r\n return tokens;\r\n\r\n /**\r\n * @param {keyof tokenRe} type\r\n * @param {object} [options]\r\n * @param {boolean} [options.noFlushTrivia]\r\n */\r\n function attemptTokenMatch(type, { noFlushTrivia } = {}) {\r\n const re = tokenRe[type];\r\n re.lastIndex = lastCharIndex;\r\n const result = re.exec(str);\r\n if (result) {\r\n tokens.push({ type, value: result[0], trivia, line, index });\r\n if (!noFlushTrivia) {\r\n trivia = \"\";\r\n }\r\n return re.lastIndex;\r\n }\r\n return -1;\r\n }\r\n}\r\n\r\nexport class Tokeniser {\r\n /**\r\n * @param {string} idl\r\n */\r\n constructor(idl) {\r\n this.source = tokenise(idl);\r\n this.position = 0;\r\n }\r\n\r\n /**\r\n * @param {string} message\r\n */\r\n error(message) {\r\n throw new WebIDLParseError(syntaxError(this.source, this.position, this.current, message));\r\n }\r\n\r\n /**\r\n * @param {string} type\r\n */\r\n probe(type) {\r\n return this.source.length > this.position && this.source[this.position].type === type;\r\n }\r\n\r\n /**\r\n * @param {...string} candidates\r\n */\r\n consume(...candidates) {\r\n for (const type of candidates) {\r\n if (!this.probe(type)) continue;\r\n const token = this.source[this.position];\r\n this.position++;\r\n return token;\r\n }\r\n }\r\n\r\n /**\r\n * @param {number} position\r\n */\r\n unconsume(position) {\r\n this.position = position;\r\n }\r\n}\r\n\r\nclass WebIDLParseError extends Error {\r\n constructor({ message, line, input, tokens }) {\r\n super(message);\r\n this.name = \"WebIDLParseError\"; // not to be mangled\r\n this.line = line;\r\n this.input = input;\r\n this.tokens = tokens;\r\n }\r\n}\r\n","export class Base {\r\n constructor({ source, tokens }) {\r\n Object.defineProperties(this, {\r\n source: { value: source },\r\n tokens: { value: tokens }\r\n });\r\n }\r\n\r\n toJSON() {\r\n const json = { type: undefined, name: undefined };\r\n let proto = this;\r\n while (proto !== Object.prototype) {\r\n const descMap = Object.getOwnPropertyDescriptors(proto);\r\n for (const [key, value] of Object.entries(descMap)) {\r\n if (value.enumerable || value.get) {\r\n json[key] = this[key];\r\n }\r\n }\r\n proto = Object.getPrototypeOf(proto);\r\n }\r\n return json;\r\n }\r\n}\r\n","import { Base } from \"./base.js\";\r\n\r\nexport class Token extends Base {\r\n /**\r\n * @param {import(\"../tokeniser\").Tokeniser} tokeniser\r\n * @param {string} type\r\n */\r\n static parser(tokeniser, type) {\r\n return () => {\r\n const value = tokeniser.consume(type);\r\n if (value) {\r\n return new Token({ source: tokeniser.source, tokens: { value } });\r\n }\r\n };\r\n }\r\n\r\n get value() {\r\n return this.tokens.value.value;\r\n }\r\n}\r\n","import { Base } from \"./base.js\";\r\nimport { const_data, const_value } from \"./helpers.js\";\r\n\r\nexport class Default extends Base {\r\n /**\r\n * @param {import(\"../tokeniser\").Tokeniser} tokeniser\r\n */\r\n static parse(tokeniser) {\r\n const assign = tokeniser.consume(\"=\");\r\n if (!assign) {\r\n return null;\r\n }\r\n const def = const_value(tokeniser) || tokeniser.consume(\"string\", \"null\", \"[\") || tokeniser.error(\"No value for default\");\r\n const expression = [def];\r\n if (def.type === \"[\") {\r\n const close = tokeniser.consume(\"]\") || error(\"Default sequence value must be empty\");\r\n expression.push(close);\r\n }\r\n return new Default({ source: tokeniser.source, tokens: { assign }, expression });\r\n }\r\n\r\n constructor({ source, tokens, expression }) {\r\n super({ source, tokens });\r\n Object.defineProperty(this, \"expression\", { value: expression });\r\n }\r\n\r\n get type() {\r\n return const_data(this.expression[0]).type;\r\n }\r\n get value() {\r\n return const_data(this.expression[0]).value;\r\n }\r\n get negative() {\r\n return const_data(this.expression[0]).negative;\r\n }\r\n}\r\n","import { list, unescape } from \"./helpers.js\";\r\nimport { Token } from \"./token.js\";\r\nimport { Base } from \"./base.js\";\r\n\r\nclass EnumValue extends Token {\r\n /**\r\n * @param {import(\"../tokeniser\").Tokeniser} tokeniser\r\n */\r\n static parse(tokeniser) {\r\n const value = tokeniser.consume(\"string\");\r\n if (value) {\r\n return new EnumValue({ source: tokeniser.source, tokens: { value } });\r\n }\r\n }\r\n\r\n get type() {\r\n return \"enum-value\";\r\n }\r\n get value() {\r\n return super.value.slice(1, -1);\r\n }\r\n}\r\n\r\nexport class Enum extends Base {\r\n /**\r\n * @param {import(\"../tokeniser\").Tokeniser} tokeniser\r\n */\r\n static parse(tokeniser) {\r\n const tokens = {};\r\n tokens.base = tokeniser.consume(\"enum\");\r\n if (!tokens.base) {\r\n return;\r\n }\r\n tokens.name = tokeniser.consume(\"identifier\") || tokeniser.error(\"No name for enum\");\r\n const ret = tokeniser.current = new Enum({ source: tokeniser.source, tokens });\r\n tokens.open = tokeniser.consume(\"{\") || tokeniser.error(\"Bodyless enum\");\r\n ret.values = list(tokeniser, {\r\n parser: EnumValue.parse,\r\n allowDangler: true,\r\n listName: \"enumeration\"\r\n });\r\n if (tokeniser.probe(\"string\")) {\r\n tokeniser.error(\"No comma between enum values\");\r\n }\r\n tokens.close = tokeniser.consume(\"}\") || tokeniser.error(\"Unexpected value in enum\");\r\n if (!ret.values.length) {\r\n tokeniser.error(\"No value in enum\");\r\n }\r\n tokens.termination = tokeniser.consume(\";\") || tokeniser.error(\"No semicolon after enum\");\r\n return ret;\r\n }\r\n\r\n get type() {\r\n return \"enum\";\r\n }\r\n get name() {\r\n return unescape(this.tokens.name.value);\r\n }\r\n}\r\n","import { Base } from \"./base.js\";\r\nimport { unescape } from \"./helpers.js\";\r\n\r\nexport class Includes extends Base {\r\n /**\r\n * @param {import(\"../tokeniser\").Tokeniser} tokeniser\r\n */\r\n static parse(tokeniser) {\r\n const target = tokeniser.consume(\"identifier\");\r\n if (!target) {\r\n return;\r\n }\r\n const tokens = { target };\r\n tokens.includes = tokeniser.consume(\"includes\");\r\n if (!tokens.includes) {\r\n tokeniser.unconsume(target.index);\r\n return;\r\n }\r\n tokens.mixin = tokeniser.consume(\"identifier\") || tokeniser.error(\"Incomplete includes statement\");\r\n tokens.termination = tokeniser.consume(\";\") || tokeniser.error(\"No terminating ; for includes statement\");\r\n return new Includes({ source: tokeniser.source, tokens });\r\n }\r\n\r\n get type() {\r\n return \"includes\";\r\n }\r\n get target() {\r\n return unescape(this.tokens.target.value);\r\n }\r\n get includes() {\r\n return unescape(this.tokens.mixin.value);\r\n }\r\n}\r\n","\"use strict\";\r\n\r\nimport { const_data, const_value, list, unescape } from \"./productions/helpers.js\";\r\nimport { argumentNameKeywords, stringTypes, Tokeniser } from \"./tokeniser.js\";\r\nimport { Base } from \"./productions/base.js\";\r\nimport { Token } from \"./productions/token.js\";\r\nimport { Default } from \"./productions/default.js\";\r\nimport { Enum } from \"./productions/enum.js\";\r\nimport { Includes } from \"./productions/includes.js\";\r\n\r\n/**\r\n * @param {Tokeniser} tokeniser\r\n */\r\nfunction parseByTokens(tokeniser) {\r\n const source = tokeniser.source;\r\n\r\n const DECIMAL = \"decimal\";\r\n const INT = \"integer\";\r\n const ID = \"identifier\";\r\n const STR = \"string\";\r\n\r\n function error(str) {\r\n tokeniser.error(str);\r\n }\r\n\r\n function probe(type) {\r\n return tokeniser.probe(type);\r\n }\r\n\r\n function consume(...candidates) {\r\n return tokeniser.consume(...candidates);\r\n }\r\n\r\n function unconsume(position) {\r\n return tokeniser.unconsume(position);\r\n }\r\n\r\n function integer_type() {\r\n const prefix = consume(\"unsigned\");\r\n const base = consume(\"short\", \"long\");\r\n if (base) {\r\n const postfix = consume(\"long\");\r\n return new Type({ source, tokens: { prefix, base, postfix } });\r\n }\r\n if (prefix) error(\"Failed to parse integer type\");\r\n }\r\n\r\n function float_type() {\r\n const prefix = consume(\"unrestricted\");\r\n const base = consume(\"float\", \"double\");\r\n if (base) {\r\n return new Type({ source, tokens: { prefix, base } });\r\n }\r\n if (prefix) error(\"Failed to parse float type\");\r\n }\r\n\r\n function primitive_type() {\r\n const num_type = integer_type() || float_type();\r\n if (num_type) return num_type;\r\n const base = consume(\"boolean\", \"byte\", \"octet\");\r\n if (base) {\r\n return new Type({ source, tokens: { base } });\r\n }\r\n }\r\n\r\n function type_suffix(obj) {\r\n const nullable = consume(\"?\");\r\n if (nullable) {\r\n obj.tokens.nullable = nullable;\r\n }\r\n if (probe(\"?\")) error(\"Can't nullable more than once\");\r\n }\r\n\r\n class Type extends Base {\r\n constructor({ source, tokens }) {\r\n super({ source, tokens });\r\n Object.defineProperty(this, \"subtype\", { value: [] });\r\n this.extAttrs = null;\r\n }\r\n\r\n get generic() {\r\n return \"\";\r\n }\r\n get nullable() {\r\n return !!this.tokens.nullable;\r\n }\r\n get union() {\r\n return false;\r\n }\r\n get idlType() {\r\n if (this.subtype.length) {\r\n return this.subtype;\r\n }\r\n // Adding prefixes/postfixes for \"unrestricted float\", etc.\r\n const name = [\r\n this.tokens.prefix,\r\n this.tokens.base,\r\n this.tokens.postfix\r\n ].filter(t => t).map(t => t.value).join(\" \");\r\n return unescape(name);\r\n }\r\n }\r\n\r\n class GenericType extends Type {\r\n static parse(typeName) {\r\n const base = consume(\"FrozenArray\", \"Promise\", \"sequence\", \"record\");\r\n if (!base) {\r\n return;\r\n }\r\n const ret = new GenericType({ source, tokens: { base } });\r\n ret.tokens.open = consume(\"<\") || error(`No opening bracket after ${base.type}`);\r\n switch (base.type) {\r\n case \"Promise\": {\r\n if (probe(\"[\")) error(\"Promise type cannot have extended attribute\");\r\n const subtype = return_type(typeName) || error(\"Missing Promise subtype\");\r\n ret.subtype.push(subtype);\r\n break;\r\n }\r\n case \"sequence\":\r\n case \"FrozenArray\": {\r\n const subtype = type_with_extended_attributes(typeName) || error(`Missing ${base.type} subtype`);\r\n ret.subtype.push(subtype);\r\n break;\r\n }\r\n case \"record\": {\r\n if (probe(\"[\")) error(\"Record key cannot have extended attribute\");\r\n const keyType = consume(...stringTypes) || error(`Record key must be one of: ${stringTypes.join(\", \")}`);\r\n const keyIdlType = new Type({ source, tokens: { base: keyType }});\r\n keyIdlType.tokens.separator = consume(\",\") || error(\"Missing comma after record key type\");\r\n keyIdlType.type = typeName;\r\n const valueType = type_with_extended_attributes(typeName) || error(\"Error parsing generic type record\");\r\n ret.subtype.push(keyIdlType, valueType);\r\n break;\r\n }\r\n }\r\n if (!ret.idlType) error(`Error parsing generic type ${base.type}`);\r\n ret.tokens.close = consume(\">\") || error(`Missing closing bracket after ${base.type}`);\r\n return ret;\r\n }\r\n\r\n get generic() {\r\n return this.tokens.base.value;\r\n }\r\n }\r\n\r\n function single_type(typeName) {\r\n let ret = GenericType.parse(typeName) || primitive_type();\r\n if (!ret) {\r\n const base = consume(ID, ...stringTypes);\r\n if (!base) {\r\n return;\r\n }\r\n ret = new Type({ source, tokens: { base } });\r\n if (probe(\"<\")) error(`Unsupported generic type ${base.value}`);\r\n }\r\n if (ret.generic === \"Promise\" && probe(\"?\")) {\r\n error(\"Promise type cannot be nullable\");\r\n }\r\n ret.type = typeName || null;\r\n type_suffix(ret);\r\n if (ret.nullable && ret.idlType === \"any\") error(\"Type `any` cannot be made nullable\");\r\n return ret;\r\n }\r\n\r\n class UnionType extends Type {\r\n static parse(type) {\r\n const tokens = {};\r\n tokens.open = consume(\"(\");\r\n if (!tokens.open) return;\r\n const ret = new UnionType({ source, tokens });\r\n ret.type = type || null;\r\n while (true) {\r\n const typ = type_with_extended_attributes() || error(\"No type after open parenthesis or 'or' in union type\");\r\n if (typ.idlType === \"any\") error(\"Type `any` cannot be included in a union type\");\r\n ret.subtype.push(typ);\r\n const or = consume(\"or\");\r\n if (or) {\r\n typ.tokens.separator = or;\r\n }\r\n else break;\r\n }\r\n if (ret.idlType.length < 2) {\r\n error(\"At least two types are expected in a union type but found less\");\r\n }\r\n tokens.close = consume(\")\") || error(\"Unterminated union type\");\r\n type_suffix(ret);\r\n return ret;\r\n }\r\n\r\n get union() {\r\n return true;\r\n }\r\n }\r\n\r\n function type(typeName) {\r\n return single_type(typeName) || UnionType.parse(typeName);\r\n }\r\n\r\n function type_with_extended_attributes(typeName) {\r\n const extAttrs = ExtendedAttributes.parse();\r\n const ret = type(typeName);\r\n if (ret) ret.extAttrs = extAttrs;\r\n return ret;\r\n }\r\n\r\n class Argument extends Base {\r\n static parse() {\r\n const start_position = tokeniser.position;\r\n const tokens = {};\r\n const ret = new Argument({ source, tokens });\r\n tokens.optional = consume(\"optional\");\r\n ret.idlType = type_with_extended_attributes(\"argument-type\");\r\n if (!ret.idlType) {\r\n return unconsume(start_position);\r\n }\r\n if (!tokens.optional) {\r\n tokens.variadic = consume(\"...\");\r\n }\r\n tokens.name = consume(ID, ...argumentNameKeywords);\r\n if (!tokens.name) {\r\n return unconsume(start_position);\r\n }\r\n ret.default = tokens.optional ? Default.parse(tokeniser) : null;\r\n return ret;\r\n }\r\n\r\n get optional() {\r\n return !!this.tokens.optional;\r\n }\r\n get variadic() {\r\n return !!this.tokens.variadic;\r\n }\r\n get name() {\r\n return unescape(this.tokens.name.value);\r\n }\r\n }\r\n\r\n function argument_list() {\r\n return list(tokeniser, { parser: Argument.parse, listName: \"arguments list\" });\r\n }\r\n\r\n function identifiers() {\r\n const ids = list(tokeniser, { parser: Token.parser(tokeniser, ID), listName: \"identifier list\" });\r\n if (!ids.length) {\r\n error(\"Expected identifiers but none found\");\r\n }\r\n return ids;\r\n }\r\n\r\n class ExtendedAttributeParameters extends Base {\r\n static parse() {\r\n const tokens = { assign: consume(\"=\") };\r\n const ret = new ExtendedAttributeParameters({ source, tokens });\r\n if (tokens.assign) {\r\n tokens.secondaryName = consume(ID, DECIMAL, INT, STR);\r\n }\r\n tokens.open = consume(\"(\");\r\n if (tokens.open) {\r\n ret.list = ret.rhsType === \"identifier-list\" ?\r\n // [Exposed=(Window,Worker)]\r\n identifiers() :\r\n // [NamedConstructor=Audio(DOMString src)] or [Constructor(DOMString str)]\r\n argument_list();\r\n tokens.close = consume(\")\") || error(\"Unexpected token in extended attribute argument list\");\r\n } else if (ret.hasRhs && !tokens.secondaryName) {\r\n error(\"No right hand side to extended attribute assignment\");\r\n }\r\n return ret;\r\n }\r\n\r\n get rhsType() {\r\n return !this.tokens.assign ? null :\r\n !this.tokens.secondaryName ? \"identifier-list\" :\r\n this.tokens.secondaryName.type;\r\n }\r\n }\r\n\r\n class SimpleExtendedAttribute extends Base {\r\n static parse() {\r\n const name = consume(ID);\r\n if (name) {\r\n return new SimpleExtendedAttribute({\r\n tokens: { name },\r\n params: ExtendedAttributeParameters.parse()\r\n });\r\n }\r\n }\r\n\r\n constructor({ source, tokens, params }) {\r\n super({ source, tokens });\r\n Object.defineProperty(this, \"params\", { value: params });\r\n }\r\n\r\n get type() {\r\n return \"extended-attribute\";\r\n }\r\n get name() {\r\n return this.tokens.name.value;\r\n }\r\n get rhs() {\r\n const { rhsType: type, tokens, list } = this.params;\r\n if (!type) {\r\n return null;\r\n }\r\n const value = type === \"identifier-list\" ? list : tokens.secondaryName.value;\r\n return { type, value };\r\n }\r\n get arguments() {\r\n const { rhsType, list } = this.params;\r\n if (!list || rhsType === \"identifier-list\") {\r\n return [];\r\n }\r\n return list;\r\n }\r\n }\r\n\r\n // Note: we parse something simpler than the official syntax. It's all that ever\r\n // seems to be used\r\n class ExtendedAttributes extends Base {\r\n static parse() {\r\n const tokens = {};\r\n tokens.open = consume(\"[\");\r\n if (!tokens.open) return null;\r\n const ret = new ExtendedAttributes({ source, tokens });\r\n ret.items = list(tokeniser, {\r\n parser: SimpleExtendedAttribute.parse,\r\n listName: \"extended attribute\"\r\n });\r\n tokens.close = consume(\"]\") || error(\"Unexpected form of extended attribute\");\r\n if (!ret.items.length) {\r\n error(\"Found an empty extended attribute\");\r\n }\r\n return ret;\r\n }\r\n }\r\n\r\n class Constant extends Base {\r\n static parse() {\r\n const tokens = {};\r\n tokens.base = consume(\"const\");\r\n if (!tokens.base) {\r\n return;\r\n }\r\n let idlType = primitive_type();\r\n if (!idlType) {\r\n const base = consume(ID) || error(\"No type for const\");\r\n idlType = new Type({ source, tokens: { base } });\r\n }\r\n if (probe(\"?\")) {\r\n error(\"Unexpected nullable constant type\");\r\n }\r\n idlType.type = \"const-type\";\r\n tokens.name = consume(ID) || error(\"No name for const\");\r\n tokens.assign = consume(\"=\") || error(\"No value assignment for const\");\r\n tokens.value = const_value(tokeniser) || error(\"No value for const\");\r\n tokens.termination = consume(\";\") || error(\"Unterminated const\");\r\n const ret = new Constant({ source, tokens });\r\n ret.idlType = idlType;\r\n return ret;\r\n }\r\n\r\n get type() {\r\n return \"const\";\r\n }\r\n get name() {\r\n return unescape(this.tokens.name.value);\r\n }\r\n get value() {\r\n return const_data(this.tokens.value);\r\n }\r\n }\r\n\r\n class CallbackFunction extends Base {\r\n static parse(base) {\r\n const tokens = { base };\r\n const ret = new CallbackFunction({ source, tokens });\r\n tokens.name = consume(ID) || error(\"No name for callback\");\r\n tokeniser.current = ret;\r\n tokens.assign = consume(\"=\") || error(\"No assignment in callback\");\r\n ret.idlType = return_type() || error(\"Missing return type\");\r\n tokens.open = consume(\"(\") || error(\"No arguments in callback\");\r\n ret.arguments = argument_list();\r\n tokens.close = consume(\")\") || error(\"Unterminated callback\");\r\n tokens.termination = consume(\";\") || error(\"Unterminated callback\");\r\n return ret;\r\n }\r\n\r\n get type() {\r\n return \"callback\";\r\n }\r\n get name() {\r\n return unescape(this.tokens.name.value);\r\n }\r\n }\r\n\r\n function callback() {\r\n const callback = consume(\"callback\");\r\n if (!callback) return;\r\n const tok = consume(\"interface\");\r\n if (tok) {\r\n return Interface.parse(tok, { callback });\r\n }\r\n return CallbackFunction.parse(callback);\r\n }\r\n\r\n class Attribute extends Base {\r\n static parse({ special, noInherit = false, readonly = false } = {}) {\r\n const start_position = tokeniser.position;\r\n const tokens = { special };\r\n const ret = new Attribute({ source, tokens });\r\n if (!special && !noInherit) {\r\n tokens.special = consume(\"inherit\");\r\n }\r\n tokens.readonly = consume(\"readonly\");\r\n if (readonly && !tokens.readonly && probe(\"attribute\")) {\r\n error(\"Attributes must be readonly in this context\");\r\n }\r\n tokens.base = consume(\"attribute\");\r\n if (!tokens.base) {\r\n unconsume(start_position);\r\n return;\r\n }\r\n ret.idlType = type_with_extended_attributes(\"attribute-type\") || error(\"No type in attribute\");\r\n switch (ret.idlType.generic) {\r\n case \"sequence\":\r\n case \"record\": error(`Attributes cannot accept ${ret.idlType.generic} types`);\r\n }\r\n tokens.name = consume(ID, \"required\") || error(\"No name in attribute\");\r\n tokens.termination = consume(\";\") || error(\"Unterminated attribute\");\r\n return ret;\r\n }\r\n\r\n get type() {\r\n return \"attribute\";\r\n }\r\n get special() {\r\n if (!this.tokens.special) {\r\n return \"\";\r\n }\r\n return this.tokens.special.value;\r\n }\r\n get readonly() {\r\n return !!this.tokens.readonly;\r\n }\r\n get name() {\r\n return unescape(this.tokens.name.value);\r\n }\r\n }\r\n\r\n function return_type(typeName) {\r\n const typ = type(typeName || \"return-type\");\r\n if (typ) {\r\n return typ;\r\n }\r\n const voidToken = consume(\"void\");\r\n if (voidToken) {\r\n const ret = new Type({ source, tokens: { base: voidToken } });\r\n ret.type = \"return-type\";\r\n return ret;\r\n }\r\n }\r\n\r\n class OperationBody extends Base {\r\n static parse() {\r\n const tokens = {};\r\n const ret = new OperationBody({ source, tokens });\r\n ret.idlType = return_type() || error(\"Missing return type\");\r\n tokens.name = consume(ID);\r\n tokens.open = consume(\"(\") || error(\"Invalid operation\");\r\n ret.arguments = argument_list();\r\n tokens.close = consume(\")\") || error(\"Unterminated operation\");\r\n return ret;\r\n }\r\n\r\n get name() {\r\n const { name } = this.tokens;\r\n if (!name) {\r\n return \"\";\r\n }\r\n return unescape(name.value);\r\n }\r\n }\r\n\r\n class Operation extends Base {\r\n static parse({ special, regular } = {}) {\r\n const tokens = { special };\r\n const ret = new Operation({ source, tokens });\r\n if (special && special.value === \"stringifier\") {\r\n tokens.termination = consume(\";\");\r\n if (tokens.termination) {\r\n ret.body = null;\r\n return ret;\r\n }\r\n }\r\n if (!special && !regular) {\r\n tokens.special = consume(\"getter\", \"setter\", \"deleter\");\r\n }\r\n ret.body = OperationBody.parse();\r\n tokens.termination = consume(\";\") || error(\"Unterminated attribute\");\r\n return ret;\r\n }\r\n\r\n get type() {\r\n return \"operation\";\r\n }\r\n get name() {\r\n return (this.body && this.body.name) || \"\";\r\n }\r\n get special() {\r\n if (!this.tokens.special) {\r\n return \"\";\r\n }\r\n return this.tokens.special.value;\r\n }\r\n }\r\n\r\n function static_member() {\r\n const special = consume(\"static\");\r\n if (!special) return;\r\n const member = Attribute.parse({ special }) ||\r\n Operation.parse({ special }) ||\r\n error(\"No body in static member\");\r\n return member;\r\n }\r\n\r\n function stringifier() {\r\n const special = consume(\"stringifier\");\r\n if (!special) return;\r\n const member = Attribute.parse({ special }) ||\r\n Operation.parse({ special }) ||\r\n error(\"Unterminated stringifier\");\r\n return member;\r\n }\r\n\r\n class IterableLike extends Base {\r\n static parse() {\r\n const start_position = tokeniser.position;\r\n const tokens = {};\r\n const ret = new IterableLike({ source, tokens });\r\n tokens.readonly = consume(\"readonly\");\r\n tokens.base = tokens.readonly ?\r\n consume(\"maplike\", \"setlike\") :\r\n consume(\"iterable\", \"maplike\", \"setlike\");\r\n if (!tokens.base) {\r\n unconsume(start_position);\r\n return;\r\n }\r\n\r\n const { type } = ret;\r\n const secondTypeRequired = type === \"maplike\";\r\n const secondTypeAllowed = secondTypeRequired || type === \"iterable\";\r\n\r\n tokens.open = consume(\"<\") || error(`Error parsing ${type} declaration`);\r\n const first = type_with_extended_attributes() || error(`Error parsing ${type} declaration`);\r\n ret.idlType = [first];\r\n if (secondTypeAllowed) {\r\n first.tokens.separator = consume(\",\");\r\n if (first.tokens.separator) {\r\n ret.idlType.push(type_with_extended_attributes());\r\n }\r\n else if (secondTypeRequired)\r\n error(`Missing second type argument in ${type} declaration`);\r\n }\r\n tokens.close = consume(\">\") || error(`Unterminated ${type} declaration`);\r\n tokens.termination = consume(\";\") || error(`Missing semicolon after ${type} declaration`);\r\n\r\n return ret;\r\n }\r\n\r\n get type() {\r\n return this.tokens.base.value;\r\n }\r\n get readonly() {\r\n return !!this.tokens.readonly;\r\n }\r\n }\r\n\r\n class Inheritance extends Base {\r\n static parse() {\r\n const colon = consume(\":\");\r\n if (!colon) {\r\n return;\r\n }\r\n const name = consume(ID) || error(\"No type in inheritance\");\r\n return new Inheritance({ source, tokens: { colon, name } });\r\n }\r\n\r\n get name() {\r\n return unescape(this.tokens.name.value);\r\n }\r\n }\r\n\r\n class Container extends Base {\r\n static parse(instance, { type, inheritable, allowedMembers }) {\r\n const { tokens } = instance;\r\n tokens.name = consume(ID) || error(\"No name for interface\");\r\n tokeniser.current = instance;\r\n if (inheritable) {\r\n instance.inheritance = Inheritance.parse() || null;\r\n }\r\n tokens.open = consume(\"{\") || error(`Bodyless ${type}`);\r\n instance.members = [];\r\n while (true) {\r\n tokens.close = consume(\"}\");\r\n if (tokens.close) {\r\n tokens.termination = consume(\";\") || error(`Missing semicolon after ${type}`);\r\n return instance;\r\n }\r\n const ea = ExtendedAttributes.parse();\r\n let mem;\r\n for (const [parser, ...args] of allowedMembers) {\r\n mem = parser(...args);\r\n if (mem) {\r\n break;\r\n }\r\n }\r\n if (!mem) {\r\n error(\"Unknown member\");\r\n }\r\n mem.extAttrs = ea;\r\n instance.members.push(mem);\r\n }\r\n }\r\n\r\n get partial() {\r\n return !!this.tokens.partial;\r\n }\r\n get name() {\r\n return unescape(this.tokens.name.value);\r\n }\r\n }\r\n\r\n class Interface extends Container {\r\n static parse(base, { callback = null, partial = null } = {}) {\r\n const tokens = { callback, partial, base };\r\n return Container.parse(new Interface({ source, tokens }), {\r\n type: \"interface\",\r\n inheritable: !partial,\r\n allowedMembers: [\r\n [Constant.parse],\r\n [static_member],\r\n [stringifier],\r\n [IterableLike.parse],\r\n [Attribute.parse],\r\n [Operation.parse]\r\n ]\r\n });\r\n }\r\n\r\n get type() {\r\n if (this.tokens.callback) {\r\n return \"callback interface\";\r\n }\r\n return \"interface\";\r\n }\r\n }\r\n\r\n class Mixin extends Container {\r\n static parse(base, { partial } = {}) {\r\n const tokens = { partial, base };\r\n tokens.mixin = consume(\"mixin\");\r\n if (!tokens.mixin) {\r\n return;\r\n }\r\n return Container.parse(new Mixin({ source, tokens }), {\r\n type: \"interface mixin\",\r\n allowedMembers: [\r\n [Constant.parse],\r\n [stringifier],\r\n [Attribute.parse, { noInherit: true }],\r\n [Operation.parse, { regular: true }]\r\n ]\r\n });\r\n }\r\n\r\n get type() {\r\n return \"interface mixin\";\r\n }\r\n }\r\n\r\n function interface_(opts) {\r\n const base = consume(\"interface\");\r\n if (!base) return;\r\n const ret = Mixin.parse(base, opts) ||\r\n Interface.parse(base, opts) ||\r\n error(\"Interface has no proper body\");\r\n return ret;\r\n }\r\n\r\n class Namespace extends Container {\r\n static parse({ partial } = {}) {\r\n const tokens = { partial };\r\n tokens.base = consume(\"namespace\");\r\n if (!tokens.base) {\r\n return;\r\n }\r\n return Container.parse(new Namespace({ source, tokens }), {\r\n type: \"namespace\",\r\n allowedMembers: [\r\n [Attribute.parse, { noInherit: true, readonly: true }],\r\n [Operation.parse, { regular: true }]\r\n ]\r\n });\r\n }\r\n\r\n get type() {\r\n return \"namespace\";\r\n }\r\n }\r\n\r\n function partial() {\r\n const partial = consume(\"partial\");\r\n if (!partial) return;\r\n return Dictionary.parse({ partial }) ||\r\n interface_({ partial }) ||\r\n Namespace.parse({ partial }) ||\r\n error(\"Partial doesn't apply to anything\");\r\n }\r\n\r\n class Dictionary extends Container {\r\n static parse({ partial } = {}) {\r\n const tokens = { partial };\r\n tokens.base = consume(\"dictionary\");\r\n if (!tokens.base) {\r\n return;\r\n }\r\n return Container.parse(new Dictionary({ source, tokens }), {\r\n type: \"dictionary\",\r\n inheritable: !partial,\r\n allowedMembers: [\r\n [Field.parse],\r\n ]\r\n });\r\n }\r\n\r\n get type() {\r\n return \"dictionary\";\r\n }\r\n }\r\n\r\n class Field extends Base {\r\n static parse() {\r\n const tokens = {};\r\n const ret = new Field({ source, tokens });\r\n ret.extAttrs = ExtendedAttributes.parse();\r\n tokens.required = consume(\"required\");\r\n ret.idlType = type_with_extended_attributes(\"dictionary-type\") || error(\"No type for dictionary member\");\r\n tokens.name = consume(ID) || error(\"No name for dictionary member\");\r\n ret.default = Default.parse(tokeniser);\r\n if (tokens.required && ret.default) error(\"Required member must not have a default\");\r\n tokens.termination = consume(\";\") || error(\"Unterminated dictionary member\");\r\n return ret;\r\n }\r\n\r\n get type() {\r\n return \"field\";\r\n }\r\n get name() {\r\n return unescape(this.tokens.name.value);\r\n }\r\n get required() {\r\n return !!this.tokens.required;\r\n }\r\n }\r\n\r\n class Typedef extends Base {\r\n static parse() {\r\n const tokens = {};\r\n const ret = new Typedef({ source, tokens });\r\n tokens.base = consume(\"typedef\");\r\n if (!tokens.base) {\r\n return;\r\n }\r\n ret.idlType = type_with_extended_attributes(\"typedef-type\") || error(\"No type in typedef\");\r\n tokens.name = consume(ID) || error(\"No name in typedef\");\r\n tokeniser.current = ret;\r\n tokens.termination = consume(\";\") || error(\"Unterminated typedef\");\r\n return ret;\r\n }\r\n\r\n get type() {\r\n return \"typedef\";\r\n }\r\n get name() {\r\n return unescape(this.tokens.name.value);\r\n }\r\n }\r\n\r\n function definition() {\r\n return callback() ||\r\n interface_() ||\r\n partial() ||\r\n Dictionary.parse() ||\r\n Enum.parse(tokeniser) ||\r\n Typedef.parse() ||\r\n Includes.parse(tokeniser) ||\r\n Namespace.parse();\r\n }\r\n\r\n function definitions() {\r\n if (!source.length) return [];\r\n const defs = [];\r\n while (true) {\r\n const ea = ExtendedAttributes.parse();\r\n const def = definition();\r\n if (!def) {\r\n if (ea) error(\"Stray extended attributes\");\r\n break;\r\n }\r\n def.extAttrs = ea;\r\n defs.push(def);\r\n }\r\n defs.push(consume(\"eof\"));\r\n return defs;\r\n }\r\n const res = definitions();\r\n if (tokeniser.position < source.length) error(\"Unrecognised tokens\");\r\n return res;\r\n}\r\n\r\nexport function parse(str) {\r\n const tokeniser = new Tokeniser(str);\r\n return parseByTokens(tokeniser);\r\n}\r\n","\"use strict\";\r\n\r\nfunction noop(arg) {\r\n return arg;\r\n}\r\n\r\nconst templates = {\r\n wrap: items => items.join(\"\"),\r\n trivia: noop,\r\n name: noop,\r\n reference: noop,\r\n type: noop,\r\n generic: noop,\r\n inheritance: noop,\r\n definition: noop,\r\n extendedAttribute: noop,\r\n extendedAttributeReference: noop\r\n};\r\n\r\nexport function write(ast, { templates: ts = templates } = {}) {\r\n ts = Object.assign({}, templates, ts);\r\n\r\n function reference(raw, unescaped) {\r\n return ts.reference(raw, unescaped || raw);\r\n }\r\n\r\n function token(t, wrapper = noop, ...args) {\r\n if (!t) {\r\n return \"\";\r\n }\r\n const value = wrapper(t.value, ...args);\r\n return ts.wrap([ts.trivia(t.trivia), value]);\r\n }\r\n\r\n function reference_token(t, unescaped) {\r\n return token(t, reference, unescaped);\r\n }\r\n\r\n function name_token(t, arg) {\r\n return token(t, ts.name, arg);\r\n }\r\n\r\n function type_body(it) {\r\n if (it.union || it.generic) {\r\n return ts.wrap([\r\n token(it.tokens.base, ts.generic),\r\n token(it.tokens.open),\r\n ...it.subtype.map(type),\r\n token(it.tokens.close)\r\n ]);\r\n }\r\n const firstToken = it.tokens.prefix || it.tokens.base;\r\n const prefix = it.tokens.prefix ? [\r\n it.tokens.prefix.value,\r\n ts.trivia(it.tokens.base.trivia)\r\n ] : [];\r\n const ref = reference(ts.wrap([\r\n ...prefix,\r\n it.tokens.base.value,\r\n token(it.tokens.postfix)\r\n ]), it.idlType);\r\n return ts.wrap([ts.trivia(firstToken.trivia), ref]);\r\n }\r\n function type(it) {\r\n return ts.wrap([\r\n extended_attributes(it.extAttrs),\r\n type_body(it),\r\n token(it.tokens.nullable),\r\n token(it.tokens.separator)\r\n ]);\r\n }\r\n function default_(def) {\r\n if (!def) {\r\n return \"\";\r\n }\r\n return ts.wrap([\r\n token(def.tokens.assign),\r\n ...def.expression.map(t => token(t))\r\n ]);\r\n }\r\n function argument(arg) {\r\n return ts.wrap([\r\n extended_attributes(arg.extAttrs),\r\n token(arg.tokens.optional),\r\n ts.type(type(arg.idlType)),\r\n token(arg.tokens.variadic),\r\n name_token(arg.tokens.name, { data: arg }),\r\n default_(arg.default),\r\n token(arg.tokens.separator)\r\n ]);\r\n }\r\n function identifier(id) {\r\n return ts.wrap([\r\n reference_token(id.tokens.value),\r\n token(id.tokens.separator)\r\n ]);\r\n }\r\n function make_ext_at(it) {\r\n const { rhsType } = it.params;\r\n return ts.wrap([\r\n ts.trivia(it.tokens.name.trivia),\r\n ts.extendedAttribute(ts.wrap([\r\n ts.extendedAttributeReference(it.name),\r\n token(it.params.tokens.assign),\r\n reference_token(it.params.tokens.secondaryName),\r\n token(it.params.tokens.open),\r\n ...!it.params.list ? [] :\r\n it.params.list.map(\r\n rhsType === \"identifier-list\" ? identifier : argument\r\n ),\r\n token(it.params.tokens.close)\r\n ])),\r\n token(it.tokens.separator)\r\n ]);\r\n }\r\n function extended_attributes(eats) {\r\n if (!eats) return \"\";\r\n return ts.wrap([\r\n token(eats.tokens.open),\r\n ...eats.items.map(make_ext_at),\r\n token(eats.tokens.close)\r\n ]);\r\n }\r\n\r\n function operation(it, parent) {\r\n const body = it.body ? [\r\n ts.type(type(it.body.idlType)),\r\n name_token(it.body.tokens.name, { data: it, parent }),\r\n token(it.body.tokens.open),\r\n ts.wrap(it.body.arguments.map(argument)),\r\n token(it.body.tokens.close),\r\n ] : [];\r\n return ts.definition(ts.wrap([\r\n extended_attributes(it.extAttrs),\r\n token(it.tokens.special),\r\n ...body,\r\n token(it.tokens.termination)\r\n ]), { data: it, parent });\r\n }\r\n\r\n function attribute(it, parent) {\r\n return ts.definition(ts.wrap([\r\n extended_attributes(it.extAttrs),\r\n token(it.tokens.special),\r\n token(it.tokens.readonly),\r\n token(it.tokens.base),\r\n ts.type(type(it.idlType)),\r\n name_token(it.tokens.name, { data: it, parent }),\r\n token(it.tokens.termination)\r\n ]), { data: it, parent });\r\n }\r\n\r\n function inheritance(inh) {\r\n if (!inh) {\r\n return \"\";\r\n }\r\n return ts.wrap([\r\n token(inh.tokens.colon),\r\n ts.trivia(inh.tokens.name.trivia),\r\n ts.inheritance(reference(inh.tokens.name.value, inh.name))\r\n ]);\r\n }\r\n\r\n function container(it) {\r\n return ts.definition(ts.wrap([\r\n extended_attributes(it.extAttrs),\r\n token(it.tokens.callback),\r\n token(it.tokens.partial),\r\n token(it.tokens.base),\r\n token(it.tokens.mixin),\r\n name_token(it.tokens.name, { data: it }),\r\n inheritance(it.inheritance),\r\n token(it.tokens.open),\r\n iterate(it.members, it),\r\n token(it.tokens.close),\r\n token(it.tokens.termination)\r\n ]), { data: it });\r\n }\r\n\r\n function field(it, parent) {\r\n return ts.definition(ts.wrap([\r\n extended_attributes(it.extAttrs),\r\n token(it.tokens.required),\r\n ts.type(type(it.idlType)),\r\n name_token(it.tokens.name, { data: it, parent }),\r\n default_(it.default),\r\n token(it.tokens.termination)\r\n ]), { data: it, parent });\r\n }\r\n function const_(it, parent) {\r\n return ts.definition(ts.wrap([\r\n extended_attributes(it.extAttrs),\r\n token(it.tokens.base),\r\n ts.type(type(it.idlType)),\r\n name_token(it.tokens.name, { data: it, parent }),\r\n token(it.tokens.assign),\r\n token(it.tokens.value),\r\n token(it.tokens.termination)\r\n ]), { data: it, parent });\r\n }\r\n function typedef(it) {\r\n return ts.definition(ts.wrap([\r\n extended_attributes(it.extAttrs),\r\n token(it.tokens.base),\r\n ts.type(type(it.idlType)),\r\n name_token(it.tokens.name, { data: it }),\r\n token(it.tokens.termination)\r\n ]), { data: it });\r\n }\r\n function includes(it) {\r\n return ts.definition(ts.wrap([\r\n extended_attributes(it.extAttrs),\r\n reference_token(it.tokens.target, it.target),\r\n token(it.tokens.includes),\r\n reference_token(it.tokens.mixin, it.includes),\r\n token(it.tokens.termination)\r\n ]), { data: it });\r\n }\r\n function callback(it) {\r\n return ts.definition(ts.wrap([\r\n extended_attributes(it.extAttrs),\r\n token(it.tokens.base),\r\n name_token(it.tokens.name, { data: it }),\r\n token(it.tokens.assign),\r\n ts.type(type(it.idlType)),\r\n token(it.tokens.open),\r\n ...it.arguments.map(argument),\r\n token(it.tokens.close),\r\n token(it.tokens.termination),\r\n ]), { data: it });\r\n }\r\n function enum_(it) {\r\n return ts.definition(ts.wrap([\r\n extended_attributes(it.extAttrs),\r\n token(it.tokens.base),\r\n name_token(it.tokens.name, { data: it }),\r\n token(it.tokens.open),\r\n iterate(it.values, it),\r\n token(it.tokens.close),\r\n token(it.tokens.termination)\r\n ]), { data: it });\r\n }\r\n function enum_value(v, parent) {\r\n return ts.wrap([\r\n ts.trivia(v.tokens.value.trivia),\r\n ts.definition(\r\n ts.wrap(['\"', ts.name(v.value, { data: v, parent }), '\"']),\r\n { data: v, parent }\r\n ),\r\n token(v.tokens.separator)\r\n ]);\r\n }\r\n function iterable_like(it, parent) {\r\n return ts.definition(ts.wrap([\r\n extended_attributes(it.extAttrs),\r\n token(it.tokens.readonly),\r\n token(it.tokens.base, ts.generic),\r\n token(it.tokens.open),\r\n ts.wrap(it.idlType.map(type)),\r\n token(it.tokens.close),\r\n token(it.tokens.termination)\r\n ]), { data: it, parent });\r\n }\r\n function eof(it) {\r\n return ts.trivia(it.trivia);\r\n }\r\n\r\n const table = {\r\n interface: container,\r\n \"interface mixin\": container,\r\n namespace: container,\r\n operation,\r\n attribute,\r\n dictionary: container,\r\n field,\r\n const: const_,\r\n typedef,\r\n includes,\r\n callback,\r\n enum: enum_,\r\n \"enum-value\": enum_value,\r\n iterable: iterable_like,\r\n legacyiterable: iterable_like,\r\n maplike: iterable_like,\r\n setlike: iterable_like,\r\n \"callback interface\": container,\r\n eof\r\n };\r\n function dispatch(it, parent) {\r\n const dispatcher = table[it.type];\r\n if (!dispatcher) {\r\n throw new Error(`Type \"${it.type}\" is unsupported`);\r\n }\r\n return table[it.type](it, parent);\r\n }\r\n function iterate(things, parent) {\r\n if (!things) return;\r\n const results = things.map(thing => dispatch(thing, parent));\r\n return ts.wrap(results);\r\n }\r\n return iterate(ast);\r\n}\r\n","\"use strict\";\r\n\r\nimport { validationError as error } from \"./error.js\";\r\n\r\nfunction groupDefinitions(all) {\r\n const unique = new Map();\r\n const duplicates = new Set();\r\n const partials = new Map();\r\n for (const def of all) {\r\n if (def.partial) {\r\n const array = partials.get(def.name);\r\n if (array) {\r\n array.push(def);\r\n } else {\r\n partials.set(def.name, [def]);\r\n }\r\n continue;\r\n }\r\n if (!def.name) {\r\n continue;\r\n }\r\n if (!unique.has(def.name)) {\r\n unique.set(def.name, def);\r\n } else {\r\n duplicates.add(def);\r\n }\r\n }\r\n return { all, unique, partials, duplicates };\r\n}\r\n\r\nfunction* checkDuplicatedNames({ unique, duplicates }) {\r\n for (const dup of duplicates) {\r\n const { name } = dup;\r\n const message = `The name \"${name}\" of type \"${unique.get(name).type}\" was already seen`;\r\n yield error(dup.source, dup.tokens.name, dup, message);\r\n }\r\n}\r\n\r\nfunction* checkInterfaceMemberDuplication(defs) {\r\n const interfaces = [...defs.unique.values()].filter(def => def.type === \"interface\");\r\n const includesMap = getIncludesMap();\r\n\r\n for (const i of interfaces) {\r\n yield* forEachInterface(i);\r\n }\r\n\r\n function* forEachInterface(i) {\r\n const opNames = new Set(getOperations(i).map(op => op.name));\r\n const partials = defs.partials.get(i.name) || [];\r\n const mixins = includesMap.get(i.name) || [];\r\n for (const ext of [...partials, ...mixins]) {\r\n const additions = getOperations(ext);\r\n yield* forEachExtension(additions, opNames, ext, i);\r\n for (const addition of additions) {\r\n opNames.add(addition.name);\r\n }\r\n }\r\n }\r\n\r\n function* forEachExtension(additions, existings, ext, base) {\r\n for (const addition of additions) {\r\n const { name } = addition;\r\n if (name && existings.has(name)) {\r\n const message = `The operation \"${name}\" has already been defined for the base interface \"${base.name}\" either in itself or in a mixin`;\r\n yield error(ext.source, addition.body.tokens.name, ext, message);\r\n }\r\n }\r\n }\r\n\r\n function getOperations(i) {\r\n return i.members\r\n .filter(({type}) => type === \"operation\");\r\n }\r\n\r\n function getIncludesMap() {\r\n const map = new Map();\r\n const includes = defs.all.filter(def => def.type === \"includes\");\r\n for (const include of includes) {\r\n const array = map.get(include.target);\r\n const mixin = defs.unique.get(include.includes);\r\n if (!mixin) {\r\n continue;\r\n }\r\n if (array) {\r\n array.push(mixin);\r\n } else {\r\n map.set(include.target, [mixin]);\r\n }\r\n }\r\n return map;\r\n }\r\n}\r\n\r\nexport function validate(ast) {\r\n const defs = groupDefinitions(ast);\r\n return [\r\n ...checkDuplicatedNames(defs),\r\n ...checkInterfaceMemberDuplication(defs)\r\n ];\r\n}\r\n","export { parse } from \"./lib/webidl2.js\";\r\nexport { write } from \"./lib/writer.js\";\r\nexport { validate } from \"./lib/validator.js\";\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/index.js b/index.js index 09f9eb46aa78f4..131ba254b39adf 100644 --- a/index.js +++ b/index.js @@ -1 +1,3 @@ -module.exports = require("./lib/webidl2.js"); +export { parse } from "./lib/webidl2.js"; +export { write } from "./lib/writer.js"; +export { validate } from "./lib/validator.js"; diff --git a/lib/error.js b/lib/error.js new file mode 100644 index 00000000000000..12f976df88639e --- /dev/null +++ b/lib/error.js @@ -0,0 +1,74 @@ +/** + * @param {string} text + */ +function lastLine(text) { + const splitted = text.split("\n"); + return splitted[splitted.length - 1]; +} + +/** + * @param {string} message error message + * @param {"Syntax" | "Validation"} type error type + */ +function error(source, position, current, message, type) { + /** + * @param {number} count + */ + function sliceTokens(count) { + return count > 0 ? + source.slice(position, position + count) : + source.slice(Math.max(position + count, 0), position); + } + + function tokensToText(inputs, { precedes } = {}) { + const text = inputs.map(t => t.trivia + t.value).join(""); + const nextToken = source[position]; + if (nextToken.type === "eof") { + return text; + } + if (precedes) { + return text + nextToken.trivia; + } + return text.slice(nextToken.trivia.length); + } + + const maxTokens = 5; // arbitrary but works well enough + const line = + source[position].type !== "eof" ? source[position].line : + source.length > 1 ? source[position - 1].line : + 1; + + const precedingLine = lastLine( + tokensToText(sliceTokens(-maxTokens), { precedes: true }) + ); + + const subsequentTokens = sliceTokens(maxTokens); + const subsequentText = tokensToText(subsequentTokens); + const sobsequentLine = subsequentText.split("\n")[0]; + + const spaced = " ".repeat(precedingLine.length) + "^ " + message; + const contextualMessage = precedingLine + sobsequentLine + "\n" + spaced; + + const contextType = type === "Syntax" ? "since" : "inside"; + const grammaticalContext = current ? `, ${contextType} \`${current.partial ? "partial " : ""}${current.type} ${current.name}\`` : ""; + return { + message: `${type} error at line ${line}${grammaticalContext}:\n${contextualMessage}`, + line, + input: subsequentText, + tokens: subsequentTokens + }; +} + +/** + * @param {string} message error message + */ +export function syntaxError(source, position, current, message) { + return error(source, position, current, message, "Syntax"); +} + +/** + * @param {string} message error message + */ +export function validationError(source, token, current, message) { + return error(source, token.index, current, message, "Validation").message; +} diff --git a/lib/productions/base.js b/lib/productions/base.js new file mode 100644 index 00000000000000..7c899fd26024ea --- /dev/null +++ b/lib/productions/base.js @@ -0,0 +1,23 @@ +export class Base { + constructor({ source, tokens }) { + Object.defineProperties(this, { + source: { value: source }, + tokens: { value: tokens } + }); + } + + toJSON() { + const json = { type: undefined, name: undefined }; + let proto = this; + while (proto !== Object.prototype) { + const descMap = Object.getOwnPropertyDescriptors(proto); + for (const [key, value] of Object.entries(descMap)) { + if (value.enumerable || value.get) { + json[key] = this[key]; + } + } + proto = Object.getPrototypeOf(proto); + } + return json; + } +} diff --git a/lib/productions/default.js b/lib/productions/default.js new file mode 100644 index 00000000000000..3414b575ea3b42 --- /dev/null +++ b/lib/productions/default.js @@ -0,0 +1,36 @@ +import { Base } from "./base.js"; +import { const_data, const_value } from "./helpers.js"; + +export class Default extends Base { + /** + * @param {import("../tokeniser").Tokeniser} tokeniser + */ + static parse(tokeniser) { + const assign = tokeniser.consume("="); + if (!assign) { + return null; + } + const def = const_value(tokeniser) || tokeniser.consume("string", "null", "[") || tokeniser.error("No value for default"); + const expression = [def]; + if (def.type === "[") { + const close = tokeniser.consume("]") || error("Default sequence value must be empty"); + expression.push(close); + } + return new Default({ source: tokeniser.source, tokens: { assign }, expression }); + } + + constructor({ source, tokens, expression }) { + super({ source, tokens }); + Object.defineProperty(this, "expression", { value: expression }); + } + + get type() { + return const_data(this.expression[0]).type; + } + get value() { + return const_data(this.expression[0]).value; + } + get negative() { + return const_data(this.expression[0]).negative; + } +} diff --git a/lib/productions/enum.js b/lib/productions/enum.js new file mode 100644 index 00000000000000..47eef3bd14bb6a --- /dev/null +++ b/lib/productions/enum.js @@ -0,0 +1,59 @@ +import { list, unescape } from "./helpers.js"; +import { Token } from "./token.js"; +import { Base } from "./base.js"; + +class EnumValue extends Token { + /** + * @param {import("../tokeniser").Tokeniser} tokeniser + */ + static parse(tokeniser) { + const value = tokeniser.consume("string"); + if (value) { + return new EnumValue({ source: tokeniser.source, tokens: { value } }); + } + } + + get type() { + return "enum-value"; + } + get value() { + return super.value.slice(1, -1); + } +} + +export class Enum extends Base { + /** + * @param {import("../tokeniser").Tokeniser} tokeniser + */ + static parse(tokeniser) { + const tokens = {}; + tokens.base = tokeniser.consume("enum"); + if (!tokens.base) { + return; + } + tokens.name = tokeniser.consume("identifier") || tokeniser.error("No name for enum"); + const ret = tokeniser.current = new Enum({ source: tokeniser.source, tokens }); + tokens.open = tokeniser.consume("{") || tokeniser.error("Bodyless enum"); + ret.values = list(tokeniser, { + parser: EnumValue.parse, + allowDangler: true, + listName: "enumeration" + }); + if (tokeniser.probe("string")) { + tokeniser.error("No comma between enum values"); + } + tokens.close = tokeniser.consume("}") || tokeniser.error("Unexpected value in enum"); + if (!ret.values.length) { + tokeniser.error("No value in enum"); + } + tokens.termination = tokeniser.consume(";") || tokeniser.error("No semicolon after enum"); + return ret; + } + + get type() { + return "enum"; + } + get name() { + return unescape(this.tokens.name.value); + } +} diff --git a/lib/productions/helpers.js b/lib/productions/helpers.js new file mode 100644 index 00000000000000..61e838bda30778 --- /dev/null +++ b/lib/productions/helpers.js @@ -0,0 +1,68 @@ +/** + * @param {string} identifier + */ +export function unescape(identifier) { + return identifier.startsWith('_') ? identifier.slice(1) : identifier; +} + +/** + * Parses comma-separated list + * @param {import("../tokeniser").Tokeniser} tokeniser + * @param {object} args + * @param {Function} args.parser parser function for each item + * @param {boolean} [args.allowDangler] whether to allow dangling comma + * @param {string} [args.listName] the name to be shown on error messages + */ +export function list(tokeniser, { parser, allowDangler, listName = "list" }) { + const first = parser(tokeniser); + if (!first) { + return []; + } + first.tokens.separator = tokeniser.consume(","); + const items = [first]; + while (first.tokens.separator) { + const item = parser(tokeniser); + if (!item) { + if (!allowDangler) { + error(`Trailing comma in ${listName}`); + } + break; + } + item.tokens.separator = tokeniser.consume(","); + items.push(item); + if (!item.tokens.separator) break; + } + return items; +} + +/** + * @param {import("../tokeniser").Tokeniser} tokeniser + */ +export function const_value(tokeniser) { + return tokeniser.consume("true", "false", "Infinity", "-Infinity", "NaN", "decimal", "integer"); +} + +/** + * @param {object} token + * @param {string} token.type + * @param {string} token.value + */ +export function const_data({ type, value }) { + switch (type) { + case "true": + case "false": + return { type: "boolean", value: type === "true" }; + case "Infinity": + case "-Infinity": + return { type: "Infinity", negative: type.startsWith("-") }; + case "[": + return { type: "sequence", value: [] }; + case "decimal": + case "integer": + return { type: "number", value }; + case "string": + return { type: "string", value: value.slice(1, -1) }; + default: + return { type }; + } +} diff --git a/lib/productions/includes.js b/lib/productions/includes.js new file mode 100644 index 00000000000000..2168ceb6ce8e3b --- /dev/null +++ b/lib/productions/includes.js @@ -0,0 +1,33 @@ +import { Base } from "./base.js"; +import { unescape } from "./helpers.js"; + +export class Includes extends Base { + /** + * @param {import("../tokeniser").Tokeniser} tokeniser + */ + static parse(tokeniser) { + const target = tokeniser.consume("identifier"); + if (!target) { + return; + } + const tokens = { target }; + tokens.includes = tokeniser.consume("includes"); + if (!tokens.includes) { + tokeniser.unconsume(target.index); + return; + } + tokens.mixin = tokeniser.consume("identifier") || tokeniser.error("Incomplete includes statement"); + tokens.termination = tokeniser.consume(";") || tokeniser.error("No terminating ; for includes statement"); + return new Includes({ source: tokeniser.source, tokens }); + } + + get type() { + return "includes"; + } + get target() { + return unescape(this.tokens.target.value); + } + get includes() { + return unescape(this.tokens.mixin.value); + } +} diff --git a/lib/productions/token.js b/lib/productions/token.js new file mode 100644 index 00000000000000..de9f2c031a1ffb --- /dev/null +++ b/lib/productions/token.js @@ -0,0 +1,20 @@ +import { Base } from "./base.js"; + +export class Token extends Base { + /** + * @param {import("../tokeniser").Tokeniser} tokeniser + * @param {string} type + */ + static parser(tokeniser, type) { + return () => { + const value = tokeniser.consume(type); + if (value) { + return new Token({ source: tokeniser.source, tokens: { value } }); + } + }; + } + + get value() { + return this.tokens.value.value; + } +} diff --git a/lib/tokeniser.js b/lib/tokeniser.js new file mode 100644 index 00000000000000..9e46024b3bc120 --- /dev/null +++ b/lib/tokeniser.js @@ -0,0 +1,233 @@ +import { syntaxError } from "./error.js"; + +// These regular expressions use the sticky flag so they will only match at +// the current location (ie. the offset of lastIndex). +const tokenRe = { + // This expression uses a lookahead assertion to catch false matches + // against integers early. + "decimal": /-?(?=[0-9]*\.|[0-9]+[eE])(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y, + "integer": /-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y, + "identifier": /[_-]?[A-Za-z][0-9A-Z_a-z-]*/y, + "string": /"[^"]*"/y, + "whitespace": /[\t\n\r ]+/y, + "comment": /((\/(\/.*|\*([^*]|\*[^/])*\*\/)[\t\n\r ]*)+)/y, + "other": /[^\t\n\r 0-9A-Za-z]/y +}; + +export const stringTypes = [ + "ByteString", + "DOMString", + "USVString" +]; + +export const argumentNameKeywords = [ + "attribute", + "callback", + "const", + "deleter", + "dictionary", + "enum", + "getter", + "includes", + "inherit", + "interface", + "iterable", + "maplike", + "namespace", + "partial", + "required", + "setlike", + "setter", + "static", + "stringifier", + "typedef", + "unrestricted" +]; + +const nonRegexTerminals = [ + "-Infinity", + "FrozenArray", + "Infinity", + "NaN", + "Promise", + "boolean", + "byte", + "double", + "false", + "float", + "implements", + "legacyiterable", + "long", + "mixin", + "null", + "octet", + "optional", + "or", + "readonly", + "record", + "sequence", + "short", + "true", + "unsigned", + "void" +].concat(argumentNameKeywords, stringTypes); + +const punctuations = [ + "(", + ")", + ",", + "...", + ":", + ";", + "<", + "=", + ">", + "?", + "[", + "]", + "{", + "}" +]; + +/** + * @param {string} str + */ +function tokenise(str) { + const tokens = []; + let lastCharIndex = 0; + let trivia = ""; + let line = 1; + let index = 0; + while (lastCharIndex < str.length) { + const nextChar = str.charAt(lastCharIndex); + let result = -1; + + if (/[\t\n\r ]/.test(nextChar)) { + result = attemptTokenMatch("whitespace", { noFlushTrivia: true }); + } else if (nextChar === '/') { + result = attemptTokenMatch("comment", { noFlushTrivia: true }); + } + + if (result !== -1) { + const currentTrivia = tokens.pop().value; + line += (currentTrivia.match(/\n/g) || []).length; + trivia += currentTrivia; + index -= 1; + } else if (/[-0-9.A-Z_a-z]/.test(nextChar)) { + result = attemptTokenMatch("decimal"); + if (result === -1) { + result = attemptTokenMatch("integer"); + } + if (result === -1) { + result = attemptTokenMatch("identifier"); + const token = tokens[tokens.length - 1]; + if (result !== -1 && nonRegexTerminals.includes(token.value)) { + token.type = token.value; + } + } + } else if (nextChar === '"') { + result = attemptTokenMatch("string"); + } + + for (const punctuation of punctuations) { + if (str.startsWith(punctuation, lastCharIndex)) { + tokens.push({ type: punctuation, value: punctuation, trivia, line, index }); + trivia = ""; + lastCharIndex += punctuation.length; + result = lastCharIndex; + break; + } + } + + // other as the last try + if (result === -1) { + result = attemptTokenMatch("other"); + } + if (result === -1) { + throw new Error("Token stream not progressing"); + } + lastCharIndex = result; + index += 1; + } + + // remaining trivia as eof + tokens.push({ + type: "eof", + value: "", + trivia + }); + + return tokens; + + /** + * @param {keyof tokenRe} type + * @param {object} [options] + * @param {boolean} [options.noFlushTrivia] + */ + function attemptTokenMatch(type, { noFlushTrivia } = {}) { + const re = tokenRe[type]; + re.lastIndex = lastCharIndex; + const result = re.exec(str); + if (result) { + tokens.push({ type, value: result[0], trivia, line, index }); + if (!noFlushTrivia) { + trivia = ""; + } + return re.lastIndex; + } + return -1; + } +} + +export class Tokeniser { + /** + * @param {string} idl + */ + constructor(idl) { + this.source = tokenise(idl); + this.position = 0; + } + + /** + * @param {string} message + */ + error(message) { + throw new WebIDLParseError(syntaxError(this.source, this.position, this.current, message)); + } + + /** + * @param {string} type + */ + probe(type) { + return this.source.length > this.position && this.source[this.position].type === type; + } + + /** + * @param {...string} candidates + */ + consume(...candidates) { + for (const type of candidates) { + if (!this.probe(type)) continue; + const token = this.source[this.position]; + this.position++; + return token; + } + } + + /** + * @param {number} position + */ + unconsume(position) { + this.position = position; + } +} + +class WebIDLParseError extends Error { + constructor({ message, line, input, tokens }) { + super(message); + this.name = "WebIDLParseError"; // not to be mangled + this.line = line; + this.input = input; + this.tokens = tokens; + } +} diff --git a/lib/validator.js b/lib/validator.js new file mode 100644 index 00000000000000..84d9174efe5de4 --- /dev/null +++ b/lib/validator.js @@ -0,0 +1,100 @@ +"use strict"; + +import { validationError as error } from "./error.js"; + +function groupDefinitions(all) { + const unique = new Map(); + const duplicates = new Set(); + const partials = new Map(); + for (const def of all) { + if (def.partial) { + const array = partials.get(def.name); + if (array) { + array.push(def); + } else { + partials.set(def.name, [def]); + } + continue; + } + if (!def.name) { + continue; + } + if (!unique.has(def.name)) { + unique.set(def.name, def); + } else { + duplicates.add(def); + } + } + return { all, unique, partials, duplicates }; +} + +function* checkDuplicatedNames({ unique, duplicates }) { + for (const dup of duplicates) { + const { name } = dup; + const message = `The name "${name}" of type "${unique.get(name).type}" was already seen`; + yield error(dup.source, dup.tokens.name, dup, message); + } +} + +function* checkInterfaceMemberDuplication(defs) { + const interfaces = [...defs.unique.values()].filter(def => def.type === "interface"); + const includesMap = getIncludesMap(); + + for (const i of interfaces) { + yield* forEachInterface(i); + } + + function* forEachInterface(i) { + const opNames = new Set(getOperations(i).map(op => op.name)); + const partials = defs.partials.get(i.name) || []; + const mixins = includesMap.get(i.name) || []; + for (const ext of [...partials, ...mixins]) { + const additions = getOperations(ext); + yield* forEachExtension(additions, opNames, ext, i); + for (const addition of additions) { + opNames.add(addition.name); + } + } + } + + function* forEachExtension(additions, existings, ext, base) { + for (const addition of additions) { + const { name } = addition; + if (name && existings.has(name)) { + const message = `The operation "${name}" has already been defined for the base interface "${base.name}" either in itself or in a mixin`; + yield error(ext.source, addition.body.tokens.name, ext, message); + } + } + } + + function getOperations(i) { + return i.members + .filter(({type}) => type === "operation"); + } + + function getIncludesMap() { + const map = new Map(); + const includes = defs.all.filter(def => def.type === "includes"); + for (const include of includes) { + const array = map.get(include.target); + const mixin = defs.unique.get(include.includes); + if (!mixin) { + continue; + } + if (array) { + array.push(mixin); + } else { + map.set(include.target, [mixin]); + } + } + return map; + } +} + +export function validate(ast) { + const defs = groupDefinitions(ast); + return [ + ...checkDuplicatedNames(defs), + ...checkInterfaceMemberDuplication(defs) + ]; +} diff --git a/lib/webidl2.js b/lib/webidl2.js index ef519c09df6d6d..87a8692da7bd0d 100644 --- a/lib/webidl2.js +++ b/lib/webidl2.js @@ -1,970 +1,824 @@ "use strict"; -(() => { - // These regular expressions use the sticky flag so they will only match at - // the current location (ie. the offset of lastIndex). - const tokenRe = { - // This expression uses a lookahead assertion to catch false matches - // against integers early. - "float": /-?(?=[0-9]*\.|[0-9]+[eE])(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y, - "integer": /-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y, - "identifier": /_?[A-Za-z][0-9A-Z_a-z-]*/y, - "string": /"[^"]*"/y, - "whitespace": /[\t\n\r ]+/y, - "comment": /((\/(\/.*|\*([^*]|\*[^\/])*\*\/)[\t\n\r ]*)+)/y, - "other": /[^\t\n\r 0-9A-Za-z]/y - }; - - const stringTypes = [ - "ByteString", - "DOMString", - "USVString" - ]; - - const argumentNameKeywords = [ - "attribute", - "callback", - "const", - "deleter", - "dictionary", - "enum", - "getter", - "includes", - "inherit", - "interface", - "iterable", - "maplike", - "namespace", - "partial", - "required", - "setlike", - "setter", - "static", - "stringifier", - "typedef", - "unrestricted" - ]; - - const nonRegexTerminals = [ - "FrozenArray", - "Infinity", - "NaN", - "Promise", - "boolean", - "byte", - "double", - "false", - "float", - "implements", - "legacyiterable", - "long", - "mixin", - "null", - "octet", - "optional", - "or", - "readonly", - "record", - "sequence", - "short", - "true", - "unsigned", - "void" - ].concat(argumentNameKeywords, stringTypes); - - const punctuations = [ - "(", - ")", - ",", - "-Infinity", - "...", - ":", - ";", - "<", - "=", - ">", - "?", - "[", - "]", - "{", - "}" - ]; - - function tokenise(str) { - const tokens = []; - let lastIndex = 0; - let trivia = ""; - while (lastIndex < str.length) { - const nextChar = str.charAt(lastIndex); - let result = -1; - - if (/[\t\n\r ]/.test(nextChar)) { - result = attemptTokenMatch("whitespace", { noFlushTrivia: true }); - } else if (nextChar === '/') { - result = attemptTokenMatch("comment", { noFlushTrivia: true }); - } - - if (result !== -1) { - trivia += tokens.pop().value; - } else if (/[-0-9.]/.test(nextChar)) { - result = attemptTokenMatch("float"); - if (result === -1) { - result = attemptTokenMatch("integer"); - } - } else if (/[A-Z_a-z]/.test(nextChar)) { - result = attemptTokenMatch("identifier"); - const token = tokens[tokens.length - 1]; - if (result !== -1 && nonRegexTerminals.includes(token.value)) { - token.type = token.value; - } - } else if (nextChar === '"') { - result = attemptTokenMatch("string"); - } - - for (const punctuation of punctuations) { - if (str.startsWith(punctuation, lastIndex)) { - tokens.push({ type: punctuation, value: punctuation, trivia }); - trivia = ""; - lastIndex += punctuation.length; - result = lastIndex; - break; - } - } +import { const_data, const_value, list, unescape } from "./productions/helpers.js"; +import { argumentNameKeywords, stringTypes, Tokeniser } from "./tokeniser.js"; +import { Base } from "./productions/base.js"; +import { Token } from "./productions/token.js"; +import { Default } from "./productions/default.js"; +import { Enum } from "./productions/enum.js"; +import { Includes } from "./productions/includes.js"; + +/** + * @param {Tokeniser} tokeniser + */ +function parseByTokens(tokeniser) { + const source = tokeniser.source; + + const DECIMAL = "decimal"; + const INT = "integer"; + const ID = "identifier"; + const STR = "string"; + + function error(str) { + tokeniser.error(str); + } - // other as the last try - if (result === -1) { - result = attemptTokenMatch("other"); - } - if (result === -1) { - throw new Error("Token stream not progressing"); - } - lastIndex = result; - } - return tokens; + function probe(type) { + return tokeniser.probe(type); + } - function attemptTokenMatch(type, { noFlushTrivia } = {}) { - const re = tokenRe[type]; - re.lastIndex = lastIndex; - const result = re.exec(str); - if (result) { - tokens.push({ type, value: result[0], trivia }); - if (!noFlushTrivia) { - trivia = ""; - } - return re.lastIndex; - } - return -1; - } + function consume(...candidates) { + return tokeniser.consume(...candidates); } - class WebIDLParseError { - constructor(str, line, input, tokens) { - this.message = str; - this.line = line; - this.input = input; - this.tokens = tokens; - } + function unconsume(position) { + return tokeniser.unconsume(position); + } - toString() { - const escapedInput = JSON.stringify(this.input); - const tokens = JSON.stringify(this.tokens, null, 4); - return `${this.message}, line ${this.line} (tokens: ${escapedInput})\n${tokens}`; + function integer_type() { + const prefix = consume("unsigned"); + const base = consume("short", "long"); + if (base) { + const postfix = consume("long"); + return new Type({ source, tokens: { prefix, base, postfix } }); } + if (prefix) error("Failed to parse integer type"); } - function parse(tokens) { - let line = 1; - tokens = tokens.slice(); - const names = new Map(); - let current = null; - - const FLOAT = "float"; - const INT = "integer"; - const ID = "identifier"; - const STR = "string"; - const OTHER = "other"; - - const EMPTY_OPERATION = Object.freeze({ - type: "operation", - getter: false, - setter: false, - deleter: false, - static: false, - stringifier: false - }); - - const EMPTY_IDLTYPE = Object.freeze({ - generic: null, - nullable: false, - union: false, - idlType: null, - extAttrs: [] - }); - - function error(str) { - const maxTokens = 5; - const tok = tokens - .slice(consume_position, consume_position + maxTokens) - .map(t => t.trivia + t.value).join(""); - // Count newlines preceding the actual erroneous token - if (tokens.length) { - line += count(tokens[consume_position].trivia, "\n"); - } - - let message; - if (current) { - message = `Got an error during or right after parsing \`${current.partial ? "partial " : ""}${current.type} ${current.name}\`: ${str}` - } - else { - // throwing before any valid definition - message = `Got an error before parsing any named definition: ${str}`; - } - - throw new WebIDLParseError(message, line, tok, tokens.slice(0, maxTokens)); + function float_type() { + const prefix = consume("unrestricted"); + const base = consume("float", "double"); + if (base) { + return new Type({ source, tokens: { prefix, base } }); } + if (prefix) error("Failed to parse float type"); + } - function sanitize_name(name, type) { - if (names.has(name)) { - error(`The name "${name}" of type "${names.get(name)}" is already seen`); - } - names.set(name, type); - return name; + function primitive_type() { + const num_type = integer_type() || float_type(); + if (num_type) return num_type; + const base = consume("boolean", "byte", "octet"); + if (base) { + return new Type({ source, tokens: { base } }); } + } - let consume_position = 0; - - function probe(type) { - return tokens.length > consume_position && tokens[consume_position].type === type; + function type_suffix(obj) { + const nullable = consume("?"); + if (nullable) { + obj.tokens.nullable = nullable; } + if (probe("?")) error("Can't nullable more than once"); + } - function consume(...candidates) { - // TODO: use const when Servo updates its JS engine - for (let type of candidates) { - if (!probe(type)) continue; - const token = tokens[consume_position]; - consume_position++; - line += count(token.trivia, "\n"); - return token; - } + class Type extends Base { + constructor({ source, tokens }) { + super({ source, tokens }); + Object.defineProperty(this, "subtype", { value: [] }); + this.extAttrs = null; } - function unescape(identifier) { - return identifier.startsWith('_') ? identifier.slice(1) : identifier; + get generic() { + return ""; } - - function unconsume(position) { - while (consume_position > position) { - consume_position--; - line -= count(tokens[consume_position].trivia, "\n"); - } + get nullable() { + return !!this.tokens.nullable; } - - function count(str, char) { - let total = 0; - for (let i = str.indexOf(char); i !== -1; i = str.indexOf(char, i + 1)) { - ++total; - } - return total; + get union() { + return false; } - - function integer_type() { - let ret = ""; - if (consume("unsigned")) ret = "unsigned "; - if (consume("short")) return ret + "short"; - if (consume("long")) { - ret += "long"; - if (consume("long")) return ret + " long"; - return ret; + get idlType() { + if (this.subtype.length) { + return this.subtype; } - if (ret) error("Failed to parse integer type"); - } - - function float_type() { - let ret = ""; - if (consume("unrestricted")) ret = "unrestricted "; - if (consume("float")) return ret + "float"; - if (consume("double")) return ret + "double"; - if (ret) error("Failed to parse float type"); - } - - function primitive_type() { - const num_type = integer_type() || float_type(); - if (num_type) return num_type; - if (consume("boolean")) return "boolean"; - if (consume("byte")) return "byte"; - if (consume("octet")) return "octet"; - } - - function const_value() { - if (consume("true")) return { type: "boolean", value: true }; - if (consume("false")) return { type: "boolean", value: false }; - if (consume("null")) return { type: "null" }; - if (consume("Infinity")) return { type: "Infinity", negative: false }; - if (consume("-Infinity")) return { type: "Infinity", negative: true }; - if (consume("NaN")) return { type: "NaN" }; - const ret = consume(FLOAT, INT); - if (ret) return { type: "number", value: ret.value }; - } - - function type_suffix(obj) { - obj.nullable = !!consume("?"); - if (probe("?")) error("Can't nullable more than once"); + // Adding prefixes/postfixes for "unrestricted float", etc. + const name = [ + this.tokens.prefix, + this.tokens.base, + this.tokens.postfix + ].filter(t => t).map(t => t.value).join(" "); + return unescape(name); } + } - function generic_type(typeName) { - const name = consume("FrozenArray", "Promise", "sequence", "record"); - if (!name) { + class GenericType extends Type { + static parse(typeName) { + const base = consume("FrozenArray", "Promise", "sequence", "record"); + if (!base) { return; } - const ret = { generic: name.type }; - consume("<") || error(`No opening bracket after ${name.type}`); - switch (name.type) { - case "Promise": + const ret = new GenericType({ source, tokens: { base } }); + ret.tokens.open = consume("<") || error(`No opening bracket after ${base.type}`); + switch (base.type) { + case "Promise": { if (probe("[")) error("Promise type cannot have extended attribute"); - ret.idlType = return_type(typeName); + const subtype = return_type(typeName) || error("Missing Promise subtype"); + ret.subtype.push(subtype); break; + } case "sequence": - case "FrozenArray": - ret.idlType = type_with_extended_attributes(typeName); + case "FrozenArray": { + const subtype = type_with_extended_attributes(typeName) || error(`Missing ${base.type} subtype`); + ret.subtype.push(subtype); break; - case "record": + } + case "record": { if (probe("[")) error("Record key cannot have extended attribute"); - ret.idlType = []; - const keyType = consume(...stringTypes); - if (!keyType) error(`Record key must be a string type`); - ret.idlType.push(Object.assign({ type: typeName }, EMPTY_IDLTYPE, { idlType: keyType.value })); - consume(",") || error("Missing comma after record key type"); + const keyType = consume(...stringTypes) || error(`Record key must be one of: ${stringTypes.join(", ")}`); + const keyIdlType = new Type({ source, tokens: { base: keyType }}); + keyIdlType.tokens.separator = consume(",") || error("Missing comma after record key type"); + keyIdlType.type = typeName; const valueType = type_with_extended_attributes(typeName) || error("Error parsing generic type record"); - ret.idlType.push(valueType); + ret.subtype.push(keyIdlType, valueType); break; + } } - if (!ret.idlType) error(`Error parsing generic type ${name.type}`); - consume(">") || error(`Missing closing bracket after ${name.type}`); - if (name.type === "Promise" && probe("?")) { - error("Promise type cannot be nullable"); - } - type_suffix(ret); + if (!ret.idlType) error(`Error parsing generic type ${base.type}`); + ret.tokens.close = consume(">") || error(`Missing closing bracket after ${base.type}`); return ret; } - function single_type(typeName) { - const ret = Object.assign({ type: typeName || null }, EMPTY_IDLTYPE); - const generic = generic_type(typeName); - if (generic) { - return Object.assign(ret, generic); - } - const prim = primitive_type(); - let name; - if (prim) { - ret.idlType = prim; - } else if (name = consume(ID, ...stringTypes)) { - ret.idlType = name.value; - if (probe("<")) error(`Unsupported generic type ${name.value}`); - } else { + get generic() { + return this.tokens.base.value; + } + } + + function single_type(typeName) { + let ret = GenericType.parse(typeName) || primitive_type(); + if (!ret) { + const base = consume(ID, ...stringTypes); + if (!base) { return; } - type_suffix(ret); - if (ret.nullable && ret.idlType === "any") error("Type any cannot be made nullable"); - return ret; + ret = new Type({ source, tokens: { base } }); + if (probe("<")) error(`Unsupported generic type ${base.value}`); + } + if (ret.generic === "Promise" && probe("?")) { + error("Promise type cannot be nullable"); } + ret.type = typeName || null; + type_suffix(ret); + if (ret.nullable && ret.idlType === "any") error("Type `any` cannot be made nullable"); + return ret; + } - function union_type(typeName) { - if (!consume("(")) return; - const ret = Object.assign({ type: typeName || null }, EMPTY_IDLTYPE, { union: true, idlType: [] }); - do { + class UnionType extends Type { + static parse(type) { + const tokens = {}; + tokens.open = consume("("); + if (!tokens.open) return; + const ret = new UnionType({ source, tokens }); + ret.type = type || null; + while (true) { const typ = type_with_extended_attributes() || error("No type after open parenthesis or 'or' in union type"); - ret.idlType.push(typ); - } while (consume("or")); + if (typ.idlType === "any") error("Type `any` cannot be included in a union type"); + ret.subtype.push(typ); + const or = consume("or"); + if (or) { + typ.tokens.separator = or; + } + else break; + } if (ret.idlType.length < 2) { error("At least two types are expected in a union type but found less"); } - if (!consume(")")) error("Unterminated union type"); + tokens.close = consume(")") || error("Unterminated union type"); type_suffix(ret); return ret; } - function type(typeName) { - return single_type(typeName) || union_type(typeName); + get union() { + return true; } + } - function type_with_extended_attributes(typeName) { - const extAttrs = extended_attrs(); - const ret = single_type(typeName) || union_type(typeName); - if (extAttrs.length && ret) ret.extAttrs = extAttrs; - return ret; - } + function type(typeName) { + return single_type(typeName) || UnionType.parse(typeName); + } - function argument() { - const start_position = consume_position; - const ret = { optional: false, variadic: false, default: null }; - ret.extAttrs = extended_attrs(); - const opt_token = consume("optional"); - if (opt_token) { - ret.optional = true; - } + function type_with_extended_attributes(typeName) { + const extAttrs = ExtendedAttributes.parse(); + const ret = type(typeName); + if (ret) ret.extAttrs = extAttrs; + return ret; + } + + class Argument extends Base { + static parse() { + const start_position = tokeniser.position; + const tokens = {}; + const ret = new Argument({ source, tokens }); + tokens.optional = consume("optional"); ret.idlType = type_with_extended_attributes("argument-type"); if (!ret.idlType) { - unconsume(start_position); - return; + return unconsume(start_position); } - if (!ret.optional && consume("...")) { - ret.variadic = true; + if (!tokens.optional) { + tokens.variadic = consume("..."); } - const name = consume(ID, ...argumentNameKeywords); - if (!name) { - unconsume(start_position); - return; - } - ret.name = unescape(name.value); - ret.escapedName = name.value; - if (ret.optional) { - ret.default = default_() || null; + tokens.name = consume(ID, ...argumentNameKeywords); + if (!tokens.name) { + return unconsume(start_position); } + ret.default = tokens.optional ? Default.parse(tokeniser) : null; return ret; } - function argument_list() { - const ret = []; - const arg = argument(); - if (!arg) return ret; - ret.push(arg); - while (true) { - if (!consume(",")) return ret; - const nxt = argument() || error("Trailing comma in arguments list"); - ret.push(nxt); - } + get optional() { + return !!this.tokens.optional; + } + get variadic() { + return !!this.tokens.variadic; + } + get name() { + return unescape(this.tokens.name.value); } + } - function simple_extended_attr() { - const name = consume(ID); - if (!name) return; - const ret = { - name: name.value, - arguments: null, - type: "extended-attribute", - rhs: null - }; - const eq = consume("="); - if (eq) { - ret.rhs = consume(ID, FLOAT, INT, STR); - if (ret.rhs) { - // No trivia exposure yet - ret.rhs.trivia = undefined; - } + function argument_list() { + return list(tokeniser, { parser: Argument.parse, listName: "arguments list" }); + } + + function identifiers() { + const ids = list(tokeniser, { parser: Token.parser(tokeniser, ID), listName: "identifier list" }); + if (!ids.length) { + error("Expected identifiers but none found"); + } + return ids; + } + + class ExtendedAttributeParameters extends Base { + static parse() { + const tokens = { assign: consume("=") }; + const ret = new ExtendedAttributeParameters({ source, tokens }); + if (tokens.assign) { + tokens.secondaryName = consume(ID, DECIMAL, INT, STR); } - if (consume("(")) { - if (eq && !ret.rhs) { + tokens.open = consume("("); + if (tokens.open) { + ret.list = ret.rhsType === "identifier-list" ? // [Exposed=(Window,Worker)] - ret.rhs = { - type: "identifier-list", - value: identifiers() - }; - } - else { + identifiers() : // [NamedConstructor=Audio(DOMString src)] or [Constructor(DOMString str)] - ret.arguments = argument_list(); - } - consume(")") || error("Unexpected token in extended attribute argument list"); + argument_list(); + tokens.close = consume(")") || error("Unexpected token in extended attribute argument list"); + } else if (ret.hasRhs && !tokens.secondaryName) { + error("No right hand side to extended attribute assignment"); } - if (eq && !ret.rhs) error("No right hand side to extended attribute assignment"); return ret; } - // Note: we parse something simpler than the official syntax. It's all that ever - // seems to be used - function extended_attrs() { - const eas = []; - if (!consume("[")) return eas; - eas[0] = simple_extended_attr() || error("Extended attribute with not content"); - while (consume(",")) { - eas.push(simple_extended_attr() || error("Trailing comma in extended attribute")); - } - consume("]") || error("No end of extended attribute"); - return eas; - } - - function default_() { - if (consume("=")) { - const def = const_value(); - if (def) { - return def; - } else if (consume("[")) { - if (!consume("]")) error("Default sequence value must be empty"); - return { type: "sequence", value: [] }; - } else { - const str = consume(STR) || error("No value for default"); - str.value = str.value.slice(1, -1); - // No trivia exposure yet - str.trivia = undefined; - return str; - } - } + get rhsType() { + return !this.tokens.assign ? null : + !this.tokens.secondaryName ? "identifier-list" : + this.tokens.secondaryName.type; } + } - function const_() { - if (!consume("const")) return; - const ret = { type: "const", nullable: false }; - let typ = primitive_type(); - if (!typ) { - typ = consume(ID) || error("No type for const"); - typ = typ.value; + class SimpleExtendedAttribute extends Base { + static parse() { + const name = consume(ID); + if (name) { + return new SimpleExtendedAttribute({ + tokens: { name }, + params: ExtendedAttributeParameters.parse() + }); } - ret.idlType = Object.assign({ type: "const-type" }, EMPTY_IDLTYPE, { idlType: typ }); - type_suffix(ret); - const name = consume(ID) || error("No name for const"); - ret.name = name.value; - consume("=") || error("No value assignment for const"); - const cnt = const_value(); - if (cnt) ret.value = cnt; - else error("No value for const"); - consume(";") || error("Unterminated const"); - return ret; } - function inheritance() { - if (consume(":")) { - const inh = consume(ID) || error("No type in inheritance"); - return inh.value; + constructor({ source, tokens, params }) { + super({ source, tokens }); + Object.defineProperty(this, "params", { value: params }); + } + + get type() { + return "extended-attribute"; + } + get name() { + return this.tokens.name.value; + } + get rhs() { + const { rhsType: type, tokens, list } = this.params; + if (!type) { + return null; + } + const value = type === "identifier-list" ? list : tokens.secondaryName.value; + return { type, value }; + } + get arguments() { + const { rhsType, list } = this.params; + if (!list || rhsType === "identifier-list") { + return []; } + return list; } + } - function operation_rest(ret) { - if (!ret) ret = {}; - const name = consume(ID); - ret.name = name ? unescape(name.value) : null; - ret.escapedName = name ? name.value : null; - consume("(") || error("Invalid operation"); - ret.arguments = argument_list(); - consume(")") || error("Unterminated operation"); - consume(";") || error("Unterminated operation"); + // Note: we parse something simpler than the official syntax. It's all that ever + // seems to be used + class ExtendedAttributes extends Base { + static parse() { + const tokens = {}; + tokens.open = consume("["); + if (!tokens.open) return null; + const ret = new ExtendedAttributes({ source, tokens }); + ret.items = list(tokeniser, { + parser: SimpleExtendedAttribute.parse, + listName: "extended attribute" + }); + tokens.close = consume("]") || error("Unexpected form of extended attribute"); + if (!ret.items.length) { + error("Found an empty extended attribute"); + } return ret; } + } - function callback() { - let ret; - if (!consume("callback")) return; - const tok = consume("interface"); - if (tok) { - ret = interface_rest(false, "callback interface"); - return ret; + class Constant extends Base { + static parse() { + const tokens = {}; + tokens.base = consume("const"); + if (!tokens.base) { + return; } - const name = consume(ID) || error("No name for callback"); - ret = current = { type: "callback", name: sanitize_name(name.value, "callback") }; - consume("=") || error("No assignment in callback"); + let idlType = primitive_type(); + if (!idlType) { + const base = consume(ID) || error("No type for const"); + idlType = new Type({ source, tokens: { base } }); + } + if (probe("?")) { + error("Unexpected nullable constant type"); + } + idlType.type = "const-type"; + tokens.name = consume(ID) || error("No name for const"); + tokens.assign = consume("=") || error("No value assignment for const"); + tokens.value = const_value(tokeniser) || error("No value for const"); + tokens.termination = consume(";") || error("Unterminated const"); + const ret = new Constant({ source, tokens }); + ret.idlType = idlType; + return ret; + } + + get type() { + return "const"; + } + get name() { + return unescape(this.tokens.name.value); + } + get value() { + return const_data(this.tokens.value); + } + } + + class CallbackFunction extends Base { + static parse(base) { + const tokens = { base }; + const ret = new CallbackFunction({ source, tokens }); + tokens.name = consume(ID) || error("No name for callback"); + tokeniser.current = ret; + tokens.assign = consume("=") || error("No assignment in callback"); ret.idlType = return_type() || error("Missing return type"); - consume("(") || error("No arguments in callback"); + tokens.open = consume("(") || error("No arguments in callback"); ret.arguments = argument_list(); - consume(")") || error("Unterminated callback"); - consume(";") || error("Unterminated callback"); + tokens.close = consume(")") || error("Unterminated callback"); + tokens.termination = consume(";") || error("Unterminated callback"); return ret; } - function attribute({ noInherit = false, readonly = false } = {}) { - const start_position = consume_position; - const ret = { - type: "attribute", - static: false, - stringifier: false, - inherit: false, - readonly: false - }; - if (!noInherit && consume("inherit")) { - ret.inherit = true; - } - if (consume("readonly")) { - ret.readonly = true; - } else if (readonly && probe("attribute")) { + get type() { + return "callback"; + } + get name() { + return unescape(this.tokens.name.value); + } + } + + function callback() { + const callback = consume("callback"); + if (!callback) return; + const tok = consume("interface"); + if (tok) { + return Interface.parse(tok, { callback }); + } + return CallbackFunction.parse(callback); + } + + class Attribute extends Base { + static parse({ special, noInherit = false, readonly = false } = {}) { + const start_position = tokeniser.position; + const tokens = { special }; + const ret = new Attribute({ source, tokens }); + if (!special && !noInherit) { + tokens.special = consume("inherit"); + } + tokens.readonly = consume("readonly"); + if (readonly && !tokens.readonly && probe("attribute")) { error("Attributes must be readonly in this context"); } - const rest = attribute_rest(ret); - if (!rest) { + tokens.base = consume("attribute"); + if (!tokens.base) { unconsume(start_position); - } - return rest; - } - - function attribute_rest(ret) { - if (!consume("attribute")) { return; } ret.idlType = type_with_extended_attributes("attribute-type") || error("No type in attribute"); - if (ret.idlType.generic === "sequence") error("Attributes cannot accept sequence types"); - if (ret.idlType.generic === "record") error("Attributes cannot accept record types"); - const name = consume(ID, "required") || error("No name in attribute"); - ret.name = unescape(name.value); - ret.escapedName = name.value; - consume(";") || error("Unterminated attribute"); + switch (ret.idlType.generic) { + case "sequence": + case "record": error(`Attributes cannot accept ${ret.idlType.generic} types`); + } + tokens.name = consume(ID, "required") || error("No name in attribute"); + tokens.termination = consume(";") || error("Unterminated attribute"); return ret; } - function return_type(typeName) { - const typ = type(typeName || "return-type"); - if (typ) { - return typ; - } - if (consume("void")) { - return Object.assign({ type: "return-type" }, EMPTY_IDLTYPE, { idlType: "void" }); + get type() { + return "attribute"; + } + get special() { + if (!this.tokens.special) { + return ""; } + return this.tokens.special.value; } + get readonly() { + return !!this.tokens.readonly; + } + get name() { + return unescape(this.tokens.name.value); + } + } - function operation({ regular = false } = {}) { - const ret = Object.assign({}, EMPTY_OPERATION); - while (!regular) { - if (consume("getter")) ret.getter = true; - else if (consume("setter")) ret.setter = true; - else if (consume("deleter")) ret.deleter = true; - else break; - } - ret.idlType = return_type() || error("Missing return type"); - operation_rest(ret); + function return_type(typeName) { + const typ = type(typeName || "return-type"); + if (typ) { + return typ; + } + const voidToken = consume("void"); + if (voidToken) { + const ret = new Type({ source, tokens: { base: voidToken } }); + ret.type = "return-type"; return ret; } + } - function static_member() { - if (!consume("static")) return; - const member = attribute({ noInherit: true }) || - operation({ regular: true }) || - error("No body in static member"); - member.static = true; - return member; + class OperationBody extends Base { + static parse() { + const tokens = {}; + const ret = new OperationBody({ source, tokens }); + ret.idlType = return_type() || error("Missing return type"); + tokens.name = consume(ID); + tokens.open = consume("(") || error("Invalid operation"); + ret.arguments = argument_list(); + tokens.close = consume(")") || error("Unterminated operation"); + return ret; } - function stringifier() { - if (!consume("stringifier")) return; - if (consume(";")) { - return Object.assign({}, EMPTY_OPERATION, { stringifier: true }); + get name() { + const { name } = this.tokens; + if (!name) { + return ""; } - const member = attribute({ noInherit: true }) || - operation({ regular: true }) || - error("Unterminated stringifier"); - member.stringifier = true; - return member; + return unescape(name.value); } + } - function identifiers() { - const arr = []; - const id = consume(ID); - if (id) { - arr.push(id.value); + class Operation extends Base { + static parse({ special, regular } = {}) { + const tokens = { special }; + const ret = new Operation({ source, tokens }); + if (special && special.value === "stringifier") { + tokens.termination = consume(";"); + if (tokens.termination) { + ret.body = null; + return ret; + } } - else error("Expected identifiers but not found"); - while (true) { - if (consume(",")) { - const name = consume(ID) || error("Trailing comma in identifiers list"); - arr.push(name.value); - } else break; + if (!special && !regular) { + tokens.special = consume("getter", "setter", "deleter"); } - return arr; + ret.body = OperationBody.parse(); + tokens.termination = consume(";") || error("Unterminated attribute"); + return ret; } - function iterable_type() { - if (consume("iterable")) return "iterable"; - else if (consume("legacyiterable")) return "legacyiterable"; - else if (consume("maplike")) return "maplike"; - else if (consume("setlike")) return "setlike"; - else return; + get type() { + return "operation"; } - - function readonly_iterable_type() { - if (consume("maplike")) return "maplike"; - else if (consume("setlike")) return "setlike"; - else return; + get name() { + return (this.body && this.body.name) || ""; } - - function iterable() { - const start_position = consume_position; - const ret = { type: null, idlType: null, readonly: false }; - if (consume("readonly")) { - ret.readonly = true; + get special() { + if (!this.tokens.special) { + return ""; } - const consumeItType = ret.readonly ? readonly_iterable_type : iterable_type; + return this.tokens.special.value; + } + } - const ittype = consumeItType(); - if (!ittype) { + function static_member() { + const special = consume("static"); + if (!special) return; + const member = Attribute.parse({ special }) || + Operation.parse({ special }) || + error("No body in static member"); + return member; + } + + function stringifier() { + const special = consume("stringifier"); + if (!special) return; + const member = Attribute.parse({ special }) || + Operation.parse({ special }) || + error("Unterminated stringifier"); + return member; + } + + class IterableLike extends Base { + static parse() { + const start_position = tokeniser.position; + const tokens = {}; + const ret = new IterableLike({ source, tokens }); + tokens.readonly = consume("readonly"); + tokens.base = tokens.readonly ? + consume("maplike", "setlike") : + consume("iterable", "maplike", "setlike"); + if (!tokens.base) { unconsume(start_position); return; } - const secondTypeRequired = ittype === "maplike"; - const secondTypeAllowed = secondTypeRequired || ittype === "iterable"; - ret.type = ittype; - if (ret.type !== 'maplike' && ret.type !== 'setlike') - delete ret.readonly; - if (consume("<")) { - ret.idlType = [type_with_extended_attributes()] || error(`Error parsing ${ittype} declaration`); - if (secondTypeAllowed) { - if (consume(",")) { - ret.idlType.push(type_with_extended_attributes()); - } - else if (secondTypeRequired) - error(`Missing second type argument in ${ittype} declaration`); + const { type } = ret; + const secondTypeRequired = type === "maplike"; + const secondTypeAllowed = secondTypeRequired || type === "iterable"; + + tokens.open = consume("<") || error(`Error parsing ${type} declaration`); + const first = type_with_extended_attributes() || error(`Error parsing ${type} declaration`); + ret.idlType = [first]; + if (secondTypeAllowed) { + first.tokens.separator = consume(","); + if (first.tokens.separator) { + ret.idlType.push(type_with_extended_attributes()); } - if (!consume(">")) error(`Unterminated ${ittype} declaration`); - if (!consume(";")) error(`Missing semicolon after ${ittype} declaration`); - } else - error(`Error parsing ${ittype} declaration`); + else if (secondTypeRequired) + error(`Missing second type argument in ${type} declaration`); + } + tokens.close = consume(">") || error(`Unterminated ${type} declaration`); + tokens.termination = consume(";") || error(`Missing semicolon after ${type} declaration`); return ret; } - function interface_rest(isPartial, typeName = "interface") { - const name = consume(ID) || error("No name for interface"); - const mems = []; - const ret = current = { - type: typeName, - name: isPartial ? name.value : sanitize_name(name.value, "interface"), - partial: isPartial, - members: mems - }; - if (!isPartial) ret.inheritance = inheritance() || null; - consume("{") || error("Bodyless interface"); - while (true) { - if (consume("}")) { - consume(";") || error("Missing semicolon after interface"); - return ret; - } - const ea = extended_attrs(); - const mem = const_() || - static_member() || - stringifier() || - iterable() || - attribute() || - operation() || - error("Unknown member"); - mem.extAttrs = ea; - ret.members.push(mem); - } + get type() { + return this.tokens.base.value; + } + get readonly() { + return !!this.tokens.readonly; } + } - function mixin_rest(isPartial) { - if (!consume("mixin")) return; - const name = consume(ID) || error("No name for interface mixin"); - const mems = []; - const ret = current = { - type: "interface mixin", - name: isPartial ? name.value : sanitize_name(name.value, "interface mixin"), - partial: isPartial, - members: mems - }; - consume("{") || error("Bodyless interface mixin"); - while (true) { - if (consume("}")) { - consume(";") || error("Missing semicolon after interface mixin"); - return ret; - } - const ea = extended_attrs(); - const mem = const_() || - stringifier() || - attribute({ noInherit: true }) || - operation({ regular: true }) || - error("Unknown member"); - mem.extAttrs = ea; - ret.members.push(mem); + class Inheritance extends Base { + static parse() { + const colon = consume(":"); + if (!colon) { + return; } + const name = consume(ID) || error("No type in inheritance"); + return new Inheritance({ source, tokens: { colon, name } }); } - function interface_(isPartial) { - if (!consume("interface")) return; - return mixin_rest(isPartial) || - interface_rest(isPartial) || - error("Interface has no proper body"); + get name() { + return unescape(this.tokens.name.value); } + } - function namespace(isPartial) { - if (!consume("namespace")) return; - const name = consume(ID) || error("No name for namespace"); - const mems = []; - const ret = current = { - type: "namespace", - name: isPartial ? name.value : sanitize_name(name.value, "namespace"), - partial: isPartial, - members: mems - }; - consume("{") || error("Bodyless namespace"); + class Container extends Base { + static parse(instance, { type, inheritable, allowedMembers }) { + const { tokens } = instance; + tokens.name = consume(ID) || error("No name for interface"); + tokeniser.current = instance; + if (inheritable) { + instance.inheritance = Inheritance.parse() || null; + } + tokens.open = consume("{") || error(`Bodyless ${type}`); + instance.members = []; while (true) { - if (consume("}")) { - consume(";") || error("Missing semicolon after namespace"); - return ret; + tokens.close = consume("}"); + if (tokens.close) { + tokens.termination = consume(";") || error(`Missing semicolon after ${type}`); + return instance; } - const ea = extended_attrs(); - const mem = attribute({ noInherit: true, readonly: true }) || - operation({ regular: true }) || + const ea = ExtendedAttributes.parse(); + let mem; + for (const [parser, ...args] of allowedMembers) { + mem = parser(...args); + if (mem) { + break; + } + } + if (!mem) { error("Unknown member"); + } mem.extAttrs = ea; - ret.members.push(mem); + instance.members.push(mem); } } - function partial() { - if (!consume("partial")) return; - const thing = dictionary(true) || - interface_(true) || - namespace(true) || - error("Partial doesn't apply to anything"); - return thing; + get partial() { + return !!this.tokens.partial; + } + get name() { + return unescape(this.tokens.name.value); } + } - function dictionary(isPartial) { - if (!consume("dictionary")) return; - const name = consume(ID) || error("No name for dictionary"); - const mems = []; - const ret = current = { - type: "dictionary", - name: isPartial ? name.value : sanitize_name(name.value, "dictionary"), - partial: isPartial, - members: mems - }; - if (!isPartial) ret.inheritance = inheritance() || null; - consume("{") || error("Bodyless dictionary"); - while (true) { - if (consume("}")) { - consume(";") || error("Missing semicolon after dictionary"); - return ret; - } - const ea = extended_attrs(); - const required = consume("required"); - const typ = type_with_extended_attributes("dictionary-type") || error("No type for dictionary member"); - const name = consume(ID) || error("No name for dictionary member"); - const dflt = default_() || null; - if (required && dflt) error("Required member must not have a default"); - const member = { - type: "field", - name: unescape(name.value), - escapedName: name.value, - required: !!required, - idlType: typ, - extAttrs: ea, - default: dflt - }; - ret.members.push(member); - consume(";") || error("Unterminated dictionary member"); - } - } - - function enum_() { - if (!consume("enum")) return; - const name = consume(ID) || error("No name for enum"); - const vals = []; - const ret = current = { - type: "enum", - name: sanitize_name(name.value, "enum"), - values: vals - }; - consume("{") || error("No curly for enum"); - let value_expected = true; - while (true) { - if (consume("}")) { - if (!ret.values.length) error("No value in enum"); - consume(";") || error("No semicolon after enum"); - return ret; - } - else if (!value_expected) { - error("No comma between enum values"); - } - const val = consume(STR) || error("Unexpected value in enum"); - val.value = val.value.slice(1, -1); - // No trivia exposure yet - val.trivia = undefined; - ret.values.push(val); - value_expected = !!consume(","); + class Interface extends Container { + static parse(base, { callback = null, partial = null } = {}) { + const tokens = { callback, partial, base }; + return Container.parse(new Interface({ source, tokens }), { + type: "interface", + inheritable: !partial, + allowedMembers: [ + [Constant.parse], + [static_member], + [stringifier], + [IterableLike.parse], + [Attribute.parse], + [Operation.parse] + ] + }); + } + + get type() { + if (this.tokens.callback) { + return "callback interface"; + } + return "interface"; + } + } + + class Mixin extends Container { + static parse(base, { partial } = {}) { + const tokens = { partial, base }; + tokens.mixin = consume("mixin"); + if (!tokens.mixin) { + return; } + return Container.parse(new Mixin({ source, tokens }), { + type: "interface mixin", + allowedMembers: [ + [Constant.parse], + [stringifier], + [Attribute.parse, { noInherit: true }], + [Operation.parse, { regular: true }] + ] + }); } - function typedef() { - if (!consume("typedef")) return; - const ret = { - type: "typedef" - }; - ret.idlType = type_with_extended_attributes("typedef-type") || error("No type in typedef"); - const name = consume(ID) || error("No name in typedef"); - ret.name = sanitize_name(name.value, "typedef"); - current = ret; - consume(";") || error("Unterminated typedef"); - return ret; + get type() { + return "interface mixin"; } + } - function implements_() { - const start_position = consume_position; - const target = consume(ID); - if (!target) return; - if (consume("implements")) { - const ret = { - type: "implements", - target: target.value - }; - const imp = consume(ID) || error("Incomplete implements statement"); - ret.implements = imp.value; - consume(";") || error("No terminating ; for implements statement"); - return ret; - } else { - // rollback - unconsume(start_position); + function interface_(opts) { + const base = consume("interface"); + if (!base) return; + const ret = Mixin.parse(base, opts) || + Interface.parse(base, opts) || + error("Interface has no proper body"); + return ret; + } + + class Namespace extends Container { + static parse({ partial } = {}) { + const tokens = { partial }; + tokens.base = consume("namespace"); + if (!tokens.base) { + return; } + return Container.parse(new Namespace({ source, tokens }), { + type: "namespace", + allowedMembers: [ + [Attribute.parse, { noInherit: true, readonly: true }], + [Operation.parse, { regular: true }] + ] + }); } - function includes() { - const start_position = consume_position; - const target = consume(ID); - if (!target) return; - if (consume("includes")) { - const ret = { - type: "includes", - target: target.value - }; - const imp = consume(ID) || error("Incomplete includes statement"); - ret.includes = imp.value; - consume(";") || error("No terminating ; for includes statement"); - return ret; - } else { - // rollback - unconsume(start_position); + get type() { + return "namespace"; + } + } + + function partial() { + const partial = consume("partial"); + if (!partial) return; + return Dictionary.parse({ partial }) || + interface_({ partial }) || + Namespace.parse({ partial }) || + error("Partial doesn't apply to anything"); + } + + class Dictionary extends Container { + static parse({ partial } = {}) { + const tokens = { partial }; + tokens.base = consume("dictionary"); + if (!tokens.base) { + return; } + return Container.parse(new Dictionary({ source, tokens }), { + type: "dictionary", + inheritable: !partial, + allowedMembers: [ + [Field.parse], + ] + }); } - function definition() { - return callback() || - interface_(false) || - partial() || - dictionary(false) || - enum_() || - typedef() || - implements_() || - includes() || - namespace(false); + get type() { + return "dictionary"; } + } - function definitions() { - if (!tokens.length) return []; - const defs = []; - while (true) { - const ea = extended_attrs(); - const def = definition(); - if (!def) { - if (ea.length) error("Stray extended attributes"); - break; - } - def.extAttrs = ea; - defs.push(def); - } - return defs; + class Field extends Base { + static parse() { + const tokens = {}; + const ret = new Field({ source, tokens }); + ret.extAttrs = ExtendedAttributes.parse(); + tokens.required = consume("required"); + ret.idlType = type_with_extended_attributes("dictionary-type") || error("No type for dictionary member"); + tokens.name = consume(ID) || error("No name for dictionary member"); + ret.default = Default.parse(tokeniser); + if (tokens.required && ret.default) error("Required member must not have a default"); + tokens.termination = consume(";") || error("Unterminated dictionary member"); + return ret; + } + + get type() { + return "field"; + } + get name() { + return unescape(this.tokens.name.value); + } + get required() { + return !!this.tokens.required; } - const res = definitions(); - if (consume_position < tokens.length) error("Unrecognised tokens"); - return res; } - const obj = { - parse(str) { - const tokens = tokenise(str); - return parse(tokens); + class Typedef extends Base { + static parse() { + const tokens = {}; + const ret = new Typedef({ source, tokens }); + tokens.base = consume("typedef"); + if (!tokens.base) { + return; + } + ret.idlType = type_with_extended_attributes("typedef-type") || error("No type in typedef"); + tokens.name = consume(ID) || error("No name in typedef"); + tokeniser.current = ret; + tokens.termination = consume(";") || error("Unterminated typedef"); + return ret; + } + + get type() { + return "typedef"; + } + get name() { + return unescape(this.tokens.name.value); } - }; + } + + function definition() { + return callback() || + interface_() || + partial() || + Dictionary.parse() || + Enum.parse(tokeniser) || + Typedef.parse() || + Includes.parse(tokeniser) || + Namespace.parse(); + } - if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { - module.exports = obj; - } else if (typeof define === 'function' && define.amd) { - define([], () => obj); - } else { - (self || window).WebIDL2 = obj; + function definitions() { + if (!source.length) return []; + const defs = []; + while (true) { + const ea = ExtendedAttributes.parse(); + const def = definition(); + if (!def) { + if (ea) error("Stray extended attributes"); + break; + } + def.extAttrs = ea; + defs.push(def); + } + defs.push(consume("eof")); + return defs; } -})(); + const res = definitions(); + if (tokeniser.position < source.length) error("Unrecognised tokens"); + return res; +} + +export function parse(str) { + const tokeniser = new Tokeniser(str); + return parseByTokens(tokeniser); +} diff --git a/lib/writer.js b/lib/writer.js index b3097a6f8a74e4..3ee66418bf8ded 100644 --- a/lib/writer.js +++ b/lib/writer.js @@ -1,221 +1,302 @@ "use strict"; -(() => { - function write(ast, opt = {}) { - const noop = str => str; - const optNames = "type".split(" "); - const context = []; - for (const o of optNames) { - if (!opt[o]) opt[o] = noop; - } +function noop(arg) { + return arg; +} - function literal(it) { - return it.value; - }; - function type(it) { - if (typeof it === "string") return opt.type(it); // XXX should maintain some context - let ret = extended_attributes(it.extAttrs); - if (it.union) ret += `(${it.idlType.map(type).join(" or ")})`; - else { - if (it.generic) ret += `${it.generic}<`; - if (Array.isArray(it.idlType)) ret += it.idlType.map(type).join(", "); - else ret += type(it.idlType); - if (it.generic) ret += ">"; - } - if (it.nullable) ret += "?"; +const templates = { + wrap: items => items.join(""), + trivia: noop, + name: noop, + reference: noop, + type: noop, + generic: noop, + inheritance: noop, + definition: noop, + extendedAttribute: noop, + extendedAttributeReference: noop +}; - return ret; - }; - function const_value(it) { - const tp = it.type; - if (tp === "boolean") return it.value ? "true" : "false"; - else if (tp === "null") return "null"; - else if (tp === "Infinity") return (it.negative ? "-" : "") + "Infinity"; - else if (tp === "NaN") return "NaN"; - else if (tp === "number") return it.value; - else if (tp === "sequence") return "[]"; - else return `"${it.value}"`; - }; - function argument(arg) { - let ret = extended_attributes(arg.extAttrs); - if (arg.optional) ret += "optional "; - ret += type(arg.idlType); - if (arg.variadic) ret += "..."; - ret += ` ${arg.escapedName}`; - if (arg.default) ret += ` = ${const_value(arg.default)}`; - return ret; - }; - function make_ext_at(it) { - context.unshift(it); - let ret = it.name; - if (it.rhs) { - if (it.rhs.type === "identifier-list") ret += `=(${it.rhs.value.join(",")})`; - else ret += `=${it.rhs.value}`; - } - if (it.arguments) ret += `(${it.arguments.length ? it.arguments.map(argument).join(",") : ""})`; - context.shift(); // XXX need to add more contexts, but not more than needed for ReSpec - return ret; - }; - function extended_attributes(eats) { - if (!eats || !eats.length) return ""; - return `[${eats.map(make_ext_at).join(", ")}]`; - }; +export function write(ast, { templates: ts = templates } = {}) { + ts = Object.assign({}, templates, ts); - const modifiers = "getter setter deleter stringifier static".split(" "); - function operation(it) { - let ret = extended_attributes(it.extAttrs); - if (it.stringifier && !it.idlType) return "stringifier;"; - for (const mod of modifiers) { - if (it[mod]) ret += mod + " "; - } - ret += type(it.idlType) + " "; - if (it.name) ret += it.escapedName; - ret += `(${it.arguments.map(argument).join(",")});`; - return ret; - }; + function reference(raw, unescaped) { + return ts.reference(raw, unescaped || raw); + } - function attribute(it) { - let ret = extended_attributes(it.extAttrs); - if (it.static) ret += "static "; - if (it.stringifier) ret += "stringifier "; - if (it.inherit) ret += "inherit "; - if (it.readonly) ret += "readonly "; - ret += `attribute ${type(it.idlType)} ${it.escapedName};`; - return ret; - }; + function token(t, wrapper = noop, ...args) { + if (!t) { + return ""; + } + const value = wrapper(t.value, ...args); + return ts.wrap([ts.trivia(t.trivia), value]); + } - function interface_(it) { - let ret = extended_attributes(it.extAttrs); - if (it.partial) ret += "partial "; - ret += `interface ${it.name} `; - if (it.inheritance) ret += `: ${it.inheritance} `; - ret += `{${iterate(it.members)}};`; - return ret; - }; + function reference_token(t, unescaped) { + return token(t, reference, unescaped); + } - function interface_mixin(it) { - let ret = extended_attributes(it.extAttrs); - if (it.partial) ret += "partial "; - ret += `interface mixin ${it.name} `; - ret += `{${iterate(it.members)}};`; - return ret; - } + function name_token(t, arg) { + return token(t, ts.name, arg); + } - function namespace(it) { - let ret = extended_attributes(it.extAttrs); - if (it.partial) ret += "partial "; - ret += `namespace ${it.name} `; - ret += `{${iterate(it.members)}};`; - return ret; + function type_body(it) { + if (it.union || it.generic) { + return ts.wrap([ + token(it.tokens.base, ts.generic), + token(it.tokens.open), + ...it.subtype.map(type), + token(it.tokens.close) + ]); + } + const firstToken = it.tokens.prefix || it.tokens.base; + const prefix = it.tokens.prefix ? [ + it.tokens.prefix.value, + ts.trivia(it.tokens.base.trivia) + ] : []; + const ref = reference(ts.wrap([ + ...prefix, + it.tokens.base.value, + token(it.tokens.postfix) + ]), it.idlType); + return ts.wrap([ts.trivia(firstToken.trivia), ref]); + } + function type(it) { + return ts.wrap([ + extended_attributes(it.extAttrs), + type_body(it), + token(it.tokens.nullable), + token(it.tokens.separator) + ]); + } + function default_(def) { + if (!def) { + return ""; } + return ts.wrap([ + token(def.tokens.assign), + ...def.expression.map(t => token(t)) + ]); + } + function argument(arg) { + return ts.wrap([ + extended_attributes(arg.extAttrs), + token(arg.tokens.optional), + ts.type(type(arg.idlType)), + token(arg.tokens.variadic), + name_token(arg.tokens.name, { data: arg }), + default_(arg.default), + token(arg.tokens.separator) + ]); + } + function identifier(id) { + return ts.wrap([ + reference_token(id.tokens.value), + token(id.tokens.separator) + ]); + } + function make_ext_at(it) { + const { rhsType } = it.params; + return ts.wrap([ + ts.trivia(it.tokens.name.trivia), + ts.extendedAttribute(ts.wrap([ + ts.extendedAttributeReference(it.name), + token(it.params.tokens.assign), + reference_token(it.params.tokens.secondaryName), + token(it.params.tokens.open), + ...!it.params.list ? [] : + it.params.list.map( + rhsType === "identifier-list" ? identifier : argument + ), + token(it.params.tokens.close) + ])), + token(it.tokens.separator) + ]); + } + function extended_attributes(eats) { + if (!eats) return ""; + return ts.wrap([ + token(eats.tokens.open), + ...eats.items.map(make_ext_at), + token(eats.tokens.close) + ]); + } - function dictionary(it) { - let ret = extended_attributes(it.extAttrs); - if (it.partial) ret += "partial "; - ret += `dictionary ${it.name} `; - if (it.inheritance) ret += `: ${it.inheritance} `; - ret += `{${iterate(it.members)}};`; - return ret; - }; - function field(it) { - let ret = extended_attributes(it.extAttrs); - if (it.required) ret += "required "; - ret += `${type(it.idlType)} ${it.escapedName}`; - if (it.default) ret += ` = ${const_value(it.default)}`; - ret += ";"; - return ret; - }; - function const_(it) { - const ret = extended_attributes(it.extAttrs); - return `${ret}const ${type(it.idlType)}${it.nullable ? "?" : ""} ${it.name} = ${const_value(it.value)};`; - }; - function typedef(it) { - let ret = extended_attributes(it.extAttrs); - ret += `typedef ${extended_attributes(it.typeExtAttrs)}`; - return `${ret}${type(it.idlType)} ${it.name};`; - }; - function implements_(it) { - const ret = extended_attributes(it.extAttrs); - return `${ret}${it.target} implements ${it.implements};`; - }; - function includes(it) { - const ret = extended_attributes(it.extAttrs); - return `${ret}${it.target} includes ${it.includes};`; - }; - function callback(it) { - const ret = extended_attributes(it.extAttrs); - return `${ret}callback ${it.name} = ${type(it.idlType)}(${it.arguments.map(argument).join(",")});`; - }; - function enum_(it) { - let ret = extended_attributes(it.extAttrs); - ret += `enum ${it.name} {`; - for (const v of it.values) { - ret += `"${v.value}",`; - } - return ret + "};"; - }; - function iterable(it) { - return `iterable<${Array.isArray(it.idlType) ? it.idlType.map(type).join(", ") : type(it.idlType)}>;`; - }; - function legacyiterable(it) { - return `legacyiterable<${Array.isArray(it.idlType) ? it.idlType.map(type).join(", ") : type(it.idlType)}>;`; - }; - function maplike(it) { - return `${it.readonly ? "readonly " : ""}maplike<${it.idlType.map(type).join(", ")}>;`; - }; - function setlike(it) { - return `${it.readonly ? "readonly " : ""}setlike<${type(it.idlType[0])}>;`; - }; - function callbackInterface(it) { - return `callback ${interface_(it)}`; - }; + function operation(it, parent) { + const body = it.body ? [ + ts.type(type(it.body.idlType)), + name_token(it.body.tokens.name, { data: it, parent }), + token(it.body.tokens.open), + ts.wrap(it.body.arguments.map(argument)), + token(it.body.tokens.close), + ] : []; + return ts.definition(ts.wrap([ + extended_attributes(it.extAttrs), + token(it.tokens.special), + ...body, + token(it.tokens.termination) + ]), { data: it, parent }); + } - const table = { - interface: interface_, - "interface mixin": interface_mixin, - namespace, - operation, - attribute, - dictionary, - field, - const: const_, - typedef, - implements: implements_, - includes, - callback, - enum: enum_, - iterable, - legacyiterable, - maplike, - setlike, - "callback interface": callbackInterface - }; - function dispatch(it) { - const dispatcher = table[it.type]; - if (!dispatcher) { - throw new Error(`Type "${it.type}" is unsupported`) - } - return table[it.type](it); - }; - function iterate(things) { - if (!things) return; - let ret = ""; - for (const thing of things) ret += dispatch(thing); - return ret; - }; - return iterate(ast); - }; + function attribute(it, parent) { + return ts.definition(ts.wrap([ + extended_attributes(it.extAttrs), + token(it.tokens.special), + token(it.tokens.readonly), + token(it.tokens.base), + ts.type(type(it.idlType)), + name_token(it.tokens.name, { data: it, parent }), + token(it.tokens.termination) + ]), { data: it, parent }); + } + function inheritance(inh) { + if (!inh) { + return ""; + } + return ts.wrap([ + token(inh.tokens.colon), + ts.trivia(inh.tokens.name.trivia), + ts.inheritance(reference(inh.tokens.name.value, inh.name)) + ]); + } - const obj = { - write - }; + function container(it) { + return ts.definition(ts.wrap([ + extended_attributes(it.extAttrs), + token(it.tokens.callback), + token(it.tokens.partial), + token(it.tokens.base), + token(it.tokens.mixin), + name_token(it.tokens.name, { data: it }), + inheritance(it.inheritance), + token(it.tokens.open), + iterate(it.members, it), + token(it.tokens.close), + token(it.tokens.termination) + ]), { data: it }); + } + + function field(it, parent) { + return ts.definition(ts.wrap([ + extended_attributes(it.extAttrs), + token(it.tokens.required), + ts.type(type(it.idlType)), + name_token(it.tokens.name, { data: it, parent }), + default_(it.default), + token(it.tokens.termination) + ]), { data: it, parent }); + } + function const_(it, parent) { + return ts.definition(ts.wrap([ + extended_attributes(it.extAttrs), + token(it.tokens.base), + ts.type(type(it.idlType)), + name_token(it.tokens.name, { data: it, parent }), + token(it.tokens.assign), + token(it.tokens.value), + token(it.tokens.termination) + ]), { data: it, parent }); + } + function typedef(it) { + return ts.definition(ts.wrap([ + extended_attributes(it.extAttrs), + token(it.tokens.base), + ts.type(type(it.idlType)), + name_token(it.tokens.name, { data: it }), + token(it.tokens.termination) + ]), { data: it }); + } + function includes(it) { + return ts.definition(ts.wrap([ + extended_attributes(it.extAttrs), + reference_token(it.tokens.target, it.target), + token(it.tokens.includes), + reference_token(it.tokens.mixin, it.includes), + token(it.tokens.termination) + ]), { data: it }); + } + function callback(it) { + return ts.definition(ts.wrap([ + extended_attributes(it.extAttrs), + token(it.tokens.base), + name_token(it.tokens.name, { data: it }), + token(it.tokens.assign), + ts.type(type(it.idlType)), + token(it.tokens.open), + ...it.arguments.map(argument), + token(it.tokens.close), + token(it.tokens.termination), + ]), { data: it }); + } + function enum_(it) { + return ts.definition(ts.wrap([ + extended_attributes(it.extAttrs), + token(it.tokens.base), + name_token(it.tokens.name, { data: it }), + token(it.tokens.open), + iterate(it.values, it), + token(it.tokens.close), + token(it.tokens.termination) + ]), { data: it }); + } + function enum_value(v, parent) { + return ts.wrap([ + ts.trivia(v.tokens.value.trivia), + ts.definition( + ts.wrap(['"', ts.name(v.value, { data: v, parent }), '"']), + { data: v, parent } + ), + token(v.tokens.separator) + ]); + } + function iterable_like(it, parent) { + return ts.definition(ts.wrap([ + extended_attributes(it.extAttrs), + token(it.tokens.readonly), + token(it.tokens.base, ts.generic), + token(it.tokens.open), + ts.wrap(it.idlType.map(type)), + token(it.tokens.close), + token(it.tokens.termination) + ]), { data: it, parent }); + } + function eof(it) { + return ts.trivia(it.trivia); + } - if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') { - module.exports = obj; - } else if (typeof define === 'function' && define.amd) { - define([], () => obj); - } else { - (self || window).WebIDL2Writer = obj; - } -})(); + const table = { + interface: container, + "interface mixin": container, + namespace: container, + operation, + attribute, + dictionary: container, + field, + const: const_, + typedef, + includes, + callback, + enum: enum_, + "enum-value": enum_value, + iterable: iterable_like, + legacyiterable: iterable_like, + maplike: iterable_like, + setlike: iterable_like, + "callback interface": container, + eof + }; + function dispatch(it, parent) { + const dispatcher = table[it.type]; + if (!dispatcher) { + throw new Error(`Type "${it.type}" is unsupported`); + } + return table[it.type](it, parent); + } + function iterate(things, parent) { + if (!things) return; + const results = things.map(thing => dispatch(thing, parent)); + return ts.wrap(results); + } + return iterate(ast); +} diff --git a/package-lock.json b/package-lock.json index b0581037fe9434..26bc61f19acc0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,637 +1,5979 @@ { "name": "webidl2", - "version": "13.0.3", + "version": "20.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.0.0-beta.40", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz", - "integrity": "sha512-eVXQSbu/RimU6OKcK2/gDJVTFcxXJI4sHbIqw2mhwMZeQ2as/8AhS9DGkEDoHMBBNJZ5B0US63lF56x+KDcxiA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", "dev": true, "requires": { - "@babel/highlight": "7.0.0-beta.40" + "@babel/highlight": "^7.0.0" } }, "@babel/highlight": { - "version": "7.0.0-beta.40", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.40.tgz", - "integrity": "sha512-mOhhTrzieV6VO7odgzFGFapiwRK0ei8RZRhfzHhb6cpX3QM8XXuCLXWjN8qBB7JReDdUR80V3LFfFrGUYevhNg==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", "dev": true, "requires": { "chalk": "^2.0.0", "esutils": "^2.0.2", - "js-tokens": "^3.0.0" + "js-tokens": "^4.0.0" } }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "@webassemblyjs/ast": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", + "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==", "dev": true, "requires": { - "arr-flatten": "^1.0.1" + "@webassemblyjs/helper-module-context": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/wast-parser": "1.8.5" } }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz", + "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ==", "dev": true }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "@webassemblyjs/helper-api-error": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz", + "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA==", "dev": true }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "@webassemblyjs/helper-buffer": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz", + "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q==", "dev": true }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "@webassemblyjs/helper-code-frame": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz", + "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==", "dev": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "@webassemblyjs/wast-printer": "1.8.5" } }, - "braces": { + "@webassemblyjs/helper-fsm": { "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz", + "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz", + "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==", "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "@webassemblyjs/ast": "1.8.5", + "mamacro": "^0.0.3" } }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz", + "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ==", "dev": true }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", + "@webassemblyjs/helper-wasm-section": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz", + "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5" } }, - "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "@webassemblyjs/ieee754": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz", + "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==", "dev": true, "requires": { - "color-name": "^1.1.1" + "@xtuc/ieee754": "^1.2.0" } }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "@webassemblyjs/leb128": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz", + "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==", "dev": true, "requires": { - "ms": "2.0.0" + "@xtuc/long": "4.2.2" } }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "diff-match-patch": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.0.tgz", - "integrity": "sha1-HMPIOkkNZ/ldkeOfatHy4Ia2MEg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "@webassemblyjs/utf8": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz", + "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw==", "dev": true }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "@webassemblyjs/wasm-edit": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz", + "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/helper-wasm-section": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5", + "@webassemblyjs/wasm-opt": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5", + "@webassemblyjs/wast-printer": "1.8.5" } }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "@webassemblyjs/wasm-gen": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz", + "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==", "dev": true, "requires": { - "fill-range": "^2.1.0" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/ieee754": "1.8.5", + "@webassemblyjs/leb128": "1.8.5", + "@webassemblyjs/utf8": "1.8.5" } }, - "expect": { - "version": "22.4.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-22.4.0.tgz", - "integrity": "sha512-Fiy862jT3qc70hwIHwwCBNISmaqBrfWKKrtqyMJ6iwZr+6KXtcnHojZFtd63TPRvRl8EQTJ+YXYy2lK6/6u+Hw==", + "@webassemblyjs/wasm-opt": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz", + "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "jest-diff": "^22.4.0", - "jest-get-type": "^22.1.0", - "jest-matcher-utils": "^22.4.0", - "jest-message-util": "^22.4.0", - "jest-regex-util": "^22.1.0" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-buffer": "1.8.5", + "@webassemblyjs/wasm-gen": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5" } }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "@webassemblyjs/wasm-parser": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz", + "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-api-error": "1.8.5", + "@webassemblyjs/helper-wasm-bytecode": "1.8.5", + "@webassemblyjs/ieee754": "1.8.5", + "@webassemblyjs/leb128": "1.8.5", + "@webassemblyjs/utf8": "1.8.5" } }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "@webassemblyjs/wast-parser": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz", + "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==", "dev": true, "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/floating-point-hex-parser": "1.8.5", + "@webassemblyjs/helper-api-error": "1.8.5", + "@webassemblyjs/helper-code-frame": "1.8.5", + "@webassemblyjs/helper-fsm": "1.8.5", + "@xtuc/long": "4.2.2" } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "@webassemblyjs/wast-printer": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz", + "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==", "dev": true, "requires": { - "for-in": "^1.0.1" + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/wast-parser": "1.8.5", + "@xtuc/long": "4.2.2" } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", "dev": true }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true }, - "growl": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", - "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "acorn": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", + "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", "dev": true }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "acorn-dynamic-import": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", + "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", "dev": true }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "acorn-jsx": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.0.tgz", + "integrity": "sha512-XkB50fn0MURDyww9+UYL3c1yLbOBz0ZFvrdYlGB8l+Ije1oSC75qAqrzSPjYQbdnQUzhlUGNKuesryAv0gxZOg==", "dev": true }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "ajv": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz", + "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==", "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", "dev": true }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "ajv-keywords": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", + "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", "dev": true }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", "dev": true }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "color-convert": "^1.9.0" } }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "dev": true, "requires": { - "kind-of": "^3.0.2" - } + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async-each": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.2.tgz", + "integrity": "sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg==", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "binary-extensions": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz", + "integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==", + "dev": true + }, + "bluebird": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", + "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "cacache": { + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", + "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", + "dev": true, + "requires": { + "bluebird": "^3.5.3", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "^0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "camelcase": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", + "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "chokidar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.2.tgz", + "integrity": "sha512-IwXUx0FXc5ibYmPC2XeEj5mpXoV66sR+t3jqu2NS2GYwCktt3KF1/Qqjws/NkegajBA4RbZ5+DDwlOiJsxDHEg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.0" + }, + "dependencies": { + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } + } + }, + "chownr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", + "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "commander": { + "version": "2.15.1", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "cyclist": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", + "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "dev": true + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "debug": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", + "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "diff-match-patch": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.4.tgz", + "integrity": "sha512-Uv3SW8bmH9nAtHKaKSanOQmj2DnlH65fUpcrMdfdaOxUG02QQ4YGZ8AE7kKOMisF7UqvOlGKVYWRvezdncW9lg==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "elliptic": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", + "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.9.0.tgz", + "integrity": "sha512-g4KWpPdqN0nth+goDNICNXGfJF7nNnepthp46CAlJoJtC5K/cLu3NgCM3AHu1CkJ5Hzt9V0Y0PBAO6Ay/gGb+w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.5.3", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^2.1.0", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "imurmurhash": "^0.1.4", + "inquirer": "^6.1.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.12.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "require-uncached": "^1.0.3", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.0.2", + "text-table": "^0.2.0" + } + }, + "eslint-scope": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", + "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "dev": true, + "requires": { + "acorn": "^6.0.2", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "expect": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-23.6.0.tgz", + "integrity": "sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "jest-diff": "^23.6.0", + "jest-get-type": "^22.1.0", + "jest-matcher-utils": "^23.6.0", + "jest-message-util": "^23.4.0", + "jest-regex-util": "^23.3.0" + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figgy-pudding": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", + "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "flat-cache": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", + "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "dev": true, + "requires": { + "circular-json": "^0.3.1", + "graceful-fs": "^4.1.2", + "rimraf": "~2.6.2", + "write": "^0.2.1" + } + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", + "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globals": { + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", + "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", + "dev": true + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inquirer": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz", + "integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.0", + "figures": "^2.0.0", + "lodash": "^4.17.10", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.1.0", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "jest-diff": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-23.6.0.tgz", + "integrity": "sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "diff": "^3.2.0", + "jest-get-type": "^22.1.0", + "pretty-format": "^23.6.0" + } + }, + "jest-get-type": { + "version": "22.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", + "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==", + "dev": true + }, + "jest-matcher-utils": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz", + "integrity": "sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^22.1.0", + "pretty-format": "^23.6.0" + } + }, + "jest-message-util": { + "version": "23.4.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz", + "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0-beta.35", + "chalk": "^2.0.1", + "micromatch": "^2.3.11", + "slash": "^1.0.0", + "stack-utils": "^1.0.1" + } + }, + "jest-regex-util": { + "version": "23.3.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-23.3.0.tgz", + "integrity": "sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "jsondiffpatch": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/jsondiffpatch/-/jsondiffpatch-0.3.11.tgz", + "integrity": "sha512-Xi3Iygdt/BGhml6bdUFhgDki1TgOsp3hG3iiH3KtzP+CahtGcdPfKRLlnZbSw+3b1umZkhmKrqXUgUcKenyhtA==", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "diff-match-patch": "^1.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "loader-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "dev": true + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "mamacro": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", + "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", + "dev": true + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "math-random": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "dev": true + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "mem": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.2.0.tgz", + "integrity": "sha512-5fJxa68urlY0Ir8ijatKa3eRz5lwXnRCTvo9+TbTGAuTFJOwpGcY0X05moBd0nW45965Njt4CDI2GFQoG8DvqA==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.0.0.tgz", + "integrity": "sha512-jbex9Yd/3lmICXwYT6gA/j2mNQGU48wCh/VzRd+/Y/PjYQtlg1gLMdZqvu9s/xH7qKvngxRObl56XZR609IMbA==", + "dev": true + } + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mocha": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "dev": true, + "requires": { + "browser-stdout": "1.3.1", + "commander": "2.15.1", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.5", + "he": "1.1.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "supports-color": "5.4.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.1.tgz", + "integrity": "sha512-I6YB/YEuDeUZMmhscXKxGgZlFnhsn5y0hgOZBadkzfTRrZBtJDZeg6eQf7PYMIEclwmorTKK8GztsyOUSVBREA==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "neo-async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", + "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-libs-browser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", + "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.0", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", + "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", + "dev": true + }, + "p-limit": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz", + "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==", + "dev": true + }, + "pako": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", + "dev": true + }, + "parallel-transform": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "dev": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "parse-asn1": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", + "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "pbkdf2": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-format": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz", + "integrity": "sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw==", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0", + "ansi-styles": "^3.2.0" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "progress": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", + "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randomatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", + "integrity": "sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + } + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "rxjs": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", + "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, + "serialize-javascript": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", + "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", + "dev": true }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "is-primitive": { + "set-value": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", "dev": true }, - "isarray": { + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "isarray": "1.0.0" + "is-fullwidth-code-point": "^2.0.0" } }, - "jest-diff": { - "version": "22.4.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-22.4.0.tgz", - "integrity": "sha512-+/t20WmnkOkB8MOaGaPziI8zWKxquMvYw4Ub+wOzi7AUhmpFXz43buWSxVoZo4J5RnCozpGbX3/FssjJ5KV9Nw==", + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "dev": true, "requires": { - "chalk": "^2.0.1", - "diff": "^3.2.0", - "jest-get-type": "^22.1.0", - "pretty-format": "^22.4.0" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, - "jest-get-type": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.1.0.tgz", - "integrity": "sha512-nD97IVOlNP6fjIN5i7j5XRH+hFsHL7VlauBbzRvueaaUe70uohrkz7pL/N8lx/IAwZRTJ//wOdVgh85OgM7g3w==", + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", "dev": true }, - "jest-matcher-utils": { - "version": "22.4.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-22.4.0.tgz", - "integrity": "sha512-03m3issxUXpWMwDYTfmL8hRNewUB0yCRTeXPm+eq058rZxLHD9f5NtSSO98CWHqe4UyISIxd9Ao9iDVjHWd2qg==", + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "dev": true, "requires": { - "chalk": "^2.0.1", - "jest-get-type": "^22.1.0", - "pretty-format": "^22.4.0" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, - "jest-message-util": { - "version": "22.4.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-22.4.0.tgz", - "integrity": "sha512-eyCJB0T3hrlpFF2FqQoIB093OulP+1qvATQmD3IOgJgMGqPL6eYw8TbC5P/VCWPqKhGL51xvjIIhow5eZ2wHFw==", + "source-map-support": { + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.11.tgz", + "integrity": "sha512-//sajEx/fGL3iw6fltKMdPvy8kL3kJ2O3iuYlRoT3k9Kb4BjOoZ+BZzaNHeuaruSt+Kf3Zk9tnfAQg9/AJqUVQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0-beta.35", - "chalk": "^2.0.1", - "micromatch": "^2.3.11", - "slash": "^1.0.0", - "stack-utils": "^1.0.1" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, - "jest-regex-util": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-22.1.0.tgz", - "integrity": "sha512-on0LqVS6Xeh69sw3d1RukVnur+lVOl3zkmb0Q54FHj9wHoq6dbtWqb3TSlnVUyx36hqjJhjgs/QLqs07Bzu72Q==", + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", "dev": true }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "jsondiffpatch": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/jsondiffpatch/-/jsondiffpatch-0.3.5.tgz", - "integrity": "sha512-v7eaGLDMCHXH+fsIaZhptEUJmS8EJpunq7IM4cc4vIT/kSRAkaZ6ZF4ebiNcyUelL0znbvj6o2B5Gh9v7Og0BQ==", + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "dev": true, "requires": { - "chalk": "^2.3.0", - "diff-match-patch": "^1.0.0" + "figgy-pudding": "^3.5.1" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "stack-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", + "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } } }, - "math-random": { + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "table": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.1.0.tgz", + "integrity": "sha512-e542in22ZLhD/fOIuXs/8yDZ9W61ltF8daM88rkRNtgTIct+vI2fTnAyu/Db2TCfEcI8i7mjZz6meLq0nW7TYg==", + "dev": true, + "requires": { + "ajv": "^6.5.3", + "lodash": "^4.17.10", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" + } + }, + "tapable": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz", + "integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA==", + "dev": true + }, + "terser": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", + "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", + "dev": true, + "requires": { + "commander": "^2.19.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.10" + }, + "dependencies": { + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.3.tgz", + "integrity": "sha512-GOK7q85oAb/5kE12fMuLdn2btOS9OBZn4VsecpHDywoUC/jLhSAKOiYo0ezx7ss2EXPMzyEWFoE0s1WLE+4+oA==", + "dev": true, + "requires": { + "cacache": "^11.0.2", + "find-cache-dir": "^2.0.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "terser": "^3.16.1", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-arraybuffer": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", "dev": true }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + } } }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "dev": true }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "minimist": "0.0.8" + "prelude-ls": "~1.1.2" } }, - "mocha": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.0.4.tgz", - "integrity": "sha512-nMOpAPFosU1B4Ix1jdhx5e3q7XO55ic5a8cgYvW27CequcEY+BabS0kUVL1Cw1V5PuVHZWeNRWFLmEPexo79VA==", + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "dev": true, "requires": { - "browser-stdout": "1.3.1", - "commander": "2.11.0", - "debug": "3.1.0", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.3", - "he": "1.1.1", - "mkdirp": "0.5.1", - "supports-color": "4.4.0" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" }, "dependencies": { - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } }, - "supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "dev": true, "requires": { - "has-flag": "^2.0.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } } } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "unique-slug": "^2.0.0" } }, - "object.omit": { + "unique-slug": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", + "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", "dev": true, "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" + "imurmurhash": "^0.1.4" } }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "dev": true, "requires": { - "wrappy": "1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } } }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "upath": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", + "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" + "punycode": "^2.1.0" } }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, - "pretty-format": { - "version": "22.4.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-22.4.0.tgz", - "integrity": "sha512-pvCxP2iODIIk9adXlo4S3GRj0BrJiil68kByAa1PrgG97c1tClh9dLMgp3Z6cHFZrclaABt0UH8PIhwHuFLqYA==", + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", "dev": true, "requires": { - "ansi-regex": "^3.0.0", - "ansi-styles": "^3.2.0" + "inherits": "2.0.3" } }, - "randomatic": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", - "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "v8-compile-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz", + "integrity": "sha512-1wFuMUIM16MDJRCrpbpuEPTUGmM5QMUg0cr3KFwra2XgOgFcPGDQHDh3CszSCD2Zewc/dh/pamNEW8CbfDebUw==", + "dev": true + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", "dev": true, "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" + "indexof": "0.0.1" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "webpack": { + "version": "4.29.6", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.6.tgz", + "integrity": "sha512-MwBwpiE1BQpMDkbnUUaW6K8RFZjljJHArC6tWQJoFm0oQtfoSebtg4Y7/QHnJ/SddtjYLHaKGX64CFjG5rehJw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.8.5", + "@webassemblyjs/helper-module-context": "1.8.5", + "@webassemblyjs/wasm-edit": "1.8.5", + "@webassemblyjs/wasm-parser": "1.8.5", + "acorn": "^6.0.5", + "acorn-dynamic-import": "^4.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^1.0.0", + "enhanced-resolve": "^4.1.0", + "eslint-scope": "^4.0.0", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^1.0.0", + "tapable": "^1.1.0", + "terser-webpack-plugin": "^1.1.0", + "watchpack": "^1.5.0", + "webpack-sources": "^1.3.0" }, "dependencies": { - "is-number": { + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "arr-diff": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, "kind-of": { @@ -639,55 +5981,148 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "webpack-cli": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.0.tgz", + "integrity": "sha512-t1M7G4z5FhHKJ92WRKwZ1rtvi7rHc0NZoZRbSkol0YKl4HvcC8+DsmGDmK7MmZxHSAetHagiOsjOB6MmzC2TUw==", "dev": true, "requires": { - "is-equal-shallow": "^0.1.3" + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "enhanced-resolve": "^4.1.0", + "findup-sync": "^2.0.0", + "global-modules": "^1.0.0", + "import-local": "^2.0.0", + "interpret": "^1.1.0", + "loader-utils": "^1.1.0", + "supports-color": "^5.5.0", + "v8-compile-cache": "^2.0.2", + "yargs": "^12.0.5" } }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true + "webpack-sources": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", + "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "dev": true + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "slash": { + "wordwrap": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, - "stack-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", - "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=", - "dev": true + "worker-farm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { - "has-flag": "^3.0.0" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } } }, "wrappy": { @@ -695,6 +6130,63 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "dev": true + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } } diff --git a/package.json b/package.json index 92faccafa813fb..fabfd203d1b459 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "webidl2", "description": "A WebIDL Parser", - "version": "13.0.3", + "version": "20.0.1", "contributors": [ "Robin Berjon (https://berjon.com)", "Marcos Caceres (https://marcosc.com)", @@ -11,17 +11,23 @@ "license": "W3C", "dependencies": {}, "devDependencies": { - "expect": "22.4.0", - "jsondiffpatch": "0.3.5", - "mocha": "5.0.4" + "eslint": "^5.9.0", + "expect": "23.6.0", + "jsondiffpatch": "0.3.11", + "mocha": "5.2.0", + "webpack": "^4.29.6", + "webpack-cli": "^3.3.0" }, "scripts": { - "test": "mocha", + "lint": "eslint lib/*.js test/*.js test/util/*.js", + "test": "npm run lint && webpack && mocha", "acquire": "node test/util/acquire.js" }, "repository": "git://github.com/w3c/webidl2.js", - "main": "index.js", + "main": "dist/webidl2.js", + "module": "index.js", "files": [ + "dist/*", "lib/*" ] } diff --git a/test/invalid.js b/test/invalid.js index 19bbf006e579ef..0104161ec68d8e 100644 --- a/test/invalid.js +++ b/test/invalid.js @@ -5,16 +5,60 @@ "use strict"; const { collect } = require("./util/collect"); -const fs = require("fs"); +const { parse } = require(".."); const expect = require("expect"); describe("Parses all of the invalid IDLs to check that they blow up correctly", () => { - for (const test of collect("invalid", { expectError: true })) { + for (const test of collect("invalid", { expectError: true, raw: true })) { it(`should produce the right error for ${test.path}`, () => { - const err = test.readJSON(); - expect(test.error).toBeTruthy(); - expect(test.error.message).toEqual(err.message); - expect(test.error.line).toEqual(err.line); + const err = test.readText(); + if (test.error) { + expect(test.error.message + "\n").toEqual(err); + } else if (test.validation) { + expect(test.validation.join("\n") + "\n").toEqual(err); + } else { + throw new Error("This test unexpectedly had no error"); + } }); } }); + +describe("Error object structure", () => { + it("should named WebIDLParseError", () => { + try { + parse("typedef unrestricted\n\n\n3.14 X;"); + throw new Error("Shouldn't reach here"); + } catch ({ name }) { + expect(name).toBe("WebIDLParseError"); + } + }); + + it("should contain error line field", () => { + try { + parse("typedef unrestricted\n\n\n3.14 X;"); + throw new Error("Shouldn't reach here"); + } catch ({ line }) { + expect(line).toBe(4); + } + }); + + it("should contain input field", () => { + try { + parse("couldn't read any token"); + throw new Error("Shouldn't reach here"); + } catch ({ input }) { + expect(input).toBe("couldn't read any"); + } + }); + + it("should contain tokens field", () => { + try { + parse("cannot find any valid definitions"); + throw new Error("Shouldn't reach here"); + } catch ({ tokens }) { + expect(tokens.length).toBe(5); + expect(tokens[0].type).toBe("identifier"); + expect(tokens[0].value).toBe("cannot"); + } + }); +}); diff --git a/test/invalid/baseline/array.txt b/test/invalid/baseline/array.txt new file mode 100644 index 00000000000000..9ed81530740630 --- /dev/null +++ b/test/invalid/baseline/array.txt @@ -0,0 +1,3 @@ +Syntax error at line 5, since `interface LotteryResults`: + readonly attribute unsigned short[][] numbers + ^ No name in attribute diff --git a/test/invalid/baseline/caller.txt b/test/invalid/baseline/caller.txt new file mode 100644 index 00000000000000..6222a6efde11ba --- /dev/null +++ b/test/invalid/baseline/caller.txt @@ -0,0 +1,3 @@ +Syntax error at line 6, since `interface NumberQuadrupler`: + legacycaller float compute(float x + ^ Invalid operation diff --git a/test/invalid/baseline/const-null.txt b/test/invalid/baseline/const-null.txt new file mode 100644 index 00000000000000..3ea4d4ebd2060f --- /dev/null +++ b/test/invalid/baseline/const-null.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface MyConstants`: + const MyPrimitive MY_NULL = null; + ^ No value for const diff --git a/test/invalid/baseline/const-nullable.txt b/test/invalid/baseline/const-nullable.txt new file mode 100644 index 00000000000000..1453c529ff4620 --- /dev/null +++ b/test/invalid/baseline/const-nullable.txt @@ -0,0 +1,3 @@ +Syntax error at line 3, since `interface MyConstants`: + const boolean? ARE_WE_THERE_YET = false; + ^ Unexpected nullable constant type diff --git a/test/invalid/baseline/dict-field-unterminated.txt b/test/invalid/baseline/dict-field-unterminated.txt new file mode 100644 index 00000000000000..ef2ff6b0dbe3ae --- /dev/null +++ b/test/invalid/baseline/dict-field-unterminated.txt @@ -0,0 +1,3 @@ +Syntax error at line 1, since `dictionary Nene`: + { DOMString cpp = "high" }; + ^ Unterminated dictionary member diff --git a/test/invalid/baseline/dict-no-default.txt b/test/invalid/baseline/dict-no-default.txt new file mode 100644 index 00000000000000..b3701a189dee8c --- /dev/null +++ b/test/invalid/baseline/dict-no-default.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `dictionary GPUColorStateDescriptor`: + GPUColorWriteFlags writeMask = GPUColorWriteBits.ALL; + ^ No value for default diff --git a/test/invalid/baseline/dict-required-default.txt b/test/invalid/baseline/dict-required-default.txt new file mode 100644 index 00000000000000..355e295730e271 --- /dev/null +++ b/test/invalid/baseline/dict-required-default.txt @@ -0,0 +1,3 @@ +Syntax error at line 4, since `dictionary Dict`: + required long member = 0; + ^ Required member must not have a default diff --git a/test/invalid/baseline/duplicate-escaped.txt b/test/invalid/baseline/duplicate-escaped.txt new file mode 100644 index 00000000000000..78f78b8791e3e2 --- /dev/null +++ b/test/invalid/baseline/duplicate-escaped.txt @@ -0,0 +1,3 @@ +Validation error at line 2, inside `interface Iroha`: +interface _Iroha {}; + ^ The name "Iroha" of type "interface" was already seen diff --git a/test/invalid/baseline/duplicate.txt b/test/invalid/baseline/duplicate.txt new file mode 100644 index 00000000000000..da4f5dfcc9c727 --- /dev/null +++ b/test/invalid/baseline/duplicate.txt @@ -0,0 +1,3 @@ +Validation error at line 3, inside `interface Test`: +interface Test { + ^ The name "Test" of type "typedef" was already seen diff --git a/test/invalid/baseline/enum-bodyless.txt b/test/invalid/baseline/enum-bodyless.txt new file mode 100644 index 00000000000000..ab891fbd73f0c3 --- /dev/null +++ b/test/invalid/baseline/enum-bodyless.txt @@ -0,0 +1,3 @@ +Syntax error at line 1, since `enum X`: +enum X + ^ Bodyless enum diff --git a/test/invalid/baseline/enum-empty.txt b/test/invalid/baseline/enum-empty.txt new file mode 100644 index 00000000000000..1043f7c2de23f7 --- /dev/null +++ b/test/invalid/baseline/enum-empty.txt @@ -0,0 +1,3 @@ +Syntax error at line 1, since `enum Empty`: +enum Empty {}; + ^ No value in enum diff --git a/test/invalid/baseline/enum-wo-comma.txt b/test/invalid/baseline/enum-wo-comma.txt new file mode 100644 index 00000000000000..069b67d0d361da --- /dev/null +++ b/test/invalid/baseline/enum-wo-comma.txt @@ -0,0 +1,3 @@ +Syntax error at line 1, since `enum NoComma`: +enum NoComma { "value1" "value2" }; + ^ No comma between enum values diff --git a/test/invalid/baseline/enum.txt b/test/invalid/baseline/enum.txt new file mode 100644 index 00000000000000..311fbffafacac7 --- /dev/null +++ b/test/invalid/baseline/enum.txt @@ -0,0 +1,3 @@ +Syntax error at line 1, since `enum foo`: +enum foo { 1, 2, 3 + ^ Unexpected value in enum diff --git a/test/invalid/baseline/exception.txt b/test/invalid/baseline/exception.txt new file mode 100644 index 00000000000000..5e8f88ba851133 --- /dev/null +++ b/test/invalid/baseline/exception.txt @@ -0,0 +1,3 @@ +Syntax error at line 4: +exception SomeException { +^ Unrecognised tokens diff --git a/test/invalid/baseline/extattr-double.txt b/test/invalid/baseline/extattr-double.txt new file mode 100644 index 00000000000000..e9aa14b681e40a --- /dev/null +++ b/test/invalid/baseline/extattr-double.txt @@ -0,0 +1,3 @@ +Syntax error at line 1: +[Constructor([Clamp] [Clamp + ^ Unexpected token in extended attribute argument list diff --git a/test/invalid/baseline/extattr-empty-ids.txt b/test/invalid/baseline/extattr-empty-ids.txt new file mode 100644 index 00000000000000..558798ba76df2f --- /dev/null +++ b/test/invalid/baseline/extattr-empty-ids.txt @@ -0,0 +1,3 @@ +Syntax error at line 1: +[Exposed=()] + ^ Expected identifiers but none found diff --git a/test/invalid/baseline/float.txt b/test/invalid/baseline/float.txt new file mode 100644 index 00000000000000..3241b66b278c23 --- /dev/null +++ b/test/invalid/baseline/float.txt @@ -0,0 +1,3 @@ +Syntax error at line 1: +typedef unrestricted 3.14 X; + ^ Failed to parse float type diff --git a/test/invalid/baseline/frozenarray-empty.txt b/test/invalid/baseline/frozenarray-empty.txt new file mode 100644 index 00000000000000..f6ce295c0b7a83 --- /dev/null +++ b/test/invalid/baseline/frozenarray-empty.txt @@ -0,0 +1,3 @@ +Syntax error at line 1: +typedef FrozenArray<> empty; + ^ Missing FrozenArray subtype diff --git a/test/invalid/baseline/id-underscored-number.txt b/test/invalid/baseline/id-underscored-number.txt new file mode 100644 index 00000000000000..2d70b40e061d53 --- /dev/null +++ b/test/invalid/baseline/id-underscored-number.txt @@ -0,0 +1,3 @@ +Syntax error at line 1: +interface _0 {}; + ^ No name for interface diff --git a/test/invalid/baseline/implements.txt b/test/invalid/baseline/implements.txt new file mode 100644 index 00000000000000..f1547272fe5546 --- /dev/null +++ b/test/invalid/baseline/implements.txt @@ -0,0 +1,3 @@ +Syntax error at line 14, since `interface EventTarget`: + Node implements EventTarget; + ^ Unrecognised tokens diff --git a/test/invalid/baseline/implements_and_includes_ws.txt b/test/invalid/baseline/implements_and_includes_ws.txt new file mode 100644 index 00000000000000..048a28a860f4e7 --- /dev/null +++ b/test/invalid/baseline/implements_and_includes_ws.txt @@ -0,0 +1,3 @@ +Syntax error at line 4: +foobar; +^ Unrecognised tokens diff --git a/test/invalid/baseline/iterable-empty.txt b/test/invalid/baseline/iterable-empty.txt new file mode 100644 index 00000000000000..31148e3df8161c --- /dev/null +++ b/test/invalid/baseline/iterable-empty.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface X`: + iterable<>; + ^ Error parsing iterable declaration diff --git a/test/invalid/baseline/iterator.txt b/test/invalid/baseline/iterator.txt new file mode 100644 index 00000000000000..04a79e7571d3f5 --- /dev/null +++ b/test/invalid/baseline/iterator.txt @@ -0,0 +1,3 @@ +Syntax error at line 5, since `interface SessionManager`: + Session iterator; + ^ Invalid operation diff --git a/test/invalid/baseline/legacyiterable.txt b/test/invalid/baseline/legacyiterable.txt new file mode 100644 index 00000000000000..66f95b49322612 --- /dev/null +++ b/test/invalid/baseline/legacyiterable.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface LegacyIterable`: + legacyiterable; + ^ Missing return type diff --git a/test/invalid/baseline/maplike-1type.txt b/test/invalid/baseline/maplike-1type.txt new file mode 100644 index 00000000000000..4aa5ea3153a4e1 --- /dev/null +++ b/test/invalid/baseline/maplike-1type.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface MapLikeOneType`: + maplike; + ^ Missing second type argument in maplike declaration diff --git a/test/invalid/baseline/module.txt b/test/invalid/baseline/module.txt new file mode 100644 index 00000000000000..f31c2f1b0b962d --- /dev/null +++ b/test/invalid/baseline/module.txt @@ -0,0 +1,3 @@ +Syntax error at line 2: +module gfx { +^ Unrecognised tokens diff --git a/test/invalid/baseline/namespace-readwrite.txt b/test/invalid/baseline/namespace-readwrite.txt new file mode 100644 index 00000000000000..73343b0ad7acf4 --- /dev/null +++ b/test/invalid/baseline/namespace-readwrite.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `namespace CSS`: + attribute object readwrite; + ^ Attributes must be readonly in this context diff --git a/test/invalid/baseline/no-semicolon-callback.txt b/test/invalid/baseline/no-semicolon-callback.txt new file mode 100644 index 00000000000000..cef5001e828130 --- /dev/null +++ b/test/invalid/baseline/no-semicolon-callback.txt @@ -0,0 +1,3 @@ +Syntax error at line 5, since `callback interface NoSemicolon`: +enum YouNeedOne { +^ Missing semicolon after interface diff --git a/test/invalid/baseline/no-semicolon.txt b/test/invalid/baseline/no-semicolon.txt new file mode 100644 index 00000000000000..6da783fe8f8e0d --- /dev/null +++ b/test/invalid/baseline/no-semicolon.txt @@ -0,0 +1,3 @@ +Syntax error at line 5, since `partial interface NoSemicolon`: +enum YouNeedOne { +^ Missing semicolon after interface diff --git a/test/invalid/baseline/nonnullableany.txt b/test/invalid/baseline/nonnullableany.txt new file mode 100644 index 00000000000000..249a69772545f8 --- /dev/null +++ b/test/invalid/baseline/nonnullableany.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface NonNullable`: + attribute any? foo; + ^ Type `any` cannot be made nullable diff --git a/test/invalid/baseline/nonnullableobjects.txt b/test/invalid/baseline/nonnullableobjects.txt new file mode 100644 index 00000000000000..5aff4a25228f7a --- /dev/null +++ b/test/invalid/baseline/nonnullableobjects.txt @@ -0,0 +1,3 @@ +Syntax error at line 4, since `interface NonNullable`: + attribute Foo?? + ^ Can't nullable more than once diff --git a/test/invalid/baseline/operation-too-special.txt b/test/invalid/baseline/operation-too-special.txt new file mode 100644 index 00000000000000..560fa78aeb7ebb --- /dev/null +++ b/test/invalid/baseline/operation-too-special.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface Ako`: + getter setter void maki() + ^ Missing return type diff --git a/test/invalid/baseline/overloads.txt b/test/invalid/baseline/overloads.txt new file mode 100644 index 00000000000000..dc7c87f8cc4f66 --- /dev/null +++ b/test/invalid/baseline/overloads.txt @@ -0,0 +1,18 @@ +Validation error at line 7, inside `partial interface Base`: + void unique(short num) + ^ The operation "unique" has already been defined for the base interface "Base" either in itself or in a mixin +Validation error at line 11, inside `interface mixin Extension`: + void unique(string str) + ^ The operation "unique" has already been defined for the base interface "Base" either in itself or in a mixin +Validation error at line 21, inside `interface mixin WebGL2RenderingContextBase`: + void bufferData(GLenum target, + ^ The operation "bufferData" has already been defined for the base interface "WebGL2RenderingContext" either in itself or in a mixin +Validation error at line 22, inside `interface mixin WebGL2RenderingContextBase`: + void bufferData(GLenum target, + ^ The operation "bufferData" has already been defined for the base interface "WebGL2RenderingContext" either in itself or in a mixin +Validation error at line 23, inside `interface mixin WebGL2RenderingContextBase`: + void bufferData(GLenum target, + ^ The operation "bufferData" has already been defined for the base interface "WebGL2RenderingContext" either in itself or in a mixin +Validation error at line 25, inside `interface mixin WebGL2RenderingContextBase`: + void bufferData(GLenum target, + ^ The operation "bufferData" has already been defined for the base interface "WebGL2RenderingContext" either in itself or in a mixin diff --git a/test/invalid/baseline/promise-empty.txt b/test/invalid/baseline/promise-empty.txt new file mode 100644 index 00000000000000..414842eb774407 --- /dev/null +++ b/test/invalid/baseline/promise-empty.txt @@ -0,0 +1,3 @@ +Syntax error at line 1: +typedef Promise<> empty; + ^ Missing Promise subtype diff --git a/test/invalid/baseline/promise-nullable.txt b/test/invalid/baseline/promise-nullable.txt new file mode 100644 index 00000000000000..603fb5d83fbcd3 --- /dev/null +++ b/test/invalid/baseline/promise-nullable.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface X`: + attribute Promise? + ^ Promise type cannot be nullable diff --git a/test/invalid/baseline/promise-with-extended-attribute.txt b/test/invalid/baseline/promise-with-extended-attribute.txt new file mode 100644 index 00000000000000..852b0745110e52 --- /dev/null +++ b/test/invalid/baseline/promise-with-extended-attribute.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface Foo`: + Promise<[XAttr] DOMString> + ^ Promise type cannot have extended attribute diff --git a/test/invalid/baseline/raises.txt b/test/invalid/baseline/raises.txt new file mode 100644 index 00000000000000..76fdb938d5b0f7 --- /dev/null +++ b/test/invalid/baseline/raises.txt @@ -0,0 +1,3 @@ +Syntax error at line 5, since `interface Person`: + attribute DOMString name setraises (InvalidName); + ^ Unterminated attribute diff --git a/test/invalid/baseline/readonly-iterable.txt b/test/invalid/baseline/readonly-iterable.txt new file mode 100644 index 00000000000000..16cd3a2aecebff --- /dev/null +++ b/test/invalid/baseline/readonly-iterable.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface ReadonlyIterable`: + readonly iterable + ^ Missing return type diff --git a/test/invalid/baseline/record-key-with-extended-attribute.txt b/test/invalid/baseline/record-key-with-extended-attribute.txt new file mode 100644 index 00000000000000..2a7ffb663ce833 --- /dev/null +++ b/test/invalid/baseline/record-key-with-extended-attribute.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface Foo`: + void foo(record<[XAttr] DOMString, + ^ Record key cannot have extended attribute diff --git a/test/invalid/baseline/record-key.txt b/test/invalid/baseline/record-key.txt new file mode 100644 index 00000000000000..4beabae7c4ae20 --- /dev/null +++ b/test/invalid/baseline/record-key.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface Foo`: + void foo(record param + ^ Record key must be one of: ByteString, DOMString, USVString diff --git a/test/invalid/baseline/record-single.txt b/test/invalid/baseline/record-single.txt new file mode 100644 index 00000000000000..8d4a7059e413b5 --- /dev/null +++ b/test/invalid/baseline/record-single.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface Foo`: + foo(record param); + ^ Missing comma after record key type diff --git a/test/invalid/baseline/scopedname.txt b/test/invalid/baseline/scopedname.txt new file mode 100644 index 00000000000000..220fe199dcb0cc --- /dev/null +++ b/test/invalid/baseline/scopedname.txt @@ -0,0 +1,3 @@ +Syntax error at line 2: + typedef gfx::geom:: + ^ No name in typedef diff --git a/test/invalid/baseline/sequence-empty.txt b/test/invalid/baseline/sequence-empty.txt new file mode 100644 index 00000000000000..08215a94137d3c --- /dev/null +++ b/test/invalid/baseline/sequence-empty.txt @@ -0,0 +1,3 @@ +Syntax error at line 1: +typedef sequence<> empty; + ^ Missing sequence subtype diff --git a/test/invalid/baseline/sequenceAsAttribute.txt b/test/invalid/baseline/sequenceAsAttribute.txt new file mode 100644 index 00000000000000..010243fbed02e7 --- /dev/null +++ b/test/invalid/baseline/sequenceAsAttribute.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface sequenceAsAttribute`: + attribute sequence invalid; + ^ Attributes cannot accept sequence types diff --git a/test/invalid/baseline/setlike-2types.txt b/test/invalid/baseline/setlike-2types.txt new file mode 100644 index 00000000000000..62a03b798fc3bd --- /dev/null +++ b/test/invalid/baseline/setlike-2types.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface SetLikeTwoTypes`: + setlike; + ^ Unterminated setlike declaration diff --git a/test/invalid/baseline/setter-creator.txt b/test/invalid/baseline/setter-creator.txt new file mode 100644 index 00000000000000..9ffcb43014b2ec --- /dev/null +++ b/test/invalid/baseline/setter-creator.txt @@ -0,0 +1,3 @@ +Syntax error at line 3, since `interface OrderedMap`: + setter creator void set(DOMString name + ^ Invalid operation diff --git a/test/invalid/baseline/spaced-negative-infinity.txt b/test/invalid/baseline/spaced-negative-infinity.txt new file mode 100644 index 00000000000000..1240347fd9d85a --- /dev/null +++ b/test/invalid/baseline/spaced-negative-infinity.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface X`: + const float infinity = - Infinity; + ^ No value for const diff --git a/test/invalid/baseline/spaced-variadic.txt b/test/invalid/baseline/spaced-variadic.txt new file mode 100644 index 00000000000000..82249839c038a7 --- /dev/null +++ b/test/invalid/baseline/spaced-variadic.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface X`: + void operation(object . . . args + ^ Unterminated operation diff --git a/test/invalid/baseline/special-omittable.txt b/test/invalid/baseline/special-omittable.txt new file mode 100644 index 00000000000000..ec50d8a97a240c --- /dev/null +++ b/test/invalid/baseline/special-omittable.txt @@ -0,0 +1,3 @@ +Syntax error at line 6, since `interface Dictionary`: + omittable getter float getProperty(DOMString + ^ Invalid operation diff --git a/test/invalid/baseline/stray-slash.txt b/test/invalid/baseline/stray-slash.txt new file mode 100644 index 00000000000000..08680c00939f06 --- /dev/null +++ b/test/invalid/baseline/stray-slash.txt @@ -0,0 +1,3 @@ +Syntax error at line 2: +/ This is not. +^ Unrecognised tokens diff --git a/test/invalid/baseline/stringconstants.txt b/test/invalid/baseline/stringconstants.txt new file mode 100644 index 00000000000000..86e06c2c6a3c2c --- /dev/null +++ b/test/invalid/baseline/stringconstants.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface Util`: + const DOMString hello = "world"; + ^ No type for const diff --git a/test/invalid/baseline/typedef-nested.txt b/test/invalid/baseline/typedef-nested.txt new file mode 100644 index 00000000000000..38dbca591c977e --- /dev/null +++ b/test/invalid/baseline/typedef-nested.txt @@ -0,0 +1,3 @@ +Syntax error at line 14, since `interface Widget`: + typedef sequence + ^ Missing return type diff --git a/test/invalid/baseline/union-any.txt b/test/invalid/baseline/union-any.txt new file mode 100644 index 00000000000000..5688122f0adccb --- /dev/null +++ b/test/invalid/baseline/union-any.txt @@ -0,0 +1,3 @@ +Syntax error at line 1: +typedef (any or DOMString or any) + ^ Type `any` cannot be included in a union type diff --git a/test/invalid/baseline/union-dangling-or.txt b/test/invalid/baseline/union-dangling-or.txt new file mode 100644 index 00000000000000..12be4348e81acc --- /dev/null +++ b/test/invalid/baseline/union-dangling-or.txt @@ -0,0 +1,3 @@ +Syntax error at line 1: + (One or Two or) UnionOr; + ^ No type after open parenthesis or 'or' in union type diff --git a/test/invalid/baseline/union-one.txt b/test/invalid/baseline/union-one.txt new file mode 100644 index 00000000000000..136a3eaf54cb3f --- /dev/null +++ b/test/invalid/baseline/union-one.txt @@ -0,0 +1,3 @@ +Syntax error at line 1: +typedef (OnlyOne) UnionOne; + ^ At least two types are expected in a union type but found less diff --git a/test/invalid/baseline/union-zero.txt b/test/invalid/baseline/union-zero.txt new file mode 100644 index 00000000000000..ded51385a1601f --- /dev/null +++ b/test/invalid/baseline/union-zero.txt @@ -0,0 +1,3 @@ +Syntax error at line 1: +typedef () UnionZero; + ^ No type after open parenthesis or 'or' in union type diff --git a/test/invalid/baseline/unknown-generic.txt b/test/invalid/baseline/unknown-generic.txt new file mode 100644 index 00000000000000..2b30ecb5d1a3fa --- /dev/null +++ b/test/invalid/baseline/unknown-generic.txt @@ -0,0 +1,3 @@ +Syntax error at line 2, since `interface FetchEvent`: + ResponsePromise default( + ^ Unsupported generic type ResponsePromise diff --git a/test/invalid/idl/const-null.widl b/test/invalid/idl/const-null.widl new file mode 100644 index 00000000000000..1125c5d549642f --- /dev/null +++ b/test/invalid/idl/const-null.widl @@ -0,0 +1,3 @@ +interface MyConstants { + const MyPrimitive MY_NULL = null; +}; diff --git a/test/invalid/idl/const-nullable.widl b/test/invalid/idl/const-nullable.widl new file mode 100644 index 00000000000000..47f68f6b0549d7 --- /dev/null +++ b/test/invalid/idl/const-nullable.widl @@ -0,0 +1,4 @@ +// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06 +interface MyConstants { + const boolean? ARE_WE_THERE_YET = false; +}; diff --git a/test/invalid/idl/dict-field-unterminated.widl b/test/invalid/idl/dict-field-unterminated.widl new file mode 100644 index 00000000000000..d2411312a5e0be --- /dev/null +++ b/test/invalid/idl/dict-field-unterminated.widl @@ -0,0 +1 @@ +dictionary Nene { DOMString cpp = "high" }; diff --git a/test/invalid/idl/dict-no-default.widl b/test/invalid/idl/dict-no-default.widl new file mode 100644 index 00000000000000..3b16f0b4e4763f --- /dev/null +++ b/test/invalid/idl/dict-no-default.widl @@ -0,0 +1,3 @@ +dictionary GPUColorStateDescriptor { + GPUColorWriteFlags writeMask = GPUColorWriteBits.ALL; +}; diff --git a/test/invalid/idl/duplicate-escaped.widl b/test/invalid/idl/duplicate-escaped.widl new file mode 100644 index 00000000000000..7b0ce0d659601f --- /dev/null +++ b/test/invalid/idl/duplicate-escaped.widl @@ -0,0 +1,2 @@ +interface Iroha {}; +interface _Iroha {}; diff --git a/test/invalid/idl/enum-bodyless.widl b/test/invalid/idl/enum-bodyless.widl new file mode 100644 index 00000000000000..23f4873b64a88f --- /dev/null +++ b/test/invalid/idl/enum-bodyless.widl @@ -0,0 +1 @@ +enum X diff --git a/test/invalid/idl/extattr-double.widl b/test/invalid/idl/extattr-double.widl new file mode 100644 index 00000000000000..2bbb147f3c461b --- /dev/null +++ b/test/invalid/idl/extattr-double.widl @@ -0,0 +1,2 @@ +[Constructor([Clamp] [Clamp] unsigned long value)] // this is invalid +interface Foo {}; diff --git a/test/invalid/idl/float.widl b/test/invalid/idl/float.widl new file mode 100644 index 00000000000000..05e9a13541fb71 --- /dev/null +++ b/test/invalid/idl/float.widl @@ -0,0 +1 @@ +typedef unrestricted 3.14 X; diff --git a/test/invalid/idl/frozenarray-empty.widl b/test/invalid/idl/frozenarray-empty.widl new file mode 100644 index 00000000000000..2095a98fe228ea --- /dev/null +++ b/test/invalid/idl/frozenarray-empty.widl @@ -0,0 +1 @@ +typedef FrozenArray<> empty; diff --git a/test/syntax/idl/implements.widl b/test/invalid/idl/implements.widl similarity index 100% rename from test/syntax/idl/implements.widl rename to test/invalid/idl/implements.widl diff --git a/test/invalid/idl/iterable-empty.widl b/test/invalid/idl/iterable-empty.widl new file mode 100644 index 00000000000000..01664a3491ddd7 --- /dev/null +++ b/test/invalid/idl/iterable-empty.widl @@ -0,0 +1,3 @@ +interface X { + iterable<>; +}; diff --git a/test/syntax/idl/legacyiterable.widl b/test/invalid/idl/legacyiterable.widl similarity index 100% rename from test/syntax/idl/legacyiterable.widl rename to test/invalid/idl/legacyiterable.widl diff --git a/test/invalid/idl/operation-too-special.widl b/test/invalid/idl/operation-too-special.widl new file mode 100644 index 00000000000000..c2294ff2d740ff --- /dev/null +++ b/test/invalid/idl/operation-too-special.widl @@ -0,0 +1,3 @@ +interface Ako { + getter setter void maki(); +}; diff --git a/test/invalid/idl/overloads.widl b/test/invalid/idl/overloads.widl new file mode 100644 index 00000000000000..8da22397ca291a --- /dev/null +++ b/test/invalid/idl/overloads.widl @@ -0,0 +1,41 @@ +interface Base { + // Operations cannot be overloaded across partial interfaces and mixins + void unique(); +}; + +partial interface Base { + void unique(short num); +}; + +interface mixin Extension { + void unique(string str); +}; +Base includes Extension; +Base includes Unknown; + +// WebGL + +interface mixin WebGL2RenderingContextBase +{ + // WebGL1: + void bufferData(GLenum target, GLsizeiptr size, GLenum usage); + void bufferData(GLenum target, ArrayBuffer? srcData, GLenum usage); + void bufferData(GLenum target, ArrayBufferView srcData, GLenum usage); + // WebGL2: + void bufferData(GLenum target, ArrayBufferView srcData, GLenum usage, GLuint srcOffset, + optional GLuint length = 0); +}; + +interface mixin WebGLRenderingContextBase +{ + void bufferData(GLenum target, GLsizeiptr size, GLenum usage); + void bufferData(GLenum target, ArrayBuffer? data, GLenum usage); + void bufferData(GLenum target, ArrayBufferView data, GLenum usage); +}; + +[Exposed=(Window,Worker)] +interface WebGL2RenderingContext +{ +}; +WebGL2RenderingContext includes WebGLRenderingContextBase; +WebGL2RenderingContext includes WebGL2RenderingContextBase; diff --git a/test/invalid/idl/promise-empty.widl b/test/invalid/idl/promise-empty.widl new file mode 100644 index 00000000000000..731d844011fa91 --- /dev/null +++ b/test/invalid/idl/promise-empty.widl @@ -0,0 +1 @@ +typedef Promise<> empty; diff --git a/test/invalid/idl/sequence-empty.widl b/test/invalid/idl/sequence-empty.widl new file mode 100644 index 00000000000000..b5b2278b8e0bde --- /dev/null +++ b/test/invalid/idl/sequence-empty.widl @@ -0,0 +1 @@ +typedef sequence<> empty; diff --git a/test/invalid/idl/union-any.widl b/test/invalid/idl/union-any.widl new file mode 100644 index 00000000000000..e45492f8a17c7f --- /dev/null +++ b/test/invalid/idl/union-any.widl @@ -0,0 +1 @@ +typedef (any or DOMString or any) Any; diff --git a/test/invalid/json/array.json b/test/invalid/json/array.json deleted file mode 100644 index 898b2d836bff81..00000000000000 --- a/test/invalid/json/array.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface LotteryResults`: No name in attribute", - "line": 5 -} diff --git a/test/invalid/json/caller.json b/test/invalid/json/caller.json deleted file mode 100644 index 567fa3368129f9..00000000000000 --- a/test/invalid/json/caller.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface NumberQuadrupler`: Invalid operation", - "line": 6 -} diff --git a/test/invalid/json/dict-required-default.json b/test/invalid/json/dict-required-default.json deleted file mode 100644 index 82b6b2ae42a6f6..00000000000000 --- a/test/invalid/json/dict-required-default.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `dictionary Dict`: Required member must not have a default" -, "line": 4 -} diff --git a/test/invalid/json/duplicate.json b/test/invalid/json/duplicate.json deleted file mode 100644 index e88a7156fe8c1c..00000000000000 --- a/test/invalid/json/duplicate.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `typedef Test`: The name \"Test\" of type \"typedef\" is already seen", - "line": 3 -} diff --git a/test/invalid/json/enum-empty.json b/test/invalid/json/enum-empty.json deleted file mode 100644 index 734bc67de1fd67..00000000000000 --- a/test/invalid/json/enum-empty.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `enum Empty`: No value in enum", - "line": 1 -} diff --git a/test/invalid/json/enum-wo-comma.json b/test/invalid/json/enum-wo-comma.json deleted file mode 100644 index bfd0b0951fce8d..00000000000000 --- a/test/invalid/json/enum-wo-comma.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `enum NoComma`: No comma between enum values", - "line": 1 -} diff --git a/test/invalid/json/enum.json b/test/invalid/json/enum.json deleted file mode 100644 index 073ff6c290cafd..00000000000000 --- a/test/invalid/json/enum.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `enum foo`: Unexpected value in enum" -, "line": 1 -} diff --git a/test/invalid/json/exception.json b/test/invalid/json/exception.json deleted file mode 100644 index ad9fac6ca2f64e..00000000000000 --- a/test/invalid/json/exception.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error before parsing any named definition: Unrecognised tokens", - "line": 4 -} diff --git a/test/invalid/json/extattr-empty-ids.json b/test/invalid/json/extattr-empty-ids.json deleted file mode 100644 index 4337f1e180c288..00000000000000 --- a/test/invalid/json/extattr-empty-ids.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error before parsing any named definition: Expected identifiers but not found", - "line": 1 -} diff --git a/test/invalid/json/id-underscored-number.json b/test/invalid/json/id-underscored-number.json deleted file mode 100644 index 419ed946fca05c..00000000000000 --- a/test/invalid/json/id-underscored-number.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error before parsing any named definition: No name for interface", - "line": 1 -} diff --git a/test/invalid/json/implements_and_includes_ws.json b/test/invalid/json/implements_and_includes_ws.json deleted file mode 100644 index ad9fac6ca2f64e..00000000000000 --- a/test/invalid/json/implements_and_includes_ws.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error before parsing any named definition: Unrecognised tokens", - "line": 4 -} diff --git a/test/invalid/json/iterator.json b/test/invalid/json/iterator.json deleted file mode 100644 index e46d653ae3c512..00000000000000 --- a/test/invalid/json/iterator.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface SessionManager`: Invalid operation", - "line": 5 -} diff --git a/test/invalid/json/maplike-1type.json b/test/invalid/json/maplike-1type.json deleted file mode 100644 index 75e7a35ee256e9..00000000000000 --- a/test/invalid/json/maplike-1type.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface MapLikeOneType`: Missing second type argument in maplike declaration", - "line": 2 -} diff --git a/test/invalid/json/module.json b/test/invalid/json/module.json deleted file mode 100644 index 9c071cdd07a7a3..00000000000000 --- a/test/invalid/json/module.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error before parsing any named definition: Unrecognised tokens" -, "line": 2 -} diff --git a/test/invalid/json/namespace-readwrite.json b/test/invalid/json/namespace-readwrite.json deleted file mode 100644 index d21215111f1ee2..00000000000000 --- a/test/invalid/json/namespace-readwrite.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `namespace CSS`: Attributes must be readonly in this context", - "line": 2 -} diff --git a/test/invalid/json/no-semicolon-callback.json b/test/invalid/json/no-semicolon-callback.json deleted file mode 100644 index 1db9d14c8e2c51..00000000000000 --- a/test/invalid/json/no-semicolon-callback.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `callback interface NoSemicolon`: Missing semicolon after interface", - "line": 5 -} diff --git a/test/invalid/json/no-semicolon.json b/test/invalid/json/no-semicolon.json deleted file mode 100644 index 087532a012f592..00000000000000 --- a/test/invalid/json/no-semicolon.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `partial interface NoSemicolon`: Missing semicolon after interface", - "line": 5 -} diff --git a/test/invalid/json/nonnullableany.json b/test/invalid/json/nonnullableany.json deleted file mode 100644 index 8a1f90046ae4d9..00000000000000 --- a/test/invalid/json/nonnullableany.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface NonNullable`: Type any cannot be made nullable" -, "line": 2 -} diff --git a/test/invalid/json/nonnullableobjects.json b/test/invalid/json/nonnullableobjects.json deleted file mode 100644 index d470ec94a606c6..00000000000000 --- a/test/invalid/json/nonnullableobjects.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface NonNullable`: Can't nullable more than once", - "line": 4 -} diff --git a/test/invalid/json/promise-nullable.json b/test/invalid/json/promise-nullable.json deleted file mode 100644 index ced51faf1be4df..00000000000000 --- a/test/invalid/json/promise-nullable.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface X`: Promise type cannot be nullable", - "line": 2 -} diff --git a/test/invalid/json/promise-with-extended-attribute.json b/test/invalid/json/promise-with-extended-attribute.json deleted file mode 100644 index 71212d46e3c011..00000000000000 --- a/test/invalid/json/promise-with-extended-attribute.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface Foo`: Promise type cannot have extended attribute", - "line": 2 -} diff --git a/test/invalid/json/raises.json b/test/invalid/json/raises.json deleted file mode 100644 index 3165b874f0c189..00000000000000 --- a/test/invalid/json/raises.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface Person`: Unterminated attribute" -, "line": 5 -} diff --git a/test/invalid/json/readonly-iterable.json b/test/invalid/json/readonly-iterable.json deleted file mode 100644 index a571b22271b80e..00000000000000 --- a/test/invalid/json/readonly-iterable.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface ReadonlyIterable`: Missing return type", - "line": 2 -} diff --git a/test/invalid/json/record-key-with-extended-attribute.json b/test/invalid/json/record-key-with-extended-attribute.json deleted file mode 100644 index 4002e7fe0155d5..00000000000000 --- a/test/invalid/json/record-key-with-extended-attribute.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface Foo`: Record key cannot have extended attribute", - "line": 2 -} diff --git a/test/invalid/json/record-key.json b/test/invalid/json/record-key.json deleted file mode 100644 index 6f1bb99be90808..00000000000000 --- a/test/invalid/json/record-key.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface Foo`: Record key must be a string type", - "line": 2 -} diff --git a/test/invalid/json/record-single.json b/test/invalid/json/record-single.json deleted file mode 100644 index ece4fb2fee3c07..00000000000000 --- a/test/invalid/json/record-single.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface Foo`: Missing comma after record key type", - "line": 2 -} diff --git a/test/invalid/json/scopedname.json b/test/invalid/json/scopedname.json deleted file mode 100644 index 4620d2df5fa0cc..00000000000000 --- a/test/invalid/json/scopedname.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error before parsing any named definition: No name in typedef" -, "line": 2 -} diff --git a/test/invalid/json/sequenceAsAttribute.json b/test/invalid/json/sequenceAsAttribute.json deleted file mode 100644 index 5b4314a6de128d..00000000000000 --- a/test/invalid/json/sequenceAsAttribute.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface sequenceAsAttribute`: Attributes cannot accept sequence types" -, "line": 2 -} diff --git a/test/invalid/json/setlike-2types.json b/test/invalid/json/setlike-2types.json deleted file mode 100644 index 2900e1bac30074..00000000000000 --- a/test/invalid/json/setlike-2types.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface SetLikeTwoTypes`: Unterminated setlike declaration", - "line": 2 -} diff --git a/test/invalid/json/setter-creator.json b/test/invalid/json/setter-creator.json deleted file mode 100644 index 25decb374e12fe..00000000000000 --- a/test/invalid/json/setter-creator.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface OrderedMap`: Invalid operation", - "line": 3 -} diff --git a/test/invalid/json/spaced-negative-infinity.json b/test/invalid/json/spaced-negative-infinity.json deleted file mode 100644 index 9e5d61804990bb..00000000000000 --- a/test/invalid/json/spaced-negative-infinity.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface X`: No value for const", - "line": 2 -} diff --git a/test/invalid/json/spaced-variadic.json b/test/invalid/json/spaced-variadic.json deleted file mode 100644 index 0090abeeb71b23..00000000000000 --- a/test/invalid/json/spaced-variadic.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface X`: Unterminated operation", - "line": 2 -} diff --git a/test/invalid/json/special-omittable.json b/test/invalid/json/special-omittable.json deleted file mode 100644 index c20b28e03c17d6..00000000000000 --- a/test/invalid/json/special-omittable.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface Dictionary`: Invalid operation" -, "line": 6 -} diff --git a/test/invalid/json/stray-slash.json b/test/invalid/json/stray-slash.json deleted file mode 100644 index 9c071cdd07a7a3..00000000000000 --- a/test/invalid/json/stray-slash.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error before parsing any named definition: Unrecognised tokens" -, "line": 2 -} diff --git a/test/invalid/json/stringconstants.json b/test/invalid/json/stringconstants.json deleted file mode 100644 index 745d6e6e08ba22..00000000000000 --- a/test/invalid/json/stringconstants.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface Util`: No type for const" -, "line": 2 -} diff --git a/test/invalid/json/typedef-nested.json b/test/invalid/json/typedef-nested.json deleted file mode 100644 index e1843cec7d93e4..00000000000000 --- a/test/invalid/json/typedef-nested.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface Widget`: Missing return type" -, "line": 14 -} diff --git a/test/invalid/json/union-dangling-or.json b/test/invalid/json/union-dangling-or.json deleted file mode 100644 index 68dfd8b2ae6098..00000000000000 --- a/test/invalid/json/union-dangling-or.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error before parsing any named definition: No type after open parenthesis or 'or' in union type", - "line": 1 -} diff --git a/test/invalid/json/union-one.json b/test/invalid/json/union-one.json deleted file mode 100644 index 476403d6889be7..00000000000000 --- a/test/invalid/json/union-one.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error before parsing any named definition: At least two types are expected in a union type but found less", - "line": 1 -} diff --git a/test/invalid/json/union-zero.json b/test/invalid/json/union-zero.json deleted file mode 100644 index 68dfd8b2ae6098..00000000000000 --- a/test/invalid/json/union-zero.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error before parsing any named definition: No type after open parenthesis or 'or' in union type", - "line": 1 -} diff --git a/test/invalid/json/unknown-generic.json b/test/invalid/json/unknown-generic.json deleted file mode 100644 index 3703db3b2ab332..00000000000000 --- a/test/invalid/json/unknown-generic.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "message": "Got an error during or right after parsing `interface FetchEvent`: Unsupported generic type ResponsePromise", - "line": 2 -} diff --git a/test/syntax.js b/test/syntax.js index 05d647eda10394..5fb10bd9eb3845 100644 --- a/test/syntax.js +++ b/test/syntax.js @@ -2,18 +2,11 @@ const { collect } = require("./util/collect"); const expect = require("expect"); -const debug = true; describe("Parses all of the IDLs to produce the correct ASTs", () => { for (const test of collect("syntax")) { it(`should produce the same AST for ${test.path}`, () => { - try { - expect(test.diff()).toBeFalsy(); - } - catch (e) { - console.log(e.toString()); - throw e; - } + expect(test.diff()).toBeFalsy(); }); } }); diff --git a/test/syntax/baseline/allowany.json b/test/syntax/baseline/allowany.json new file mode 100644 index 00000000000000..d85d3b932dcf4a --- /dev/null +++ b/test/syntax/baseline/allowany.json @@ -0,0 +1,109 @@ +[ + { + "type": "interface", + "name": "B", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "g", + "body": { + "name": "g", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "g", + "body": { + "name": "g", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "b", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "B" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "g", + "body": { + "name": "g", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "s", + "idlType": { + "type": "argument-type", + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "AllowAny", + "rhs": null, + "arguments": [] + } + ] + }, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/attributes.json b/test/syntax/baseline/attributes.json new file mode 100644 index 00000000000000..0e24ca286949ec --- /dev/null +++ b/test/syntax/baseline/attributes.json @@ -0,0 +1,46 @@ +[ + { + "type": "interface", + "name": "Person", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "age", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned short" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "required", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "any" + }, + "extAttrs": null, + "special": "", + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/callback.json b/test/syntax/baseline/callback.json new file mode 100644 index 00000000000000..18b0b31fc62176 --- /dev/null +++ b/test/syntax/baseline/callback.json @@ -0,0 +1,121 @@ +[ + { + "type": "callback", + "name": "AsyncOperationCallback", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "status", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ], + "extAttrs": null + }, + { + "type": "callback interface", + "name": "EventHandler", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "eventOccurred", + "body": { + "name": "eventOccurred", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "details", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "callback", + "name": "SortCallback", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "boolean" + }, + "arguments": [ + { + "name": "a", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "any" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "b", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "any" + }, + "default": null, + "optional": false, + "variadic": false + } + ], + "extAttrs": null + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/json/constants.json b/test/syntax/baseline/constants.json similarity index 64% rename from test/syntax/json/constants.json rename to test/syntax/baseline/constants.json index ef2b8c44ca167c..c8ae36bec181f9 100644 --- a/test/syntax/json/constants.json +++ b/test/syntax/baseline/constants.json @@ -2,153 +2,150 @@ { "type": "interface", "name": "Util", - "partial": false, + "inheritance": null, "members": [ { "type": "const", - "nullable": false, + "name": "DEBUG", "idlType": { "type": "const-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "boolean", - "extAttrs": [] + "idlType": "boolean" }, - "name": "DEBUG", + "extAttrs": null, "value": { "type": "boolean", "value": false - }, - "extAttrs": [] + } }, { "type": "const", - "nullable": false, + "name": "negative", "idlType": { "type": "const-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "short", - "extAttrs": [] + "idlType": "short" }, - "name": "negative", + "extAttrs": null, "value": { "type": "number", "value": "-1" - }, - "extAttrs": [] + } }, { "type": "const", - "nullable": false, + "name": "LF", "idlType": { "type": "const-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "octet", - "extAttrs": [] + "idlType": "octet" }, - "name": "LF", + "extAttrs": null, "value": { "type": "number", "value": "10" - }, - "extAttrs": [] + } }, { "type": "const", - "nullable": false, + "name": "BIT_MASK", "idlType": { "type": "const-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "unsigned long", - "extAttrs": [] + "idlType": "unsigned long" }, - "name": "BIT_MASK", + "extAttrs": null, "value": { "type": "number", "value": "0x0000fc00" - }, - "extAttrs": [] + } }, { "type": "const", - "nullable": false, + "name": "AVOGADRO", "idlType": { "type": "const-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "float", - "extAttrs": [] + "idlType": "float" }, - "name": "AVOGADRO", + "extAttrs": null, "value": { "type": "number", "value": "6.022e23" - }, - "extAttrs": [] + } }, { "type": "const", - "nullable": false, + "name": "sobig", "idlType": { "type": "const-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "unrestricted float", - "extAttrs": [] + "idlType": "unrestricted float" }, - "name": "sobig", + "extAttrs": null, "value": { "type": "Infinity", "negative": false - }, - "extAttrs": [] + } }, { "type": "const", - "nullable": false, + "name": "minusonedividedbyzero", "idlType": { "type": "const-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "unrestricted double", - "extAttrs": [] + "idlType": "unrestricted double" }, - "name": "minusonedividedbyzero", + "extAttrs": null, "value": { "type": "Infinity", "negative": true - }, - "extAttrs": [] + } }, { "type": "const", - "nullable": false, + "name": "notanumber", "idlType": { "type": "const-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "short", - "extAttrs": [] + "idlType": "short" }, - "name": "notanumber", + "extAttrs": null, "value": { "type": "NaN" - }, - "extAttrs": [] + } } ], - "inheritance": null, - "extAttrs": [] + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" } ] diff --git a/test/syntax/baseline/constructor.json b/test/syntax/baseline/constructor.json new file mode 100644 index 00000000000000..f5786e024bb0e0 --- /dev/null +++ b/test/syntax/baseline/constructor.json @@ -0,0 +1,106 @@ +[ + { + "type": "interface", + "name": "Circle", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "r", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "cx", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "cy", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "circumference", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "extAttrs": null, + "special": "", + "readonly": true + } + ], + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "Constructor", + "rhs": null, + "arguments": [] + }, + { + "type": "extended-attribute", + "name": "Constructor", + "rhs": null, + "arguments": [ + { + "name": "radius", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + } + ] + }, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/json/dictionary-inherits.json b/test/syntax/baseline/dictionary-inherits.json similarity index 56% rename from test/syntax/json/dictionary-inherits.json rename to test/syntax/baseline/dictionary-inherits.json index 595c35cf79748a..fe39fdd17bacd6 100644 --- a/test/syntax/json/dictionary-inherits.json +++ b/test/syntax/baseline/dictionary-inherits.json @@ -2,88 +2,91 @@ { "type": "dictionary", "name": "PaintOptions", - "partial": false, + "inheritance": null, "members": [ { "type": "field", "name": "fillPattern", - "escapedName": "fillPattern", - "required": false, + "extAttrs": null, "idlType": { "type": "dictionary-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": true, "union": false, - "idlType": "DOMString", - "extAttrs": [] + "idlType": "DOMString" }, - "extAttrs": [], "default": { "type": "string", "value": "black" - } + }, + "required": false }, { "type": "field", "name": "strokePattern", - "escapedName": "strokePattern", - "required": false, + "extAttrs": null, "idlType": { "type": "dictionary-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": true, "union": false, - "idlType": "DOMString", - "extAttrs": [] + "idlType": "DOMString" }, - "extAttrs": [], "default": { "type": "null" - } + }, + "required": false }, { "type": "field", "name": "position", - "escapedName": "position", - "required": false, + "extAttrs": null, "idlType": { "type": "dictionary-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "Point", - "extAttrs": [] + "idlType": "Point" }, - "extAttrs": [], - "default": null + "default": null, + "required": false } ], - "inheritance": null, - "extAttrs": [] + "extAttrs": null, + "partial": false }, { "type": "dictionary", "name": "WetPaintOptions", - "partial": false, + "inheritance": { + "name": "PaintOptions" + }, "members": [ { "type": "field", "name": "hydrometry", - "escapedName": "hydrometry", - "required": false, + "extAttrs": null, "idlType": { "type": "dictionary-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "float", - "extAttrs": [] + "idlType": "float" }, - "extAttrs": [], - "default": null + "default": null, + "required": false } ], - "inheritance": "PaintOptions", - "extAttrs": [] + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" } ] diff --git a/test/syntax/json/dictionary.json b/test/syntax/baseline/dictionary.json similarity index 53% rename from test/syntax/json/dictionary.json rename to test/syntax/baseline/dictionary.json index 8bbc6b9dfabb4e..da774ee2e0d02c 100644 --- a/test/syntax/json/dictionary.json +++ b/test/syntax/baseline/dictionary.json @@ -2,145 +2,145 @@ { "type": "dictionary", "name": "PaintOptions", - "partial": false, + "inheritance": null, "members": [ { "type": "field", "name": "fillPattern", - "escapedName": "fillPattern", - "required": false, + "extAttrs": null, "idlType": { "type": "dictionary-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": true, "union": false, - "idlType": "DOMString", - "extAttrs": [] + "idlType": "DOMString" }, - "extAttrs": [], "default": { "type": "string", "value": "black" - } + }, + "required": false }, { "type": "field", "name": "strokePattern", - "escapedName": "strokePattern", - "required": false, + "extAttrs": null, "idlType": { "type": "dictionary-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": true, "union": false, - "idlType": "DOMString", - "extAttrs": [] + "idlType": "DOMString" }, - "extAttrs": [], "default": { "type": "null" - } + }, + "required": false }, { "type": "field", "name": "position", - "escapedName": "position", - "required": false, + "extAttrs": null, "idlType": { "type": "dictionary-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "Point", - "extAttrs": [] + "idlType": "Point" }, - "extAttrs": [], - "default": null + "default": null, + "required": false }, { "type": "field", "name": "seq", - "escapedName": "seq", - "required": false, + "extAttrs": null, "idlType": { "type": "dictionary-type", + "extAttrs": null, "generic": "sequence", "nullable": false, "union": false, - "idlType": { - "type": "dictionary-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "long", - "extAttrs": [] - }, - "extAttrs": [] + "idlType": [ + { + "type": "dictionary-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "long" + } + ] }, - "extAttrs": [], "default": { "type": "sequence", "value": [] - } + }, + "required": false }, { "type": "field", "name": "reqSeq", - "escapedName": "reqSeq", - "required": true, + "extAttrs": null, "idlType": { "type": "dictionary-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "long", - "extAttrs": [] + "idlType": "long" }, - "extAttrs": [], - "default": null + "default": null, + "required": true } ], - "inheritance": null, - "extAttrs": [] + "extAttrs": null, + "partial": false }, { "type": "dictionary", "name": "A", - "partial": true, "members": [ { "type": "field", "name": "h", - "escapedName": "h", - "required": false, + "extAttrs": null, "idlType": { "type": "dictionary-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "long", - "extAttrs": [] + "idlType": "long" }, - "extAttrs": [], - "default": null + "default": null, + "required": false }, { "type": "field", "name": "d", - "escapedName": "d", - "required": false, + "extAttrs": null, "idlType": { "type": "dictionary-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "long", - "extAttrs": [] + "idlType": "long" }, - "extAttrs": [], - "default": null + "default": null, + "required": false } ], - "extAttrs": [] + "extAttrs": null, + "partial": true + }, + { + "type": "eof", + "value": "", + "trivia": "\n" } ] diff --git a/test/syntax/baseline/documentation-dos.json b/test/syntax/baseline/documentation-dos.json new file mode 100644 index 00000000000000..b99d3112102ca3 --- /dev/null +++ b/test/syntax/baseline/documentation-dos.json @@ -0,0 +1,15 @@ +[ + { + "type": "interface", + "name": "Documentation", + "inheritance": null, + "members": [], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/json/documentation.json b/test/syntax/baseline/documentation.json similarity index 50% rename from test/syntax/json/documentation.json rename to test/syntax/baseline/documentation.json index baa0b5a09b5ee1..09f80237d3c8e8 100644 --- a/test/syntax/json/documentation.json +++ b/test/syntax/baseline/documentation.json @@ -2,9 +2,14 @@ { "type": "interface", "name": "Documentation", - "partial": false, - "members": [], "inheritance": null, - "extAttrs": [] + "members": [], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" } ] diff --git a/test/syntax/baseline/enum.json b/test/syntax/baseline/enum.json new file mode 100644 index 00000000000000..6fe31561fb0dd3 --- /dev/null +++ b/test/syntax/baseline/enum.json @@ -0,0 +1,131 @@ +[ + { + "type": "enum", + "name": "MealType", + "values": [ + { + "type": "enum-value", + "value": "rice" + }, + { + "type": "enum-value", + "value": "noodles" + }, + { + "type": "enum-value", + "value": "other" + } + ], + "extAttrs": null + }, + { + "type": "interface", + "name": "Meal", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "type", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "MealType" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "size", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "operation", + "name": "initialize", + "body": { + "name": "initialize", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "type", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "MealType" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "size", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "enum", + "name": "AltMealType", + "values": [ + { + "type": "enum-value", + "value": "rice" + }, + { + "type": "enum-value", + "value": "noodles" + }, + { + "type": "enum-value", + "value": "other" + } + ], + "extAttrs": null + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/equivalent-decl.json b/test/syntax/baseline/equivalent-decl.json new file mode 100644 index 00000000000000..ccbc1d0d1e51a6 --- /dev/null +++ b/test/syntax/baseline/equivalent-decl.json @@ -0,0 +1,295 @@ +[ + { + "type": "interface", + "name": "Dictionary", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "propertyCount", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "extAttrs": null, + "special": "", + "readonly": true + }, + { + "type": "operation", + "name": "getProperty", + "body": { + "name": "getProperty", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "arguments": [ + { + "name": "propertyName", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "getter" + }, + { + "type": "operation", + "name": "setProperty", + "body": { + "name": "setProperty", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "propertyName", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "propertyValue", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "setter" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "Dictionary2", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "propertyCount", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "extAttrs": null, + "special": "", + "readonly": true + }, + { + "type": "operation", + "name": "getProperty", + "body": { + "name": "getProperty", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "arguments": [ + { + "name": "propertyName", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "setProperty", + "body": { + "name": "setProperty", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "propertyName", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "propertyValue", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "", + "body": { + "name": "", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "arguments": [ + { + "name": "propertyName", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "getter" + }, + { + "type": "operation", + "name": "", + "body": { + "name": "", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "propertyName", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "propertyValue", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "setter" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/escaped-name.json b/test/syntax/baseline/escaped-name.json new file mode 100644 index 00000000000000..e56e1acbba064e --- /dev/null +++ b/test/syntax/baseline/escaped-name.json @@ -0,0 +1,23 @@ +[ + { + "type": "interface", + "name": "Iroha", + "inheritance": { + "name": "Magic" + }, + "members": [], + "extAttrs": null, + "partial": false + }, + { + "type": "includes", + "extAttrs": null, + "target": "Iroha", + "includes": "Color" + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/escaped-type.json b/test/syntax/baseline/escaped-type.json new file mode 100644 index 00000000000000..85fd4bbbe2cd3c --- /dev/null +++ b/test/syntax/baseline/escaped-type.json @@ -0,0 +1,42 @@ +[ + { + "type": "typedef", + "name": "EscapedType", + "idlType": { + "type": "typedef-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Type" + }, + "extAttrs": null + }, + { + "type": "typedef", + "name": "EscapedSequence", + "idlType": { + "type": "typedef-type", + "extAttrs": null, + "generic": "sequence", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "typedef-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Type" + } + ] + }, + "extAttrs": null + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/json/exception-inheritance.json b/test/syntax/baseline/exception-inheritance.json similarity index 100% rename from test/syntax/json/exception-inheritance.json rename to test/syntax/baseline/exception-inheritance.json diff --git a/test/syntax/baseline/extended-attributes.json b/test/syntax/baseline/extended-attributes.json new file mode 100644 index 00000000000000..97763fd9637b67 --- /dev/null +++ b/test/syntax/baseline/extended-attributes.json @@ -0,0 +1,244 @@ +[ + { + "type": "interface", + "name": "ServiceWorkerGlobalScope", + "inheritance": { + "name": "WorkerGlobalScope" + }, + "members": [], + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "Global", + "rhs": { + "type": "identifier-list", + "value": [ + { + "value": "Worker" + }, + { + "value": "ServiceWorker" + } + ] + }, + "arguments": [] + }, + { + "type": "extended-attribute", + "name": "Exposed", + "rhs": { + "type": "identifier", + "value": "ServiceWorker" + }, + "arguments": [] + } + ] + }, + "partial": false + }, + { + "type": "interface", + "name": "IdInterface", + "inheritance": null, + "members": [], + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "IntAttr", + "rhs": { + "type": "integer", + "value": "0" + }, + "arguments": [] + }, + { + "type": "extended-attribute", + "name": "FloatAttr", + "rhs": { + "type": "decimal", + "value": "3.14" + }, + "arguments": [] + }, + { + "type": "extended-attribute", + "name": "StringAttr", + "rhs": { + "type": "string", + "value": "\"abc\"" + }, + "arguments": [] + } + ] + }, + "partial": false + }, + { + "type": "interface", + "name": "Circle", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "r", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "double" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "cx", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "double" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "cy", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "double" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "circumference", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "double" + }, + "extAttrs": null, + "special": "", + "readonly": true + } + ], + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "Constructor", + "rhs": null, + "arguments": [] + }, + { + "type": "extended-attribute", + "name": "Constructor", + "rhs": null, + "arguments": [ + { + "name": "radius", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "double" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + } + ] + }, + "partial": false + }, + { + "type": "interface", + "name": "I", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "attrib", + "idlType": { + "type": "attribute-type", + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "XAttr", + "rhs": null, + "arguments": [] + } + ] + }, + "union": true, + "generic": "", + "nullable": false, + "idlType": [ + { + "type": null, + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "long" + }, + { + "type": null, + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Node" + } + ] + }, + "extAttrs": null, + "special": "", + "readonly": false + } + ], + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "Exposed", + "rhs": { + "type": "identifier", + "value": "Window" + }, + "arguments": [] + } + ] + }, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/generic.json b/test/syntax/baseline/generic.json new file mode 100644 index 00000000000000..85745695e89118 --- /dev/null +++ b/test/syntax/baseline/generic.json @@ -0,0 +1,186 @@ +[ + { + "type": "interface", + "name": "Foo", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "bar", + "body": { + "name": "bar", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "Promise", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "return-type", + "extAttrs": null, + "generic": "Promise", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "return-type", + "extAttrs": null, + "generic": "sequence", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": true, + "union": false, + "idlType": "DOMString" + } + ] + } + ] + } + ] + }, + "arguments": [] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "attribute", + "name": "baz", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "Promise", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + } + ] + }, + "extAttrs": null, + "special": "", + "readonly": true + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "ServiceWorkerClients", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "getServiced", + "body": { + "name": "getServiced", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "Promise", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": true, + "union": false, + "idlType": "Client" + } + ] + }, + "arguments": [] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "reloadAll", + "body": { + "name": "reloadAll", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "Promise", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "any" + } + ] + }, + "arguments": [] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "FetchEvent", + "inheritance": { + "name": "Event" + }, + "members": [ + { + "type": "operation", + "name": "default", + "body": { + "name": "default", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "Promise", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "any" + } + ] + }, + "arguments": [] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/getter-setter.json b/test/syntax/baseline/getter-setter.json new file mode 100644 index 00000000000000..07db2666beda25 --- /dev/null +++ b/test/syntax/baseline/getter-setter.json @@ -0,0 +1,111 @@ +[ + { + "type": "interface", + "name": "Dictionary", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "propertyCount", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "extAttrs": null, + "special": "", + "readonly": true + }, + { + "type": "operation", + "name": "", + "body": { + "name": "", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "arguments": [ + { + "name": "propertyName", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "getter" + }, + { + "type": "operation", + "name": "", + "body": { + "name": "", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "propertyName", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "propertyValue", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "setter" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/identifier-hyphen.json b/test/syntax/baseline/identifier-hyphen.json new file mode 100644 index 00000000000000..8dc7c4c3d4ed68 --- /dev/null +++ b/test/syntax/baseline/identifier-hyphen.json @@ -0,0 +1,51 @@ +[ + { + "type": "interface", + "name": "CSSStyleDeclaration", + "members": [ + { + "type": "attribute", + "name": "-will-change", + "idlType": { + "type": "attribute-type", + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "TreatNullAs", + "rhs": { + "type": "identifier", + "value": "EmptyString" + }, + "arguments": [] + } + ] + }, + "generic": "", + "nullable": false, + "union": false, + "idlType": "CSSOMString" + }, + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "CEReactions", + "rhs": null, + "arguments": [] + } + ] + }, + "special": "", + "readonly": false + } + ], + "extAttrs": null, + "partial": true + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/identifier-qualified-names.json b/test/syntax/baseline/identifier-qualified-names.json new file mode 100644 index 00000000000000..61496d811fc276 --- /dev/null +++ b/test/syntax/baseline/identifier-qualified-names.json @@ -0,0 +1,176 @@ +[ + { + "type": "typedef", + "name": "number", + "idlType": { + "type": "typedef-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "extAttrs": null + }, + { + "type": "interface", + "name": "System", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "createObject", + "body": { + "name": "createObject", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "object" + }, + "arguments": [ + { + "name": "interface", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "", + "body": { + "name": "", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "arguments": [ + { + "name": "keyName", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "getter" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "TextField", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "const", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "boolean" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "value", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": true, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "", + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "FooEventTarget", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "addEventListener", + "body": { + "name": "addEventListener", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "callback", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": true, + "union": false, + "idlType": "EventListener" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/indexed-properties.json b/test/syntax/baseline/indexed-properties.json new file mode 100644 index 00000000000000..b017882f851612 --- /dev/null +++ b/test/syntax/baseline/indexed-properties.json @@ -0,0 +1,257 @@ +[ + { + "type": "interface", + "name": "OrderedMap", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "size", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "extAttrs": null, + "special": "", + "readonly": true + }, + { + "type": "operation", + "name": "getByIndex", + "body": { + "name": "getByIndex", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "any" + }, + "arguments": [ + { + "name": "index", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "getter" + }, + { + "type": "operation", + "name": "setByIndex", + "body": { + "name": "setByIndex", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "index", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "value", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "any" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "setter" + }, + { + "type": "operation", + "name": "removeByIndex", + "body": { + "name": "removeByIndex", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "index", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "deleter" + }, + { + "type": "operation", + "name": "get", + "body": { + "name": "get", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "any" + }, + "arguments": [ + { + "name": "name", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "getter" + }, + { + "type": "operation", + "name": "set", + "body": { + "name": "set", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "name", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "value", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "any" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "setter" + }, + { + "type": "operation", + "name": "remove", + "body": { + "name": "remove", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "name", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "deleter" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/inherits-getter.json b/test/syntax/baseline/inherits-getter.json new file mode 100644 index 00000000000000..facea9cbd39a29 --- /dev/null +++ b/test/syntax/baseline/inherits-getter.json @@ -0,0 +1,98 @@ +[ + { + "type": "interface", + "name": "Animal", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "name", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "", + "readonly": true + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "Person", + "inheritance": { + "name": "Animal" + }, + "members": [ + { + "type": "attribute", + "name": "age", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned short" + }, + "extAttrs": null, + "special": "", + "readonly": true + }, + { + "type": "attribute", + "name": "name", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "inherit", + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "Ghost", + "inheritance": { + "name": "Person" + }, + "members": [ + { + "type": "attribute", + "name": "name", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "inherit", + "readonly": true + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/interface-inherits.json b/test/syntax/baseline/interface-inherits.json new file mode 100644 index 00000000000000..2138a1d313fa09 --- /dev/null +++ b/test/syntax/baseline/interface-inherits.json @@ -0,0 +1,83 @@ +[ + { + "type": "interface", + "name": "Animal", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "name", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "", + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "Human", + "inheritance": { + "name": "Animal" + }, + "members": [ + { + "type": "attribute", + "name": "pet", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Dog" + }, + "extAttrs": null, + "special": "", + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "Dog", + "inheritance": { + "name": "Animal" + }, + "members": [ + { + "type": "attribute", + "name": "owner", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Human" + }, + "extAttrs": null, + "special": "", + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/json/iterable.json b/test/syntax/baseline/iterable.json similarity index 51% rename from test/syntax/json/iterable.json rename to test/syntax/baseline/iterable.json index ee906f75ea2eb5..59d82cdeeddc69 100644 --- a/test/syntax/json/iterable.json +++ b/test/syntax/baseline/iterable.json @@ -2,85 +2,95 @@ { "type": "interface", "name": "IterableOne", - "partial": false, + "inheritance": null, "members": [ { "type": "iterable", "idlType": [ { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "long", - "extAttrs": [] + "idlType": "long" } ], - "extAttrs": [] + "extAttrs": null, + "readonly": false } ], - "inheritance": null, - "extAttrs": [] + "extAttrs": null, + "partial": false }, { "type": "interface", "name": "IterableTwo", - "partial": false, + "inheritance": null, "members": [ { "type": "iterable", "idlType": [ { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "short", - "extAttrs": [] + "idlType": "short" }, { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": true, "union": false, - "idlType": "double", - "extAttrs": [] + "idlType": "double" } ], - "extAttrs": [] + "extAttrs": null, + "readonly": false } ], - "inheritance": null, - "extAttrs": [] + "extAttrs": null, + "partial": false }, { "type": "interface", "name": "IterableThree", - "partial": false, + "inheritance": null, "members": [ { "type": "iterable", "idlType": [ { "type": null, - "generic": null, + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "XAttr", + "rhs": null, + "arguments": [] + } + ] + }, + "generic": "", "nullable": false, "union": false, - "idlType": "long", - "extAttrs": [ - { - "name": "XAttr", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] + "idlType": "long" } ], - "extAttrs": [] + "extAttrs": null, + "readonly": false } ], - "inheritance": null, - "extAttrs": [] + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" } ] diff --git a/test/syntax/json/iterator.json b/test/syntax/baseline/iterator.json similarity index 100% rename from test/syntax/json/iterator.json rename to test/syntax/baseline/iterator.json diff --git a/test/syntax/baseline/maplike.json b/test/syntax/baseline/maplike.json new file mode 100644 index 00000000000000..11c48b89253907 --- /dev/null +++ b/test/syntax/baseline/maplike.json @@ -0,0 +1,121 @@ +[ + { + "type": "interface", + "name": "MapLike", + "inheritance": null, + "members": [ + { + "type": "maplike", + "idlType": [ + { + "type": null, + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "long" + }, + { + "type": null, + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + } + ], + "extAttrs": null, + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "ReadOnlyMapLike", + "inheritance": null, + "members": [ + { + "type": "maplike", + "idlType": [ + { + "type": null, + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "long" + }, + { + "type": null, + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + } + ], + "extAttrs": null, + "readonly": true + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "I", + "inheritance": null, + "members": [ + { + "type": "maplike", + "idlType": [ + { + "type": null, + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "XAttr2", + "rhs": null, + "arguments": [] + } + ] + }, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + { + "type": null, + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "XAttr3", + "rhs": null, + "arguments": [] + } + ] + }, + "generic": "", + "nullable": false, + "union": false, + "idlType": "long" + } + ], + "extAttrs": null, + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/json/mixin.json b/test/syntax/baseline/mixin.json similarity index 51% rename from test/syntax/json/mixin.json rename to test/syntax/baseline/mixin.json index b037cb3577941a..1c933b0f60f81d 100644 --- a/test/syntax/json/mixin.json +++ b/test/syntax/baseline/mixin.json @@ -2,65 +2,71 @@ { "type": "interface mixin", "name": "GlobalCrypto", - "partial": false, "members": [ { "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, + "name": "crypto", "idlType": { "type": "attribute-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "Crypto", - "extAttrs": [] + "idlType": "Crypto" }, - "name": "crypto", - "escapedName": "crypto", - "extAttrs": [] + "extAttrs": null, + "special": "", + "readonly": true } ], - "extAttrs": [] + "extAttrs": null, + "partial": false }, { "type": "includes", + "extAttrs": null, "target": "Window", - "includes": "GlobalCrypto", - "extAttrs": [] + "includes": "GlobalCrypto" }, { "type": "includes", + "extAttrs": null, "target": "WorkerGlobalScope", - "includes": "GlobalCrypto", - "extAttrs": [] + "includes": "GlobalCrypto" }, { "type": "interface mixin", "name": "WindowOrWorkerGlobalScope", - "partial": true, "members": [ { "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, + "name": "crypto", "idlType": { "type": "attribute-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "Crypto", - "extAttrs": [] + "idlType": "Crypto" }, - "name": "crypto", - "escapedName": "crypto", - "extAttrs": [] + "extAttrs": null, + "special": "", + "readonly": true } ], - "extAttrs": [] + "extAttrs": null, + "partial": true + }, + { + "type": "interface mixin", + "name": "LocalCrypto", + "members": [], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" } ] diff --git a/test/syntax/baseline/namedconstructor.json b/test/syntax/baseline/namedconstructor.json new file mode 100644 index 00000000000000..8b9302f856d516 --- /dev/null +++ b/test/syntax/baseline/namedconstructor.json @@ -0,0 +1,53 @@ +[ + { + "type": "interface", + "name": "HTMLAudioElement", + "inheritance": { + "name": "HTMLMediaElement" + }, + "members": [], + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "NamedConstructor", + "rhs": { + "type": "identifier", + "value": "Audio" + }, + "arguments": [] + }, + { + "type": "extended-attribute", + "name": "NamedConstructor", + "rhs": { + "type": "identifier", + "value": "Audio" + }, + "arguments": [ + { + "name": "src", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + } + ] + }, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/namespace.json b/test/syntax/baseline/namespace.json new file mode 100644 index 00000000000000..f6c3be401c6516 --- /dev/null +++ b/test/syntax/baseline/namespace.json @@ -0,0 +1,138 @@ +[ + { + "type": "namespace", + "name": "VectorUtils", + "members": [ + { + "type": "attribute", + "name": "unit", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Vector" + }, + "extAttrs": null, + "special": "", + "readonly": true + }, + { + "type": "operation", + "name": "dotProduct", + "body": { + "name": "dotProduct", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "double" + }, + "arguments": [ + { + "name": "x", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Vector" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "y", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Vector" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "crossProduct", + "body": { + "name": "crossProduct", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Vector" + }, + "arguments": [ + { + "name": "x", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Vector" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "y", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Vector" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "namespace", + "name": "SomeNamespace", + "members": [], + "extAttrs": null, + "partial": true + }, + { + "type": "namespace", + "name": "ScalarUtils", + "members": [], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/nointerfaceobject.json b/test/syntax/baseline/nointerfaceobject.json new file mode 100644 index 00000000000000..83d344d1c6d1d7 --- /dev/null +++ b/test/syntax/baseline/nointerfaceobject.json @@ -0,0 +1,58 @@ +[ + { + "type": "interface", + "name": "Query", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "lookupEntry", + "body": { + "name": "lookupEntry", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "any" + }, + "arguments": [ + { + "name": "key", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "NoInterfaceObject", + "rhs": null, + "arguments": [] + } + ] + }, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/nullable.json b/test/syntax/baseline/nullable.json new file mode 100644 index 00000000000000..b46f4343bd1c04 --- /dev/null +++ b/test/syntax/baseline/nullable.json @@ -0,0 +1,31 @@ +[ + { + "type": "interface", + "name": "Node", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "namespaceURI", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": true, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "", + "readonly": true + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/nullableobjects.json b/test/syntax/baseline/nullableobjects.json new file mode 100644 index 00000000000000..34d64faceb0d9f --- /dev/null +++ b/test/syntax/baseline/nullableobjects.json @@ -0,0 +1,98 @@ +[ + { + "type": "interface", + "name": "A", + "inheritance": null, + "members": [], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "B", + "inheritance": null, + "members": [], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "C", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "f", + "body": { + "name": "f", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "x", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": true, + "union": false, + "idlType": "A" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "f", + "body": { + "name": "f", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "x", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": true, + "union": false, + "idlType": "B" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/operation-optional-arg.json b/test/syntax/baseline/operation-optional-arg.json new file mode 100644 index 00000000000000..ea255379f6b3cb --- /dev/null +++ b/test/syntax/baseline/operation-optional-arg.json @@ -0,0 +1,94 @@ +[ + { + "type": "interface", + "name": "ColorCreator", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "createColor", + "body": { + "name": "createColor", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "object" + }, + "arguments": [ + { + "name": "v1", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "v2", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "v3", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "alpha", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "default": { + "type": "number", + "value": "3.5" + }, + "optional": true, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/overloading.json b/test/syntax/baseline/overloading.json new file mode 100644 index 00000000000000..c436b70685b950 --- /dev/null +++ b/test/syntax/baseline/overloading.json @@ -0,0 +1,303 @@ +[ + { + "type": "interface", + "name": "A", + "inheritance": null, + "members": [], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "B", + "inheritance": null, + "members": [], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "C", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "f", + "body": { + "name": "f", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "x", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "A" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "f", + "body": { + "name": "f", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "x", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "B" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "D", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "f", + "body": { + "name": "f", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "a", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "f", + "body": { + "name": "f", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "a", + "idlType": { + "type": "argument-type", + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "AllowAny", + "rhs": null, + "arguments": [] + } + ] + }, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "b", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "c", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "default": null, + "optional": false, + "variadic": true + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "f", + "body": { + "name": "f", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "f", + "body": { + "name": "f", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "a", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "long" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "b", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "c", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": true, + "variadic": false + }, + { + "name": "d", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "default": null, + "optional": false, + "variadic": true + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/overridebuiltins.json b/test/syntax/baseline/overridebuiltins.json new file mode 100644 index 00000000000000..1b3d81a87a747b --- /dev/null +++ b/test/syntax/baseline/overridebuiltins.json @@ -0,0 +1,73 @@ +[ + { + "type": "interface", + "name": "StringMap2", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "length", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "extAttrs": null, + "special": "", + "readonly": true + }, + { + "type": "operation", + "name": "lookup", + "body": { + "name": "lookup", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "arguments": [ + { + "name": "key", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "getter" + } + ], + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "OverrideBuiltins", + "rhs": null, + "arguments": [] + } + ] + }, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/json/partial-interface.json b/test/syntax/baseline/partial-interface.json similarity index 50% rename from test/syntax/json/partial-interface.json rename to test/syntax/baseline/partial-interface.json index d791262f465691..8e1a9dbede7957 100644 --- a/test/syntax/json/partial-interface.json +++ b/test/syntax/baseline/partial-interface.json @@ -2,54 +2,53 @@ { "type": "interface", "name": "Foo", - "partial": false, + "inheritance": null, "members": [ { "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, + "name": "bar", "idlType": { "type": "attribute-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "DOMString", - "extAttrs": [] + "idlType": "DOMString" }, - "name": "bar", - "escapedName": "bar", - "extAttrs": [] + "extAttrs": null, + "special": "", + "readonly": false } ], - "inheritance": null, - "extAttrs": [] + "extAttrs": null, + "partial": false }, { "type": "interface", "name": "Foo", - "partial": true, "members": [ { "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, + "name": "quux", "idlType": { "type": "attribute-type", - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "DOMString", - "extAttrs": [] + "idlType": "DOMString" }, - "name": "quux", - "escapedName": "quux", - "extAttrs": [] + "extAttrs": null, + "special": "", + "readonly": false } ], - "extAttrs": [] + "extAttrs": null, + "partial": true + }, + { + "type": "eof", + "value": "", + "trivia": "" } ] diff --git a/test/syntax/baseline/primitives.json b/test/syntax/baseline/primitives.json new file mode 100644 index 00000000000000..d1755c46eb53e3 --- /dev/null +++ b/test/syntax/baseline/primitives.json @@ -0,0 +1,271 @@ +[ + { + "type": "interface", + "name": "Primitives", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "truth", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "boolean" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "character", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "byte" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "value", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "octet" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "number", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "short" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "positive", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned short" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "big", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "long" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "bigpositive", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "bigbig", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "long long" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "bigbigpositive", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long long" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "real", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "bigreal", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "double" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "realwithinfinity", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unrestricted float" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "bigrealwithinfinity", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unrestricted double" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "string", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "bytes", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "ByteString" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "date", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Date" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "regexp", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "RegExp" + }, + "extAttrs": null, + "special": "", + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/promise-void.json b/test/syntax/baseline/promise-void.json new file mode 100644 index 00000000000000..b8ce0ef5c56d40 --- /dev/null +++ b/test/syntax/baseline/promise-void.json @@ -0,0 +1,40 @@ +[ + { + "type": "interface", + "name": "Cat", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "meow", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "Promise", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + } + ] + }, + "extAttrs": null, + "special": "", + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/prototyperoot.json b/test/syntax/baseline/prototyperoot.json new file mode 100644 index 00000000000000..62040bd0b40880 --- /dev/null +++ b/test/syntax/baseline/prototyperoot.json @@ -0,0 +1,40 @@ +[ + { + "type": "interface", + "name": "Node", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "nodeType", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned short" + }, + "extAttrs": null, + "special": "", + "readonly": true + } + ], + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "PrototypeRoot", + "rhs": null, + "arguments": [] + } + ] + }, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/putforwards.json b/test/syntax/baseline/putforwards.json new file mode 100644 index 00000000000000..d14e382feb3e6c --- /dev/null +++ b/test/syntax/baseline/putforwards.json @@ -0,0 +1,58 @@ +[ + { + "type": "interface", + "name": "Person", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "name", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Name" + }, + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "PutForwards", + "rhs": { + "type": "identifier", + "value": "full" + }, + "arguments": [] + } + ] + }, + "special": "", + "readonly": true + }, + { + "type": "attribute", + "name": "age", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned short" + }, + "extAttrs": null, + "special": "", + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/record.json b/test/syntax/baseline/record.json new file mode 100644 index 00000000000000..1827e355ec1c74 --- /dev/null +++ b/test/syntax/baseline/record.json @@ -0,0 +1,221 @@ +[ + { + "type": "interface", + "name": "Foo", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "foo", + "body": { + "name": "foo", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "param", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "sequence", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "argument-type", + "extAttrs": null, + "generic": "record", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "ByteString" + }, + { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "any" + } + ] + } + ] + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "bar", + "body": { + "name": "bar", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "record", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + { + "type": "return-type", + "extAttrs": null, + "union": true, + "generic": "", + "nullable": true, + "idlType": [ + { + "type": null, + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + { + "type": null, + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + } + ] + } + ] + }, + "arguments": [] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "Constructor", + "rhs": null, + "arguments": [ + { + "name": "init", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "record", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "USVString" + }, + { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "USVString" + } + ] + }, + "default": null, + "optional": false, + "variadic": false + } + ] + } + ] + }, + "partial": false + }, + { + "type": "interface", + "name": "Bar", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "bar", + "body": { + "name": "bar", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "record", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + { + "type": "return-type", + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "XAttr", + "rhs": null, + "arguments": [] + } + ] + }, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + } + ] + }, + "arguments": [] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/reg-operations.json b/test/syntax/baseline/reg-operations.json new file mode 100644 index 00000000000000..117451c73f0a9b --- /dev/null +++ b/test/syntax/baseline/reg-operations.json @@ -0,0 +1,153 @@ +[ + { + "type": "interface", + "name": "Dimensions", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "width", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "height", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "extAttrs": null, + "special": "", + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "Button", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "isMouseOver", + "body": { + "name": "isMouseOver", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "boolean" + }, + "arguments": [] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "setDimensions", + "body": { + "name": "setDimensions", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "size", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Dimensions" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "setDimensions", + "body": { + "name": "setDimensions", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "width", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "height", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/replaceable.json b/test/syntax/baseline/replaceable.json new file mode 100644 index 00000000000000..a5ffff03eacc1a --- /dev/null +++ b/test/syntax/baseline/replaceable.json @@ -0,0 +1,58 @@ +[ + { + "type": "interface", + "name": "Counter", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "value", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "Replaceable", + "rhs": null, + "arguments": [] + } + ] + }, + "special": "", + "readonly": true + }, + { + "type": "operation", + "name": "increment", + "body": { + "name": "increment", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/sequence.json b/test/syntax/baseline/sequence.json new file mode 100644 index 00000000000000..ab872365e2c3be --- /dev/null +++ b/test/syntax/baseline/sequence.json @@ -0,0 +1,145 @@ +[ + { + "type": "interface", + "name": "Canvas", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "drawPolygon", + "body": { + "name": "drawPolygon", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "coordinates", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "sequence", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + } + ] + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "getInflectionPoints", + "body": { + "name": "getInflectionPoints", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "sequence", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + } + ] + }, + "arguments": [] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "I", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "f1", + "body": { + "name": "f1", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "arg", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "sequence", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "argument-type", + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "XAttr", + "rhs": null, + "arguments": [] + } + ] + }, + "generic": "", + "nullable": false, + "union": false, + "idlType": "long" + } + ] + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/json/setlike.json b/test/syntax/baseline/setlike.json similarity index 50% rename from test/syntax/json/setlike.json rename to test/syntax/baseline/setlike.json index d8583538fd0f0a..992e3aaba2ed4c 100644 --- a/test/syntax/json/setlike.json +++ b/test/syntax/baseline/setlike.json @@ -2,80 +2,87 @@ { "type": "interface", "name": "SetLike", - "partial": false, + "inheritance": null, "members": [ { "type": "setlike", "idlType": [ { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "long", - "extAttrs": [] + "idlType": "long" } ], - "readonly": false, - "extAttrs": [] + "extAttrs": null, + "readonly": false } ], - "inheritance": null, - "extAttrs": [] + "extAttrs": null, + "partial": false }, { "type": "interface", "name": "ReadOnlySetLike", - "partial": false, + "inheritance": null, "members": [ { "type": "setlike", "idlType": [ { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "long", - "extAttrs": [] + "idlType": "long" } ], - "readonly": true, - "extAttrs": [] + "extAttrs": null, + "readonly": true } ], - "inheritance": null, - "extAttrs": [] + "extAttrs": null, + "partial": false }, { "type": "interface", "name": "SetLikeExt", - "partial": false, + "inheritance": null, "members": [ { "type": "setlike", "idlType": [ { "type": null, - "generic": null, + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "XAttr", + "rhs": null, + "arguments": [] + } + ] + }, + "generic": "", "nullable": false, "union": false, - "idlType": "long", - "extAttrs": [ - { - "name": "XAttr", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] + "idlType": "long" } ], - "readonly": false, - "extAttrs": [] + "extAttrs": null, + "readonly": false } ], - "inheritance": null, - "extAttrs": [] + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" } ] diff --git a/test/syntax/baseline/static.json b/test/syntax/baseline/static.json new file mode 100644 index 00000000000000..c68bcf5e20fc8c --- /dev/null +++ b/test/syntax/baseline/static.json @@ -0,0 +1,145 @@ +[ + { + "type": "interface", + "name": "Point", + "inheritance": null, + "members": [], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "Circle", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "cx", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "cy", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "radius", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "triangulationCount", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "long" + }, + "extAttrs": null, + "special": "static", + "readonly": true + }, + { + "type": "operation", + "name": "triangulate", + "body": { + "name": "triangulate", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Point" + }, + "arguments": [ + { + "name": "c1", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Circle" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "c2", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Circle" + }, + "default": null, + "optional": false, + "variadic": false + }, + { + "name": "c3", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Circle" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "static" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/stringifier-attribute.json b/test/syntax/baseline/stringifier-attribute.json new file mode 100644 index 00000000000000..0ca7b40608dba8 --- /dev/null +++ b/test/syntax/baseline/stringifier-attribute.json @@ -0,0 +1,55 @@ +[ + { + "type": "interface", + "name": "Student", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "id", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "name", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "stringifier", + "readonly": false + } + ], + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "Constructor", + "rhs": null, + "arguments": [] + } + ] + }, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/stringifier-custom.json b/test/syntax/baseline/stringifier-custom.json new file mode 100644 index 00000000000000..c2ccb2ba5824f3 --- /dev/null +++ b/test/syntax/baseline/stringifier-custom.json @@ -0,0 +1,88 @@ +[ + { + "type": "interface", + "name": "Student", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "id", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "familyName", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": true, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "givenName", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "operation", + "name": "", + "body": { + "name": "", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "arguments": [] + }, + "extAttrs": null, + "special": "stringifier" + } + ], + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "Constructor", + "rhs": null, + "arguments": [] + } + ] + }, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/stringifier.json b/test/syntax/baseline/stringifier.json new file mode 100644 index 00000000000000..d18aec89e9aefe --- /dev/null +++ b/test/syntax/baseline/stringifier.json @@ -0,0 +1,50 @@ +[ + { + "type": "interface", + "name": "A", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "", + "body": { + "name": "", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "arguments": [] + }, + "extAttrs": null, + "special": "stringifier" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "B", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "", + "body": null, + "extAttrs": null, + "special": "stringifier" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/treatasnull.json b/test/syntax/baseline/treatasnull.json new file mode 100644 index 00000000000000..b526841a6b712e --- /dev/null +++ b/test/syntax/baseline/treatasnull.json @@ -0,0 +1,91 @@ +[ + { + "type": "interface", + "name": "Dog", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "name", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "owner", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "operation", + "name": "isMemberOfBreed", + "body": { + "name": "isMemberOfBreed", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "boolean" + }, + "arguments": [ + { + "name": "breedName", + "idlType": { + "type": "argument-type", + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "TreatNullAs", + "rhs": { + "type": "identifier", + "value": "EmptyString" + }, + "arguments": [] + } + ] + }, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/baseline/treatasundefined.json b/test/syntax/baseline/treatasundefined.json new file mode 100644 index 00000000000000..2c00d17b557b31 --- /dev/null +++ b/test/syntax/baseline/treatasundefined.json @@ -0,0 +1,91 @@ +[ + { + "type": "interface", + "name": "Cat", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "name", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "owner", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "operation", + "name": "isMemberOfBreed", + "body": { + "name": "isMemberOfBreed", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "boolean" + }, + "arguments": [ + { + "name": "breedName", + "idlType": { + "type": "argument-type", + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "TreatUndefinedAs", + "rhs": { + "type": "identifier", + "value": "EmptyString" + }, + "arguments": [] + } + ] + }, + "generic": "", + "nullable": false, + "union": false, + "idlType": "DOMString" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/json/typedef-union.json b/test/syntax/baseline/typedef-union.json similarity index 55% rename from test/syntax/json/typedef-union.json rename to test/syntax/baseline/typedef-union.json index 31e24198ab130f..5fe55bae8c4982 100644 --- a/test/syntax/json/typedef-union.json +++ b/test/syntax/baseline/typedef-union.json @@ -1,48 +1,53 @@ [ { "type": "typedef", + "name": "TexImageSource", "idlType": { "type": "typedef-type", - "generic": null, - "nullable": false, + "extAttrs": null, "union": true, + "generic": "", + "nullable": false, "idlType": [ { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "ImageData", - "extAttrs": [] + "idlType": "ImageData" }, { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "HTMLImageElement", - "extAttrs": [] + "idlType": "HTMLImageElement" }, { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "HTMLCanvasElement", - "extAttrs": [] + "idlType": "HTMLCanvasElement" }, { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "HTMLVideoElement", - "extAttrs": [] + "idlType": "HTMLVideoElement" } - ], - "extAttrs": [] + ] }, - "name": "TexImageSource", - "extAttrs": [] + "extAttrs": null + }, + { + "type": "eof", + "value": "", + "trivia": "\n" } ] diff --git a/test/syntax/baseline/typedef.json b/test/syntax/baseline/typedef.json new file mode 100644 index 00000000000000..4c73060550a59f --- /dev/null +++ b/test/syntax/baseline/typedef.json @@ -0,0 +1,219 @@ +[ + { + "type": "interface", + "name": "Point", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "x", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "y", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "float" + }, + "extAttrs": null, + "special": "", + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "typedef", + "name": "PointSequence", + "idlType": { + "type": "typedef-type", + "extAttrs": null, + "generic": "sequence", + "nullable": false, + "union": false, + "idlType": [ + { + "type": "typedef-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Point" + } + ] + }, + "extAttrs": null + }, + { + "type": "interface", + "name": "Rect", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "topleft", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Point" + }, + "extAttrs": null, + "special": "", + "readonly": false + }, + { + "type": "attribute", + "name": "bottomright", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Point" + }, + "extAttrs": null, + "special": "", + "readonly": false + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "interface", + "name": "Widget", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "bounds", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Rect" + }, + "extAttrs": null, + "special": "", + "readonly": true + }, + { + "type": "operation", + "name": "pointWithinBounds", + "body": { + "name": "pointWithinBounds", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "boolean" + }, + "arguments": [ + { + "name": "p", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "Point" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "allPointsWithinBounds", + "body": { + "name": "allPointsWithinBounds", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "boolean" + }, + "arguments": [ + { + "name": "ps", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "PointSequence" + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "typedef", + "name": "value", + "idlType": { + "type": "typedef-type", + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "Clamp", + "rhs": null, + "arguments": [] + } + ] + }, + "generic": "", + "nullable": false, + "union": false, + "idlType": "octet" + }, + "extAttrs": null + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/baseline/typesuffixes.json b/test/syntax/baseline/typesuffixes.json new file mode 100644 index 00000000000000..fc0b9cdc98fc94 --- /dev/null +++ b/test/syntax/baseline/typesuffixes.json @@ -0,0 +1,58 @@ +[ + { + "type": "interface", + "name": "Suffixes", + "inheritance": null, + "members": [ + { + "type": "operation", + "name": "test", + "body": { + "name": "test", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "foo", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "sequence", + "nullable": true, + "union": false, + "idlType": [ + { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": true, + "union": false, + "idlType": "DOMString" + } + ] + }, + "default": null, + "optional": false, + "variadic": false + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "\n" + } +] diff --git a/test/syntax/json/uniontype.json b/test/syntax/baseline/uniontype.json similarity index 54% rename from test/syntax/json/uniontype.json rename to test/syntax/baseline/uniontype.json index 90eb074ef3a0a7..26b6a7f9e71e4f 100644 --- a/test/syntax/json/uniontype.json +++ b/test/syntax/baseline/uniontype.json @@ -2,129 +2,130 @@ { "type": "interface", "name": "Union", - "partial": false, + "inheritance": null, "members": [ { "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, + "name": "test", "idlType": { "type": "attribute-type", - "generic": null, - "nullable": false, + "extAttrs": null, "union": true, + "generic": "", + "nullable": false, "idlType": [ { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "float", - "extAttrs": [] + "idlType": "float" }, { "type": null, - "generic": null, - "nullable": false, + "extAttrs": null, "union": true, + "generic": "", + "nullable": false, "idlType": [ { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "Date", - "extAttrs": [] + "idlType": "Date" }, { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "Event", - "extAttrs": [] + "idlType": "Event" } - ], - "extAttrs": [] + ] }, { "type": null, - "generic": null, - "nullable": true, + "extAttrs": null, "union": true, + "generic": "", + "nullable": true, "idlType": [ { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "Node", - "extAttrs": [] + "idlType": "Node" }, { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "DOMString", - "extAttrs": [] + "idlType": "DOMString" } - ], - "extAttrs": [] + ] } - ], - "extAttrs": [] + ] }, - "name": "test", - "escapedName": "test", - "extAttrs": [] + "extAttrs": null, + "special": "", + "readonly": false }, { "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, + "name": "test2", "idlType": { "type": "attribute-type", - "generic": null, - "nullable": false, + "extAttrs": null, "union": true, + "generic": "", + "nullable": false, "idlType": [ { "type": null, - "generic": null, + "extAttrs": { + "items": [ + { + "type": "extended-attribute", + "name": "EnforceRange", + "rhs": null, + "arguments": [] + } + ] + }, + "generic": "", "nullable": false, "union": false, - "idlType": "long", - "extAttrs": [ - { - "name": "EnforceRange", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] + "idlType": "long" }, { "type": null, - "generic": null, + "extAttrs": null, + "generic": "", "nullable": false, "union": false, - "idlType": "Date", - "extAttrs": [] + "idlType": "Date" } - ], - "extAttrs": [] + ] }, - "name": "test2", - "escapedName": "test2", - "extAttrs": [] + "extAttrs": null, + "special": "", + "readonly": false } ], - "inheritance": null, - "extAttrs": [] + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" } ] diff --git a/test/syntax/baseline/variadic-operations.json b/test/syntax/baseline/variadic-operations.json new file mode 100644 index 00000000000000..f68aaa6f411634 --- /dev/null +++ b/test/syntax/baseline/variadic-operations.json @@ -0,0 +1,97 @@ +[ + { + "type": "interface", + "name": "IntegerSet", + "inheritance": null, + "members": [ + { + "type": "attribute", + "name": "cardinality", + "idlType": { + "type": "attribute-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "unsigned long" + }, + "extAttrs": null, + "special": "", + "readonly": true + }, + { + "type": "operation", + "name": "union", + "body": { + "name": "union", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "ints", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "long" + }, + "default": null, + "optional": false, + "variadic": true + } + ] + }, + "extAttrs": null, + "special": "" + }, + { + "type": "operation", + "name": "intersection", + "body": { + "name": "intersection", + "idlType": { + "type": "return-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "void" + }, + "arguments": [ + { + "name": "ints", + "idlType": { + "type": "argument-type", + "extAttrs": null, + "generic": "", + "nullable": false, + "union": false, + "idlType": "long" + }, + "default": null, + "optional": false, + "variadic": true + } + ] + }, + "extAttrs": null, + "special": "" + } + ], + "extAttrs": null, + "partial": false + }, + { + "type": "eof", + "value": "", + "trivia": "" + } +] diff --git a/test/syntax/idl/attributes.widl b/test/syntax/idl/attributes.widl index f665c1fc47276f..7b5d5a296faf64 100644 --- a/test/syntax/idl/attributes.widl +++ b/test/syntax/idl/attributes.widl @@ -7,5 +7,5 @@ interface Person { attribute unsigned short age; // required is an allowed attribute name - attribute any required; + attribute any required ; }; diff --git a/test/syntax/idl/dictionary.widl b/test/syntax/idl/dictionary.widl index c64a14c8590987..2641eb03979565 100644 --- a/test/syntax/idl/dictionary.widl +++ b/test/syntax/idl/dictionary.widl @@ -9,7 +9,7 @@ dictionary PaintOptions { required long reqSeq; }; -partial dictionary A { +partial dictionary _A { long h; long d; -}; \ No newline at end of file +}; diff --git a/test/syntax/idl/documentation-dos.widl b/test/syntax/idl/documentation-dos.widl index fb801101f14910..92599af9d94455 100644 --- a/test/syntax/idl/documentation-dos.widl +++ b/test/syntax/idl/documentation-dos.widl @@ -1,33 +1,33 @@ -/** -* \brief Testing documentation features -* -* This is a -* single paragraph -* -*

This is valid.

-*

This is valid.

-*

This is valid.

-*

This is valid.

-*
    -*
  • This
  • -*
  • is
  • -*
  • valid
  • -*
-*
-*
This
-*
valid
-*
-* -* -* -* -* -* -* -* -*
thisis
valid
-*

This is
valid.

-*

This is
valid.

-*

This is
valid.

-*/ -interface Documentation {}; \ No newline at end of file +/** +* \brief Testing documentation features +* +* This is a +* single paragraph +* +*

This is valid.

+*

This is valid.

+*

This is valid.

+*

This is valid.

+*
    +*
  • This
  • +*
  • is
  • +*
  • valid
  • +*
+*
+*
This
+*
valid
+*
+* +* +* +* +* +* +* +* +*
thisis
valid
+*

This is
valid.

+*

This is
valid.

+*

This is
valid.

+*/ +interface Documentation {}; diff --git a/test/syntax/idl/enum.widl b/test/syntax/idl/enum.widl index 37c4ffddee31b6..9ea3d747ef29f3 100644 --- a/test/syntax/idl/enum.widl +++ b/test/syntax/idl/enum.widl @@ -7,4 +7,4 @@ interface Meal { void initialize(MealType type, float size); }; -enum AltMealType { "rice", "noodles", "other", }; \ No newline at end of file +enum _AltMealType { "rice", "noodles", "other", }; diff --git a/test/syntax/idl/escaped-name.widl b/test/syntax/idl/escaped-name.widl new file mode 100644 index 00000000000000..ad314ac867126d --- /dev/null +++ b/test/syntax/idl/escaped-name.widl @@ -0,0 +1,2 @@ +interface _Iroha : _Magic {}; +_Iroha includes _Color; diff --git a/test/syntax/idl/escaped-type.widl b/test/syntax/idl/escaped-type.widl new file mode 100644 index 00000000000000..f863bc74a4f75a --- /dev/null +++ b/test/syntax/idl/escaped-type.widl @@ -0,0 +1,2 @@ +typedef _Type EscapedType; +typedef sequence<_Type> EscapedSequence; diff --git a/test/syntax/idl/identifier-hyphen.widl b/test/syntax/idl/identifier-hyphen.widl new file mode 100644 index 00000000000000..dc2323f4077abe --- /dev/null +++ b/test/syntax/idl/identifier-hyphen.widl @@ -0,0 +1,3 @@ +partial interface CSSStyleDeclaration { + [CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString -will-change; +}; diff --git a/test/syntax/idl/mixin.widl b/test/syntax/idl/mixin.widl index 7c37a6ee4207b3..5af0436198a54d 100644 --- a/test/syntax/idl/mixin.widl +++ b/test/syntax/idl/mixin.widl @@ -10,3 +10,5 @@ WorkerGlobalScope includes GlobalCrypto; partial interface mixin WindowOrWorkerGlobalScope { readonly attribute Crypto crypto; }; + +interface mixin _LocalCrypto {}; diff --git a/test/syntax/idl/namespace.widl b/test/syntax/idl/namespace.widl index d9610555e17ad2..93930c3f4dc60b 100644 --- a/test/syntax/idl/namespace.widl +++ b/test/syntax/idl/namespace.widl @@ -7,4 +7,6 @@ namespace VectorUtils { partial namespace SomeNamespace { /* namespace_members... */ -}; \ No newline at end of file +}; + +namespace _ScalarUtils {}; diff --git a/test/syntax/idl/nullable.widl b/test/syntax/idl/nullable.widl index ccbf625ff8aea1..feb529d6f37f0a 100644 --- a/test/syntax/idl/nullable.widl +++ b/test/syntax/idl/nullable.widl @@ -1,9 +1,4 @@ -// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06 -interface MyConstants { - const boolean? ARE_WE_THERE_YET = false; -}; - interface Node { readonly attribute DOMString? namespaceURI; // ... -}; \ No newline at end of file +}; diff --git a/test/syntax/idl/typedef.widl b/test/syntax/idl/typedef.widl index b4c17d8d36a89f..a1fc9e744914ac 100644 --- a/test/syntax/idl/typedef.widl +++ b/test/syntax/idl/typedef.widl @@ -19,4 +19,4 @@ boolean allPointsWithinBounds(PointSequence ps); }; - typedef [Clamp] octet value; \ No newline at end of file + typedef [Clamp] octet _value; diff --git a/test/syntax/json/allowany.json b/test/syntax/json/allowany.json deleted file mode 100644 index 2a93518ed94637..00000000000000 --- a/test/syntax/json/allowany.json +++ /dev/null @@ -1,112 +0,0 @@ -[ - { - "type": "interface", - "name": "B", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "g", - "escapedName": "g", - "arguments": [], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "g", - "escapedName": "g", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "B", - "extAttrs": [] - }, - "name": "b", - "escapedName": "b" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "g", - "escapedName": "g", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [ - { - "name": "AllowAny", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "s", - "escapedName": "s" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/attributes.json b/test/syntax/json/attributes.json deleted file mode 100644 index f02cb2187a2af2..00000000000000 --- a/test/syntax/json/attributes.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "type": "interface", - "name": "Person", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned short", - "extAttrs": [] - }, - "name": "age", - "escapedName": "age", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "any", - "extAttrs": [] - }, - "name": "required", - "escapedName": "required", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/callback.json b/test/syntax/json/callback.json deleted file mode 100644 index 89d63aae53d02a..00000000000000 --- a/test/syntax/json/callback.json +++ /dev/null @@ -1,126 +0,0 @@ -[ - { - "type": "callback", - "name": "AsyncOperationCallback", - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "status", - "escapedName": "status" - } - ], - "extAttrs": [] - }, - { - "type": "callback interface", - "name": "EventHandler", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "eventOccurred", - "escapedName": "eventOccurred", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "details", - "escapedName": "details" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "callback", - "name": "SortCallback", - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "boolean", - "extAttrs": [] - }, - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "any", - "extAttrs": [] - }, - "name": "a", - "escapedName": "a" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "any", - "extAttrs": [] - }, - "name": "b", - "escapedName": "b" - } - ], - "extAttrs": [] - } -] diff --git a/test/syntax/json/constructor.json b/test/syntax/json/constructor.json deleted file mode 100644 index efdd1b5a6bedc6..00000000000000 --- a/test/syntax/json/constructor.json +++ /dev/null @@ -1,113 +0,0 @@ -[ - { - "type": "interface", - "name": "Circle", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "r", - "escapedName": "r", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "cx", - "escapedName": "cx", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "cy", - "escapedName": "cy", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "circumference", - "escapedName": "circumference", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [ - { - "name": "Constructor", - "arguments": null, - "type": "extended-attribute", - "rhs": null - }, - { - "name": "Constructor", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "radius", - "escapedName": "radius" - } - ], - "type": "extended-attribute", - "rhs": null - } - ] - } -] diff --git a/test/syntax/json/documentation-dos.json b/test/syntax/json/documentation-dos.json deleted file mode 100644 index baa0b5a09b5ee1..00000000000000 --- a/test/syntax/json/documentation-dos.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "type": "interface", - "name": "Documentation", - "partial": false, - "members": [], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/enum.json b/test/syntax/json/enum.json deleted file mode 100644 index 11f5d09f54b62b..00000000000000 --- a/test/syntax/json/enum.json +++ /dev/null @@ -1,138 +0,0 @@ -[ - { - "type": "enum", - "name": "MealType", - "values": [ - { - "type": "string", - "value": "rice" - }, - { - "type": "string", - "value": "noodles" - }, - { - "type": "string", - "value": "other" - } - ], - "extAttrs": [] - }, - { - "type": "interface", - "name": "Meal", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "MealType", - "extAttrs": [] - }, - "name": "type", - "escapedName": "type", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "size", - "escapedName": "size", - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "initialize", - "escapedName": "initialize", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "MealType", - "extAttrs": [] - }, - "name": "type", - "escapedName": "type" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "size", - "escapedName": "size" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "enum", - "name": "AltMealType", - "values": [ - { - "type": "string", - "value": "rice" - }, - { - "type": "string", - "value": "noodles" - }, - { - "type": "string", - "value": "other" - } - ], - "extAttrs": [] - } -] diff --git a/test/syntax/json/equivalent-decl.json b/test/syntax/json/equivalent-decl.json deleted file mode 100644 index ee079a77790531..00000000000000 --- a/test/syntax/json/equivalent-decl.json +++ /dev/null @@ -1,326 +0,0 @@ -[ - { - "type": "interface", - "name": "Dictionary", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "propertyCount", - "escapedName": "propertyCount", - "extAttrs": [] - }, - { - "type": "operation", - "getter": true, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "getProperty", - "escapedName": "getProperty", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "propertyName", - "escapedName": "propertyName" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": true, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "setProperty", - "escapedName": "setProperty", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "propertyName", - "escapedName": "propertyName" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "propertyValue", - "escapedName": "propertyValue" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "Dictionary2", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "propertyCount", - "escapedName": "propertyCount", - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "getProperty", - "escapedName": "getProperty", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "propertyName", - "escapedName": "propertyName" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "setProperty", - "escapedName": "setProperty", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "propertyName", - "escapedName": "propertyName" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "propertyValue", - "escapedName": "propertyValue" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": true, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": null, - "escapedName": null, - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "propertyName", - "escapedName": "propertyName" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": true, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": null, - "escapedName": null, - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "propertyName", - "escapedName": "propertyName" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "propertyValue", - "escapedName": "propertyValue" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/extended-attributes.json b/test/syntax/json/extended-attributes.json deleted file mode 100644 index 25f56f0340ac87..00000000000000 --- a/test/syntax/json/extended-attributes.json +++ /dev/null @@ -1,240 +0,0 @@ -[ - { - "type": "interface", - "name": "ServiceWorkerGlobalScope", - "partial": false, - "members": [], - "inheritance": "WorkerGlobalScope", - "extAttrs": [ - { - "name": "Global", - "arguments": null, - "type": "extended-attribute", - "rhs": { - "type": "identifier-list", - "value": [ - "Worker", - "ServiceWorker" - ] - } - }, - { - "name": "Exposed", - "arguments": null, - "type": "extended-attribute", - "rhs": { - "type": "identifier", - "value": "ServiceWorker" - } - } - ] - }, - { - "type": "interface", - "name": "IdInterface", - "partial": false, - "members": [], - "inheritance": null, - "extAttrs": [ - { - "name": "IntAttr", - "arguments": null, - "type": "extended-attribute", - "rhs": { - "type": "integer", - "value": "0" - } - }, - { - "name": "FloatAttr", - "arguments": null, - "type": "extended-attribute", - "rhs": { - "type": "float", - "value": "3.14" - } - }, - { - "name": "StringAttr", - "arguments": null, - "type": "extended-attribute", - "rhs": { - "type": "string", - "value": "\"abc\"" - } - } - ] - }, - { - "type": "interface", - "name": "Circle", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "double", - "extAttrs": [] - }, - "name": "r", - "escapedName": "r", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "double", - "extAttrs": [] - }, - "name": "cx", - "escapedName": "cx", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "double", - "extAttrs": [] - }, - "name": "cy", - "escapedName": "cy", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "double", - "extAttrs": [] - }, - "name": "circumference", - "escapedName": "circumference", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [ - { - "name": "Constructor", - "arguments": null, - "type": "extended-attribute", - "rhs": null - }, - { - "name": "Constructor", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "double", - "extAttrs": [] - }, - "name": "radius", - "escapedName": "radius" - } - ], - "type": "extended-attribute", - "rhs": null - } - ] - }, - { - "type": "interface", - "name": "I", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": true, - "idlType": [ - { - "type": null, - "generic": null, - "nullable": false, - "union": false, - "idlType": "long", - "extAttrs": [] - }, - { - "type": null, - "generic": null, - "nullable": false, - "union": false, - "idlType": "Node", - "extAttrs": [] - } - ], - "extAttrs": [ - { - "name": "XAttr", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] - }, - "name": "attrib", - "escapedName": "attrib", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [ - { - "name": "Exposed", - "arguments": null, - "type": "extended-attribute", - "rhs": { - "type": "identifier", - "value": "Window" - } - } - ] - } -] diff --git a/test/syntax/json/generic.json b/test/syntax/json/generic.json deleted file mode 100644 index d3c26ac7cd0ddd..00000000000000 --- a/test/syntax/json/generic.json +++ /dev/null @@ -1,176 +0,0 @@ -[ - { - "type": "interface", - "name": "Foo", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": "Promise", - "nullable": false, - "union": false, - "idlType": { - "type": "return-type", - "generic": "Promise", - "nullable": false, - "union": false, - "idlType": { - "type": "return-type", - "generic": "sequence", - "nullable": false, - "union": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": true, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "extAttrs": [] - }, - "extAttrs": [] - }, - "extAttrs": [] - }, - "name": "bar", - "escapedName": "bar", - "arguments": [], - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": "Promise", - "nullable": false, - "union": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "extAttrs": [] - }, - "name": "baz", - "escapedName": "baz", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "ServiceWorkerClients", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": "Promise", - "nullable": false, - "union": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": true, - "union": false, - "idlType": "Client", - "extAttrs": [] - }, - "extAttrs": [] - }, - "name": "getServiced", - "escapedName": "getServiced", - "arguments": [], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": "Promise", - "nullable": false, - "union": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "any", - "extAttrs": [] - }, - "extAttrs": [] - }, - "name": "reloadAll", - "escapedName": "reloadAll", - "arguments": [], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "FetchEvent", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": "Promise", - "nullable": false, - "union": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "any", - "extAttrs": [] - }, - "extAttrs": [] - }, - "name": "default", - "escapedName": "default", - "arguments": [], - "extAttrs": [] - } - ], - "inheritance": "Event", - "extAttrs": [] - } -] diff --git a/test/syntax/json/getter-setter.json b/test/syntax/json/getter-setter.json deleted file mode 100644 index 6f8196fe56dd3d..00000000000000 --- a/test/syntax/json/getter-setter.json +++ /dev/null @@ -1,119 +0,0 @@ -[ - { - "type": "interface", - "name": "Dictionary", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "propertyCount", - "escapedName": "propertyCount", - "extAttrs": [] - }, - { - "type": "operation", - "getter": true, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": null, - "escapedName": null, - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "propertyName", - "escapedName": "propertyName" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": true, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": null, - "escapedName": null, - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "propertyName", - "escapedName": "propertyName" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "propertyValue", - "escapedName": "propertyValue" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/identifier-qualified-names.json b/test/syntax/json/identifier-qualified-names.json deleted file mode 100644 index 098cdcb1fbbc4f..00000000000000 --- a/test/syntax/json/identifier-qualified-names.json +++ /dev/null @@ -1,189 +0,0 @@ -[ - { - "type": "typedef", - "idlType": { - "type": "typedef-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "number", - "extAttrs": [] - }, - { - "type": "interface", - "name": "System", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "object", - "extAttrs": [] - }, - "name": "createObject", - "escapedName": "createObject", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "interface", - "escapedName": "_interface" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": true, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": null, - "escapedName": null, - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "keyName", - "escapedName": "keyName" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "TextField", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "boolean", - "extAttrs": [] - }, - "name": "const", - "escapedName": "_const", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": true, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "value", - "escapedName": "_value", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "FooEventTarget", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "addEventListener", - "escapedName": "addEventListener", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": true, - "union": false, - "idlType": "EventListener", - "extAttrs": [] - }, - "name": "callback", - "escapedName": "callback" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/implements.json b/test/syntax/json/implements.json deleted file mode 100644 index 1736118cd902fb..00000000000000 --- a/test/syntax/json/implements.json +++ /dev/null @@ -1,113 +0,0 @@ -[ - { - "type": "interface", - "name": "Node", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned short", - "extAttrs": [] - }, - "name": "nodeType", - "escapedName": "nodeType", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "EventTarget", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "addEventListener", - "escapedName": "addEventListener", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "type", - "escapedName": "type" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "EventListener", - "extAttrs": [] - }, - "name": "listener", - "escapedName": "listener" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "boolean", - "extAttrs": [] - }, - "name": "useCapture", - "escapedName": "useCapture" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "implements", - "target": "Node", - "implements": "EventTarget", - "extAttrs": [] - } -] diff --git a/test/syntax/json/indexed-properties.json b/test/syntax/json/indexed-properties.json deleted file mode 100644 index dccd511af96bfd..00000000000000 --- a/test/syntax/json/indexed-properties.json +++ /dev/null @@ -1,283 +0,0 @@ -[ - { - "type": "interface", - "name": "OrderedMap", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "size", - "escapedName": "size", - "extAttrs": [] - }, - { - "type": "operation", - "getter": true, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "any", - "extAttrs": [] - }, - "name": "getByIndex", - "escapedName": "getByIndex", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "index", - "escapedName": "index" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": true, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "setByIndex", - "escapedName": "setByIndex", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "index", - "escapedName": "index" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "any", - "extAttrs": [] - }, - "name": "value", - "escapedName": "value" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": true, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "removeByIndex", - "escapedName": "removeByIndex", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "index", - "escapedName": "index" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": true, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "any", - "extAttrs": [] - }, - "name": "get", - "escapedName": "get", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "name", - "escapedName": "name" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": true, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "set", - "escapedName": "set", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "name", - "escapedName": "name" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "any", - "extAttrs": [] - }, - "name": "value", - "escapedName": "value" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": true, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "remove", - "escapedName": "remove", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "name", - "escapedName": "name" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/inherits-getter.json b/test/syntax/json/inherits-getter.json deleted file mode 100644 index 86eb68e270e46a..00000000000000 --- a/test/syntax/json/inherits-getter.json +++ /dev/null @@ -1,101 +0,0 @@ -[ - { - "type": "interface", - "name": "Animal", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "name", - "escapedName": "name", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "Person", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned short", - "extAttrs": [] - }, - "name": "age", - "escapedName": "age", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": true, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "name", - "escapedName": "name", - "extAttrs": [] - } - ], - "inheritance": "Animal", - "extAttrs": [] - }, - { - "type": "interface", - "name": "Ghost", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": true, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "name", - "escapedName": "name", - "extAttrs": [] - } - ], - "inheritance": "Person", - "extAttrs": [] - } -] diff --git a/test/syntax/json/interface-inherits.json b/test/syntax/json/interface-inherits.json deleted file mode 100644 index 02caf35f605ab3..00000000000000 --- a/test/syntax/json/interface-inherits.json +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "type": "interface", - "name": "Animal", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "name", - "escapedName": "name", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "Human", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Dog", - "extAttrs": [] - }, - "name": "pet", - "escapedName": "pet", - "extAttrs": [] - } - ], - "inheritance": "Animal", - "extAttrs": [] - }, - { - "type": "interface", - "name": "Dog", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Human", - "extAttrs": [] - }, - "name": "owner", - "escapedName": "owner", - "extAttrs": [] - } - ], - "inheritance": "Animal", - "extAttrs": [] - } -] diff --git a/test/syntax/json/legacyiterable.json b/test/syntax/json/legacyiterable.json deleted file mode 100644 index 80fd000a849371..00000000000000 --- a/test/syntax/json/legacyiterable.json +++ /dev/null @@ -1,25 +0,0 @@ -[ - { - "type": "interface", - "name": "LegacyIterable", - "partial": false, - "members": [ - { - "type": "legacyiterable", - "idlType": [ - { - "type": null, - "generic": null, - "nullable": false, - "union": false, - "idlType": "long", - "extAttrs": [] - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/maplike.json b/test/syntax/json/maplike.json deleted file mode 100644 index 2cb8c360ee3e2f..00000000000000 --- a/test/syntax/json/maplike.json +++ /dev/null @@ -1,112 +0,0 @@ -[ - { - "type": "interface", - "name": "MapLike", - "partial": false, - "members": [ - { - "type": "maplike", - "idlType": [ - { - "type": null, - "generic": null, - "nullable": false, - "union": false, - "idlType": "long", - "extAttrs": [] - }, - { - "type": null, - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - } - ], - "readonly": false, - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "ReadOnlyMapLike", - "partial": false, - "members": [ - { - "type": "maplike", - "idlType": [ - { - "type": null, - "generic": null, - "nullable": false, - "union": false, - "idlType": "long", - "extAttrs": [] - }, - { - "type": null, - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - } - ], - "readonly": true, - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "I", - "partial": false, - "members": [ - { - "type": "maplike", - "idlType": [ - { - "type": null, - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [ - { - "name": "XAttr2", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] - }, - { - "type": null, - "generic": null, - "nullable": false, - "union": false, - "idlType": "long", - "extAttrs": [ - { - "name": "XAttr3", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] - } - ], - "readonly": false, - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/namedconstructor.json b/test/syntax/json/namedconstructor.json deleted file mode 100644 index deb429e986eb10..00000000000000 --- a/test/syntax/json/namedconstructor.json +++ /dev/null @@ -1,46 +0,0 @@ -[ - { - "type": "interface", - "name": "HTMLAudioElement", - "partial": false, - "members": [], - "inheritance": "HTMLMediaElement", - "extAttrs": [ - { - "name": "NamedConstructor", - "arguments": null, - "type": "extended-attribute", - "rhs": { - "type": "identifier", - "value": "Audio" - } - }, - { - "name": "NamedConstructor", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "src", - "escapedName": "src" - } - ], - "type": "extended-attribute", - "rhs": { - "type": "identifier", - "value": "Audio" - } - } - ] - } -] diff --git a/test/syntax/json/namespace.json b/test/syntax/json/namespace.json deleted file mode 100644 index 9e37b26fa6504f..00000000000000 --- a/test/syntax/json/namespace.json +++ /dev/null @@ -1,141 +0,0 @@ -[ - { - "type": "namespace", - "name": "VectorUtils", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Vector", - "extAttrs": [] - }, - "name": "unit", - "escapedName": "unit", - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "double", - "extAttrs": [] - }, - "name": "dotProduct", - "escapedName": "dotProduct", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Vector", - "extAttrs": [] - }, - "name": "x", - "escapedName": "x" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Vector", - "extAttrs": [] - }, - "name": "y", - "escapedName": "y" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Vector", - "extAttrs": [] - }, - "name": "crossProduct", - "escapedName": "crossProduct", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Vector", - "extAttrs": [] - }, - "name": "x", - "escapedName": "x" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Vector", - "extAttrs": [] - }, - "name": "y", - "escapedName": "y" - } - ], - "extAttrs": [] - } - ], - "extAttrs": [] - }, - { - "type": "namespace", - "name": "SomeNamespace", - "partial": true, - "members": [], - "extAttrs": [] - } -] diff --git a/test/syntax/json/nointerfaceobject.json b/test/syntax/json/nointerfaceobject.json deleted file mode 100644 index cafb5e0e156bd0..00000000000000 --- a/test/syntax/json/nointerfaceobject.json +++ /dev/null @@ -1,55 +0,0 @@ -[ - { - "type": "interface", - "name": "Query", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "any", - "extAttrs": [] - }, - "name": "lookupEntry", - "escapedName": "lookupEntry", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "key", - "escapedName": "key" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [ - { - "name": "NoInterfaceObject", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] - } -] diff --git a/test/syntax/json/nullable.json b/test/syntax/json/nullable.json deleted file mode 100644 index f325e2eab7b8af..00000000000000 --- a/test/syntax/json/nullable.json +++ /dev/null @@ -1,56 +0,0 @@ -[ - { - "type": "interface", - "name": "MyConstants", - "partial": false, - "members": [ - { - "type": "const", - "nullable": true, - "idlType": { - "type": "const-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "boolean", - "extAttrs": [] - }, - "name": "ARE_WE_THERE_YET", - "value": { - "type": "boolean", - "value": false - }, - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "Node", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": true, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "namespaceURI", - "escapedName": "namespaceURI", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/nullableobjects.json b/test/syntax/json/nullableobjects.json deleted file mode 100644 index 27ecd25d363bfb..00000000000000 --- a/test/syntax/json/nullableobjects.json +++ /dev/null @@ -1,101 +0,0 @@ -[ - { - "type": "interface", - "name": "A", - "partial": false, - "members": [], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "B", - "partial": false, - "members": [], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "C", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "f", - "escapedName": "f", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": true, - "union": false, - "idlType": "A", - "extAttrs": [] - }, - "name": "x", - "escapedName": "x" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "f", - "escapedName": "f", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": true, - "union": false, - "idlType": "B", - "extAttrs": [] - }, - "name": "x", - "escapedName": "x" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/operation-optional-arg.json b/test/syntax/json/operation-optional-arg.json deleted file mode 100644 index 4b7436ba5baf76..00000000000000 --- a/test/syntax/json/operation-optional-arg.json +++ /dev/null @@ -1,99 +0,0 @@ -[ - { - "type": "interface", - "name": "ColorCreator", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "object", - "extAttrs": [] - }, - "name": "createColor", - "escapedName": "createColor", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "v1", - "escapedName": "v1" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "v2", - "escapedName": "v2" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "v3", - "escapedName": "v3" - }, - { - "optional": true, - "variadic": false, - "default": { - "type": "number", - "value": "3.5" - }, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "alpha", - "escapedName": "alpha" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/overloading.json b/test/syntax/json/overloading.json deleted file mode 100644 index bf7aca6cde3808..00000000000000 --- a/test/syntax/json/overloading.json +++ /dev/null @@ -1,328 +0,0 @@ -[ - { - "type": "interface", - "name": "A", - "partial": false, - "members": [], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "B", - "partial": false, - "members": [], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "C", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "f", - "escapedName": "f", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "A", - "extAttrs": [] - }, - "name": "x", - "escapedName": "x" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "f", - "escapedName": "f", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "B", - "extAttrs": [] - }, - "name": "x", - "escapedName": "x" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "D", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "f", - "escapedName": "f", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "a", - "escapedName": "a" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "f", - "escapedName": "f", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [ - { - "name": "AllowAny", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "a", - "escapedName": "a" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "b", - "escapedName": "b" - }, - { - "optional": false, - "variadic": true, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "c", - "escapedName": "c" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "f", - "escapedName": "f", - "arguments": [], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "f", - "escapedName": "f", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "long", - "extAttrs": [] - }, - "name": "a", - "escapedName": "a" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "b", - "escapedName": "b" - }, - { - "optional": true, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "c", - "escapedName": "c" - }, - { - "optional": false, - "variadic": true, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "d", - "escapedName": "d" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/overridebuiltins.json b/test/syntax/json/overridebuiltins.json deleted file mode 100644 index e54a468eb98e86..00000000000000 --- a/test/syntax/json/overridebuiltins.json +++ /dev/null @@ -1,73 +0,0 @@ -[ - { - "type": "interface", - "name": "StringMap2", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "length", - "escapedName": "length", - "extAttrs": [] - }, - { - "type": "operation", - "getter": true, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "lookup", - "escapedName": "lookup", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "key", - "escapedName": "key" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [ - { - "name": "OverrideBuiltins", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] - } -] diff --git a/test/syntax/json/primitives.json b/test/syntax/json/primitives.json deleted file mode 100644 index a216221140c65a..00000000000000 --- a/test/syntax/json/primitives.json +++ /dev/null @@ -1,317 +0,0 @@ -[ - { - "type": "interface", - "name": "Primitives", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "boolean", - "extAttrs": [] - }, - "name": "truth", - "escapedName": "truth", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "byte", - "extAttrs": [] - }, - "name": "character", - "escapedName": "character", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "octet", - "extAttrs": [] - }, - "name": "value", - "escapedName": "value", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "short", - "extAttrs": [] - }, - "name": "number", - "escapedName": "number", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned short", - "extAttrs": [] - }, - "name": "positive", - "escapedName": "positive", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "long", - "extAttrs": [] - }, - "name": "big", - "escapedName": "big", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "bigpositive", - "escapedName": "bigpositive", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "long long", - "extAttrs": [] - }, - "name": "bigbig", - "escapedName": "bigbig", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long long", - "extAttrs": [] - }, - "name": "bigbigpositive", - "escapedName": "bigbigpositive", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "real", - "escapedName": "real", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "double", - "extAttrs": [] - }, - "name": "bigreal", - "escapedName": "bigreal", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unrestricted float", - "extAttrs": [] - }, - "name": "realwithinfinity", - "escapedName": "realwithinfinity", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unrestricted double", - "extAttrs": [] - }, - "name": "bigrealwithinfinity", - "escapedName": "bigrealwithinfinity", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "string", - "escapedName": "string", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "ByteString", - "extAttrs": [] - }, - "name": "bytes", - "escapedName": "bytes", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Date", - "extAttrs": [] - }, - "name": "date", - "escapedName": "date", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "RegExp", - "extAttrs": [] - }, - "name": "regexp", - "escapedName": "regexp", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/promise-void.json b/test/syntax/json/promise-void.json deleted file mode 100644 index 7676838b8179d9..00000000000000 --- a/test/syntax/json/promise-void.json +++ /dev/null @@ -1,36 +0,0 @@ -[ - { - "type": "interface", - "name": "Cat", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": "Promise", - "nullable": false, - "union": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "extAttrs": [] - }, - "name": "meow", - "escapedName": "meow", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/prototyperoot.json b/test/syntax/json/prototyperoot.json deleted file mode 100644 index cec79ff66b6a49..00000000000000 --- a/test/syntax/json/prototyperoot.json +++ /dev/null @@ -1,36 +0,0 @@ -[ - { - "type": "interface", - "name": "Node", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned short", - "extAttrs": [] - }, - "name": "nodeType", - "escapedName": "nodeType", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [ - { - "name": "PrototypeRoot", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] - } -] diff --git a/test/syntax/json/putforwards.json b/test/syntax/json/putforwards.json deleted file mode 100644 index 951b3ef718ccc9..00000000000000 --- a/test/syntax/json/putforwards.json +++ /dev/null @@ -1,57 +0,0 @@ -[ - { - "type": "interface", - "name": "Person", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Name", - "extAttrs": [] - }, - "name": "name", - "escapedName": "name", - "extAttrs": [ - { - "name": "PutForwards", - "arguments": null, - "type": "extended-attribute", - "rhs": { - "type": "identifier", - "value": "full" - } - } - ] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned short", - "extAttrs": [] - }, - "name": "age", - "escapedName": "age", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/record.json b/test/syntax/json/record.json deleted file mode 100644 index 1be5427c74d6c8..00000000000000 --- a/test/syntax/json/record.json +++ /dev/null @@ -1,220 +0,0 @@ -[ - { - "type": "interface", - "name": "Foo", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "foo", - "escapedName": "foo", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": "sequence", - "nullable": false, - "union": false, - "idlType": { - "type": "argument-type", - "generic": "record", - "nullable": false, - "union": false, - "idlType": [ - { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "ByteString", - "extAttrs": [] - }, - { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "any", - "extAttrs": [] - } - ], - "extAttrs": [] - }, - "extAttrs": [] - }, - "name": "param", - "escapedName": "param" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": "record", - "nullable": false, - "union": false, - "idlType": [ - { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - { - "type": "return-type", - "generic": null, - "nullable": true, - "union": true, - "idlType": [ - { - "type": null, - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - { - "type": null, - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - } - ], - "extAttrs": [] - } - ], - "extAttrs": [] - }, - "name": "bar", - "escapedName": "bar", - "arguments": [], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [ - { - "name": "Constructor", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": "record", - "nullable": false, - "union": false, - "idlType": [ - { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "USVString", - "extAttrs": [] - }, - { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "USVString", - "extAttrs": [] - } - ], - "extAttrs": [] - }, - "name": "init", - "escapedName": "init" - } - ], - "type": "extended-attribute", - "rhs": null - } - ] - }, - { - "type": "interface", - "name": "Bar", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": "record", - "nullable": false, - "union": false, - "idlType": [ - { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [ - { - "name": "XAttr", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] - } - ], - "extAttrs": [] - }, - "name": "bar", - "escapedName": "bar", - "arguments": [], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/reg-operations.json b/test/syntax/json/reg-operations.json deleted file mode 100644 index 8795c59ec87371..00000000000000 --- a/test/syntax/json/reg-operations.json +++ /dev/null @@ -1,166 +0,0 @@ -[ - { - "type": "interface", - "name": "Dimensions", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "width", - "escapedName": "width", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "height", - "escapedName": "height", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "Button", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "boolean", - "extAttrs": [] - }, - "name": "isMouseOver", - "escapedName": "isMouseOver", - "arguments": [], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "setDimensions", - "escapedName": "setDimensions", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Dimensions", - "extAttrs": [] - }, - "name": "size", - "escapedName": "size" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "setDimensions", - "escapedName": "setDimensions", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "width", - "escapedName": "width" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "height", - "escapedName": "height" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/replaceable.json b/test/syntax/json/replaceable.json deleted file mode 100644 index 133891d461db31..00000000000000 --- a/test/syntax/json/replaceable.json +++ /dev/null @@ -1,56 +0,0 @@ -[ - { - "type": "interface", - "name": "Counter", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "value", - "escapedName": "value", - "extAttrs": [ - { - "name": "Replaceable", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "increment", - "escapedName": "increment", - "arguments": [], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/sequence.json b/test/syntax/json/sequence.json deleted file mode 100644 index ead0cdd862c786..00000000000000 --- a/test/syntax/json/sequence.json +++ /dev/null @@ -1,142 +0,0 @@ -[ - { - "type": "interface", - "name": "Canvas", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "drawPolygon", - "escapedName": "drawPolygon", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": "sequence", - "nullable": false, - "union": false, - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "extAttrs": [] - }, - "name": "coordinates", - "escapedName": "coordinates" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": "sequence", - "nullable": false, - "union": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "extAttrs": [] - }, - "name": "getInflectionPoints", - "escapedName": "getInflectionPoints", - "arguments": [], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "I", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "f1", - "escapedName": "f1", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": "sequence", - "nullable": false, - "union": false, - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "long", - "extAttrs": [ - { - "name": "XAttr", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] - }, - "extAttrs": [] - }, - "name": "arg", - "escapedName": "arg" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/static.json b/test/syntax/json/static.json deleted file mode 100644 index d0ddf35ec6e4b5..00000000000000 --- a/test/syntax/json/static.json +++ /dev/null @@ -1,160 +0,0 @@ -[ - { - "type": "interface", - "name": "Point", - "partial": false, - "members": [], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "Circle", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "cx", - "escapedName": "cx", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "cy", - "escapedName": "cy", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "radius", - "escapedName": "radius", - "extAttrs": [] - }, - { - "type": "attribute", - "static": true, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "long", - "extAttrs": [] - }, - "name": "triangulationCount", - "escapedName": "triangulationCount", - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": true, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Point", - "extAttrs": [] - }, - "name": "triangulate", - "escapedName": "triangulate", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Circle", - "extAttrs": [] - }, - "name": "c1", - "escapedName": "c1" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Circle", - "extAttrs": [] - }, - "name": "c2", - "escapedName": "c2" - }, - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Circle", - "extAttrs": [] - }, - "name": "c3", - "escapedName": "c3" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/stringifier-attribute.json b/test/syntax/json/stringifier-attribute.json deleted file mode 100644 index dbca7f17902c2b..00000000000000 --- a/test/syntax/json/stringifier-attribute.json +++ /dev/null @@ -1,54 +0,0 @@ -[ - { - "type": "interface", - "name": "Student", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "id", - "escapedName": "id", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": true, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "name", - "escapedName": "name", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [ - { - "name": "Constructor", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] - } -] diff --git a/test/syntax/json/stringifier-custom.json b/test/syntax/json/stringifier-custom.json deleted file mode 100644 index c13df6ef10c0c5..00000000000000 --- a/test/syntax/json/stringifier-custom.json +++ /dev/null @@ -1,92 +0,0 @@ -[ - { - "type": "interface", - "name": "Student", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "id", - "escapedName": "id", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": true, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "familyName", - "escapedName": "familyName", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "givenName", - "escapedName": "givenName", - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": true, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": null, - "escapedName": null, - "arguments": [], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [ - { - "name": "Constructor", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] - } -] diff --git a/test/syntax/json/stringifier.json b/test/syntax/json/stringifier.json deleted file mode 100644 index a4f23e03f66d42..00000000000000 --- a/test/syntax/json/stringifier.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "type": "interface", - "name": "A", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": true, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": null, - "escapedName": null, - "arguments": [], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "B", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": true, - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/treatasnull.json b/test/syntax/json/treatasnull.json deleted file mode 100644 index d5156bcb4f1b5d..00000000000000 --- a/test/syntax/json/treatasnull.json +++ /dev/null @@ -1,94 +0,0 @@ -[ - { - "type": "interface", - "name": "Dog", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "name", - "escapedName": "name", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "owner", - "escapedName": "owner", - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "boolean", - "extAttrs": [] - }, - "name": "isMemberOfBreed", - "escapedName": "isMemberOfBreed", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [ - { - "name": "TreatNullAs", - "arguments": null, - "type": "extended-attribute", - "rhs": { - "type": "identifier", - "value": "EmptyString" - } - } - ], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "breedName", - "escapedName": "breedName" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/treatasundefined.json b/test/syntax/json/treatasundefined.json deleted file mode 100644 index 1e98315d9f13bf..00000000000000 --- a/test/syntax/json/treatasundefined.json +++ /dev/null @@ -1,94 +0,0 @@ -[ - { - "type": "interface", - "name": "Cat", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "name", - "escapedName": "name", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "owner", - "escapedName": "owner", - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "boolean", - "extAttrs": [] - }, - "name": "isMemberOfBreed", - "escapedName": "isMemberOfBreed", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [ - { - "name": "TreatUndefinedAs", - "arguments": null, - "type": "extended-attribute", - "rhs": { - "type": "identifier", - "value": "EmptyString" - } - } - ], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "name": "breedName", - "escapedName": "breedName" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/typedef.json b/test/syntax/json/typedef.json deleted file mode 100644 index 35f988e721e75e..00000000000000 --- a/test/syntax/json/typedef.json +++ /dev/null @@ -1,233 +0,0 @@ -[ - { - "type": "interface", - "name": "Point", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "x", - "escapedName": "x", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "float", - "extAttrs": [] - }, - "name": "y", - "escapedName": "y", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "typedef", - "idlType": { - "type": "typedef-type", - "generic": "sequence", - "nullable": false, - "union": false, - "idlType": { - "type": "typedef-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Point", - "extAttrs": [] - }, - "extAttrs": [] - }, - "name": "PointSequence", - "extAttrs": [] - }, - { - "type": "interface", - "name": "Rect", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Point", - "extAttrs": [] - }, - "name": "topleft", - "escapedName": "topleft", - "extAttrs": [] - }, - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": false, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Point", - "extAttrs": [] - }, - "name": "bottomright", - "escapedName": "bottomright", - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "interface", - "name": "Widget", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Rect", - "extAttrs": [] - }, - "name": "bounds", - "escapedName": "bounds", - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "boolean", - "extAttrs": [] - }, - "name": "pointWithinBounds", - "escapedName": "pointWithinBounds", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "Point", - "extAttrs": [] - }, - "name": "p", - "escapedName": "p" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "boolean", - "extAttrs": [] - }, - "name": "allPointsWithinBounds", - "escapedName": "allPointsWithinBounds", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "PointSequence", - "extAttrs": [] - }, - "name": "ps", - "escapedName": "ps" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - }, - { - "type": "typedef", - "idlType": { - "type": "typedef-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "octet", - "extAttrs": [ - { - "name": "Clamp", - "arguments": null, - "type": "extended-attribute", - "rhs": null - } - ] - }, - "name": "value", - "extAttrs": [] - } -] diff --git a/test/syntax/json/typesuffixes.json b/test/syntax/json/typesuffixes.json deleted file mode 100644 index 52870c22f4b476..00000000000000 --- a/test/syntax/json/typesuffixes.json +++ /dev/null @@ -1,55 +0,0 @@ -[ - { - "type": "interface", - "name": "Suffixes", - "partial": false, - "members": [ - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "test", - "escapedName": "test", - "arguments": [ - { - "optional": false, - "variadic": false, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": "sequence", - "nullable": true, - "union": false, - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": true, - "union": false, - "idlType": "DOMString", - "extAttrs": [] - }, - "extAttrs": [] - }, - "name": "foo", - "escapedName": "foo" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/syntax/json/variadic-operations.json b/test/syntax/json/variadic-operations.json deleted file mode 100644 index 3280b7b6a78a94..00000000000000 --- a/test/syntax/json/variadic-operations.json +++ /dev/null @@ -1,103 +0,0 @@ -[ - { - "type": "interface", - "name": "IntegerSet", - "partial": false, - "members": [ - { - "type": "attribute", - "static": false, - "stringifier": false, - "inherit": false, - "readonly": true, - "idlType": { - "type": "attribute-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "unsigned long", - "extAttrs": [] - }, - "name": "cardinality", - "escapedName": "cardinality", - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "union", - "escapedName": "union", - "arguments": [ - { - "optional": false, - "variadic": true, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "long", - "extAttrs": [] - }, - "name": "ints", - "escapedName": "ints" - } - ], - "extAttrs": [] - }, - { - "type": "operation", - "getter": false, - "setter": false, - "deleter": false, - "static": false, - "stringifier": false, - "idlType": { - "type": "return-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "void", - "extAttrs": [] - }, - "name": "intersection", - "escapedName": "intersection", - "arguments": [ - { - "optional": false, - "variadic": true, - "default": null, - "extAttrs": [], - "idlType": { - "type": "argument-type", - "generic": null, - "nullable": false, - "union": false, - "idlType": "long", - "extAttrs": [] - }, - "name": "ints", - "escapedName": "ints" - } - ], - "extAttrs": [] - } - ], - "inheritance": null, - "extAttrs": [] - } -] diff --git a/test/util/acquire.js b/test/util/acquire.js index 6f37dd6083c3c7..c259828154a867 100644 --- a/test/util/acquire.js +++ b/test/util/acquire.js @@ -4,5 +4,14 @@ const { collect } = require("./collect"); const fs = require("fs"); for (const test of collect("syntax")) { - fs.writeFileSync(test.jsonPath, `${JSON.stringify(test.ast, null, 4)}\n`) + fs.writeFileSync(test.baselinePath, `${JSON.stringify(test.ast, null, 4)}\n`); +} + +for (const test of collect("invalid", { expectError: true, raw: true })) { + const content = + test.error ? test.error.message : + test.validation ? test.validation.join("\n") : + ""; + + fs.writeFileSync(test.baselinePath, `${content}\n`); } diff --git a/test/util/collect.js b/test/util/collect.js index 7e3d9d3bf31267..bb53cf2fa9e15c 100644 --- a/test/util/collect.js +++ b/test/util/collect.js @@ -1,6 +1,6 @@ "use strict"; -const wp = require("../../lib/webidl2"); +const wp = require("../../dist/webidl2"); const pth = require("path"); const fs = require("fs"); const jdp = require("jsondiffpatch"); @@ -9,7 +9,7 @@ const jdp = require("jsondiffpatch"); * Collects test items from the specified directory * @param {string} base */ -function* collect(base, { expectError } = {}) { +function* collect(base, { expectError, raw } = {}) { base = pth.join(__dirname, "..", base); const dir = pth.join(base, "idl"); const idls = fs.readdirSync(dir) @@ -17,38 +17,49 @@ function* collect(base, { expectError } = {}) { .map(it => pth.join(dir, it)); for (const path of idls) { - const optFile = pth.join(base, "opt", pth.basename(path)).replace(".widl", ".json"); - let opt; - if (fs.existsSync(optFile)) - opt = JSON.parse(fs.readFileSync(optFile, "utf8")); - try { - const ast = wp.parse(fs.readFileSync(path, "utf8").replace(/\r\n/g, "\n"), opt); - yield new TestItem({ ast, path, opt }); + const text = fs.readFileSync(path, "utf8"); + const ast = wp.parse(text); + const validation = wp.validate(ast); + if (validation) { + yield new TestItem({ text, ast, path, validation, raw }); + } else { + yield new TestItem({ text, ast, path, raw }); + } } catch (error) { if (expectError) { - yield new TestItem({ path, error }); + yield new TestItem({ path, error, raw }); } else { throw error; } } } -}; +} class TestItem { - constructor({ ast, path, error, opt }) { + constructor({ text, ast, path, error, validation, raw }) { + this.text = text; this.ast = ast; this.path = path; this.error = error; - this.opt = opt; - this.jsonPath = pth.join(pth.dirname(path), "../json", pth.basename(path).replace(".widl", ".json")); + this.validation = validation; + const fileExtension = raw ? ".txt" : ".json"; + this.baselinePath = pth.join( + pth.dirname(path), + "../baseline", + pth.basename(path).replace(".widl", fileExtension) + ); } readJSON() { - return JSON.parse(fs.readFileSync(this.jsonPath, "utf8")); + return JSON.parse(this.readText()); + } + + readText() { + return fs.readFileSync(this.baselinePath, "utf8"); } diff(target = this.readJSON()) { diff --git a/test/writer.js b/test/writer.js index e84076b4f28ce3..fcb793e1040ddb 100644 --- a/test/writer.js +++ b/test/writer.js @@ -1,23 +1,169 @@ "use strict"; const { collect } = require("./util/collect"); -const wp = require("../lib/webidl2"); -const writer = require("../lib/writer"); const expect = require("expect"); -const debug = true; +const webidl2 = require("../dist/webidl2"); describe("Rewrite and parses all of the IDLs to produce the same ASTs", () => { for (const test of collect("syntax")) { it(`should produce the same AST for ${test.path}`, () => { - try { - const diff = test.diff(wp.parse(writer.write(test.ast), test.opt)); - if (diff && debug) console.log(JSON.stringify(diff, null, 4)); - expect(diff).toBe(undefined); - } - catch (e) { - console.log(e.toString()); - throw e; - } + const rewritten = webidl2.write(test.ast); + expect(rewritten).toEqual(test.text); + const diff = test.diff(webidl2.parse(rewritten, test.opt)); + expect(diff).toBe(undefined); }); } }); + +describe("Writer template functions", () => { + function rewrite(text, templates) { + return webidl2.write(webidl2.parse(text), { templates }); + } + function bracket(str) { + return `<${str}>`; + } + function flatten(array) { + return [].concat(...array.map(item => Array.isArray(item) ? flatten(item) : item)); + } + + it("wraps in array", () => { + const result = rewrite("interface X {};", { + wrap: items => flatten(items).filter(i => i) + }); + expect(result).toEqual(["interface", " ", "X", " ", "{", "}", ";"]); + }); + + it("catches trivia", () => { + const result = rewrite("/* longcat is long */ [Exposed=( Window )] interface X {};", { + trivia: bracket + }); + expect(result).toBe("[<>Exposed<>=<>(< >Window< >)<>]< >interface< >X< >{<>}<>;<>"); + }); + + it("catches names", () => { + function rewriteName(text) { + return rewrite(text, { name: bracket }); + } + + const result = rewriteName("interface Momo { attribute long iro; };"); + expect(result).toBe("interface { attribute long ; };"); + + const typedef = rewriteName("typedef float Float;"); + expect(typedef).toBe("typedef float ;"); + + const enumeration = rewriteName('enum Enum { "item", };'); + expect(enumeration).toBe('enum { "", };'); + + const dictionary = rewriteName("dictionary Dict { required short field; };"); + expect(dictionary).toBe("dictionary { required short ; };"); + + const operation = rewriteName("namespace Console { void log(); };"); + expect(operation).toBe("namespace { void (); };"); + + const constant = rewriteName("interface Misaki { const short MICHELLE = 1; };"); + expect(constant).toBe("interface { const short = 1; };"); + }); + + it("catches references", () => { + function rewriteReference(text) { + return rewrite(text, { reference: bracket }); + } + + const result = rewriteReference("[Exposed=Window] interface Momo : Kudamono { attribute Promise iro; };"); + expect(result).toBe("[Exposed=] interface Momo : { attribute Promise<> iro; };"); + + const includes = rewriteReference("_A includes _B;"); + expect(includes).toBe("<_A> includes <_B>;"); + }); + + it("catches references as unescaped", () => { + function rewriteReference(text) { + return rewrite(text, { reference: (_, unescaped) => bracket(unescaped) }); + } + + const result = rewriteReference("[Exposed=Window] interface Momo : _Kudamono { attribute Promise<_Type> iro; attribute _Type sugar; };"); + expect(result).toBe("[Exposed=] interface Momo : { attribute Promise<> iro; attribute sugar; };"); + + const includes = rewriteReference("_A includes _B;"); + expect(includes).toBe(" includes ;"); + }); + + it("catches generics", () => { + function rewriteGeneric(text) { + return rewrite(text, { generic: bracket }); + } + + const result = rewriteGeneric("[Exposed=Window] interface Momo : Kudamono { attribute Promise iro; iterable; };"); + expect(result).toBe("[Exposed=Window] interface Momo : Kudamono { attribute iro; ; };"); + }); + + it("catches types", () => { + const result = rewrite("interface Momo { attribute Promise iro; };", { + type: bracket + }); + expect(result).toBe("interface Momo { attribute< Promise> iro; };"); + }); + + it("catches inheritances", () => { + const result = rewrite("dictionary Nene : Member { DOMString cpp = \"high\"; };", { + inheritance: bracket + }); + expect(result).toBe("dictionary Nene : { DOMString cpp = \"high\"; };"); + }); + + it("catches definitions", () => { + const result = rewrite("dictionary Nene { DOMString cpp = \"high\"; };", { + definition: bracket + }); + expect(result).toBe(" };>"); + }); + + it("catches extended attributes", () => { + const result = rewrite("[Exposed=Window, Constructor] interface EagleJump { void aoba([Clamp] long work); };", { + extendedAttribute: bracket + }); + expect(result).toBe("[, ] interface EagleJump { void aoba([] long work); };"); + }); + + it("catches extended attribute references", () => { + const result = rewrite("[Exposed=Window, Constructor] interface EagleJump { void aoba([Clamp] long work); };", { + extendedAttributeReference: bracket + }); + expect(result).toBe("[=Window, ] interface EagleJump { void aoba([] long work); };"); + }); + + it("gives definition object", () => { + function rewriteDefinition(text) { + return rewrite(text, { + definition: (def, { data, parent }) => { + const parentType = parent ? `${parent.type}:` : ""; + return `${parentType}${data.type}[${def}]`; + } + }); + } + + const includes = rewriteDefinition("A includes B;"); + expect(includes).toBe("includes[A includes B;]"); + + const typedef = rewriteDefinition("typedef A B;"); + expect(typedef).toBe("typedef[typedef A B;]"); + + const enumeration = rewriteDefinition('enum A { "b", "c" };'); + expect(enumeration).toBe('enum[enum A { enum:enum-value["b"], enum:enum-value["c"] };]'); + + const dictionary = rewriteDefinition("dictionary X { required DOMString str; };"); + expect(dictionary).toBe("dictionary[dictionary X {dictionary:field[ required DOMString str;] };]"); + + const interface_ = rewriteDefinition("interface X { iterable; };"); + expect(interface_).toBe("interface[interface X {interface:iterable[ iterable;] };]"); + + const operation = rewriteDefinition("namespace X { void log(); };"); + expect(operation).toBe("namespace[namespace X {namespace:operation[ void log();] };]"); + + const attribute = rewriteDefinition("interface X { attribute short x; };"); + expect(attribute).toBe("interface[interface X {interface:attribute[ attribute short x;] };]"); + + const constant = rewriteDefinition("interface Misaki { const short MICHELLE = 1; };"); + expect(constant).toBe("interface[interface Misaki {interface:const[ const short MICHELLE = 1;] };]"); + }); +}); diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 00000000000000..e57128c1dbafe3 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,14 @@ +const path = require("path"); + +module.exports = { + entry: "./index.js", + output: { + filename: "webidl2.js", + path: path.resolve(__dirname, "dist"), + library: "WebIDL2", + libraryTarget: "umd", + globalObject: "this" + }, + mode: "production", + devtool: "source-map" +}; From 069c23fa06948eb8bb3e100fb69f146daa2c0ef2 Mon Sep 17 00:00:00 2001 From: Sam Sneddon Date: Mon, 13 May 2019 14:44:25 +0100 Subject: [PATCH 2/4] Use bundled webidl2.js rather than module-based webidl2.js --- tools/serve/serve.py | 2 +- tools/wpt/testfiles.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/serve/serve.py b/tools/serve/serve.py index b86ad309142b5a..87e9b17999b9d1 100644 --- a/tools/serve/serve.py +++ b/tools/serve/serve.py @@ -300,7 +300,7 @@ def _script_replacement(self, key, value): return None -rewrites = [("GET", "/resources/WebIDLParser.js", "/resources/webidl2/lib/webidl2.js")] +rewrites = [("GET", "/resources/WebIDLParser.js", "/resources/webidl2/dist/webidl2.js")] class RoutesBuilder(object): def __init__(self): diff --git a/tools/wpt/testfiles.py b/tools/wpt/testfiles.py index 09dd45bcbd8dd4..893fcb02a0954e 100644 --- a/tools/wpt/testfiles.py +++ b/tools/wpt/testfiles.py @@ -222,7 +222,7 @@ def affected_testfiles(files_changed, skip_dirs=None, tests_changed = {item for item in files_changed if item in test_files} nontest_changed_paths = set() - rewrites = {"/resources/webidl2/lib/webidl2.js": "/resources/WebIDLParser.js"} + rewrites = {"/resources/webidl2/dist/webidl2.js": "/resources/WebIDLParser.js"} for full_path in nontests_changed: rel_path = os.path.relpath(full_path, wpt_root) path_components = rel_path.split(os.sep) From d430b321aec3b0a0b9ec1c7911c35f2364cb14ac Mon Sep 17 00:00:00 2001 From: Sam Sneddon Date: Mon, 13 May 2019 15:15:46 +0100 Subject: [PATCH 3/4] Ignore EOF type from https://github.com/w3c/webidl2.js/pull/185 --- resources/idlharness.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/idlharness.js b/resources/idlharness.js index c7a040996b9994..37e67c56a02e20 100644 --- a/resources/idlharness.js +++ b/resources/idlharness.js @@ -480,6 +480,10 @@ IdlArray.prototype.internal_add_idls = function(parsed_idls, options) this.members[parsed_idl.name] = new IdlNamespace(parsed_idl); break; + case "eof": + // do nothing at EOF + break; + default: throw parsed_idl.name + ": " + parsed_idl.type + " not yet supported"; } From d211e215647d14688c92af04834cb888ab364c35 Mon Sep 17 00:00:00 2001 From: Sam Sneddon Date: Mon, 13 May 2019 15:45:29 +0100 Subject: [PATCH 4/4] Fix idlharness.js to deal with extAttr trivia See https://github.com/w3c/webidl2.js/pull/201 --- resources/idlharness.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/resources/idlharness.js b/resources/idlharness.js index 37e67c56a02e20..2c5efa6fd04463 100644 --- a/resources/idlharness.js +++ b/resources/idlharness.js @@ -687,7 +687,7 @@ IdlArray.prototype.is_json_type = function(type) }; function exposure_set(object, default_set) { - var exposed = object.extAttrs && object.extAttrs.filter(a => a.name === "Exposed"); + var exposed = object.extAttrs && object.extAttrs.items.filter(a => a.name === "Exposed"); if (exposed && exposed.length > 1) { throw new IdlHarnessError( `Multiple 'Exposed' extended attributes on ${object.name}`); @@ -892,7 +892,7 @@ IdlArray.prototype.collapse_partials = function() // Exposed on a partial is the equivalent of having the same Exposed on all nested members. // See https://github.com/heycam/webidl/issues/154 for discrepency between Exposed and // other extended attributes on partial interfaces. - const exposureAttr = parsed_idl.extAttrs.find(a => a.name === "Exposed"); + const exposureAttr = parsed_idl.extAttrs.items.find(a => a.name === "Exposed"); if (exposureAttr) { if (!parsed_idl.untested) { test(function () { @@ -911,7 +911,7 @@ IdlArray.prototype.collapse_partials = function() }.bind(this)); } - parsed_idl.extAttrs.forEach(function(extAttr) + parsed_idl.extAttrs.items.forEach(function(extAttr) { // "Exposed" already handled above. if (extAttr.name === "Exposed") { @@ -1164,7 +1164,7 @@ IdlObject.prototype.has_extended_attribute = function(name) * This is only meaningful for things that support extended attributes, * such as interfaces, exceptions, and members. */ - return this.extAttrs.some(function(o) + return this.extAttrs.items.some(function(o) { return o.name == name; }); @@ -1223,7 +1223,7 @@ function IdlInterface(obj, is_callback, is_mixin) this.untested = obj.untested; /** An array of objects produced by the "ExtAttr" production. */ - this.extAttrs = obj.extAttrs; + this.extAttrs = obj.extAttrs || {"items": []}; /** An array of IdlInterfaceMembers. */ this.members = obj.members.map(function(m){return new IdlInterfaceMember(m); }); @@ -1269,7 +1269,7 @@ IdlInterface.prototype.get_unscopables = function() IdlInterface.prototype.is_global = function() { - return this.extAttrs.some(function(attribute) { + return this.extAttrs.items.some(function(attribute) { return attribute.name === "Global"; }); }; @@ -1281,7 +1281,7 @@ IdlInterface.prototype.is_global = function() */ IdlInterface.prototype.get_legacy_namespace = function() { - var legacyNamespace = this.extAttrs.find(function(attribute) { + var legacyNamespace = this.extAttrs.items.find(function(attribute) { return attribute.name === "LegacyNamespace"; }); return legacyNamespace ? legacyNamespace.rhs.value : undefined; @@ -1596,7 +1596,7 @@ IdlInterface.prototype.test_self = function() assert_false(desc.enumerable, this.name + ".length should not be enumerable"); assert_true(desc.configurable, this.name + ".length should be configurable"); - var constructors = this.extAttrs + var constructors = this.extAttrs.items .filter(function(attr) { return attr.name == "Constructor"; }); var expected_length = minOverloadLength(constructors); assert_equals(this.get_interface_object().length, expected_length, "wrong value for " + this.name + ".length"); @@ -1630,7 +1630,7 @@ IdlInterface.prototype.test_self = function() if (this.has_extended_attribute("LegacyWindowAlias")) { subsetTestByKey(this.name, test, function() { - var aliasAttrs = this.extAttrs.filter(function(o) { return o.name === "LegacyWindowAlias"; }); + var aliasAttrs = this.extAttrs.items.filter(function(o) { return o.name === "LegacyWindowAlias"; }); if (aliasAttrs.length > 1) { throw new IdlHarnessError("Invalid IDL: multiple LegacyWindowAlias extended attributes on " + this.name); } @@ -1680,7 +1680,7 @@ IdlInterface.prototype.test_self = function() } if (this.has_extended_attribute("NamedConstructor")) { - var constructors = this.extAttrs + var constructors = this.extAttrs.items .filter(function(attr) { return attr.name == "NamedConstructor"; }); if (constructors.length !== 1) { throw new IdlHarnessError("Internal error: missing support for multiple NamedConstructor extended attributes"); @@ -2999,9 +2999,9 @@ function IdlInterfaceMember(obj) { this[k] = obj[k]; } - if (!("extAttrs" in this)) + if (!("extAttrs" in this) || this.extAttrs === null) { - this.extAttrs = []; + this.extAttrs = {"items": []}; } this.isUnforgeable = this.has_extended_attribute("Unforgeable"); @@ -3094,7 +3094,7 @@ IdlTypedef.prototype = Object.create(IdlObject.prototype); function IdlNamespace(obj) { this.name = obj.name; - this.extAttrs = obj.extAttrs; + this.extAttrs = obj.extAttrs || {"items": []}; this.untested = obj.untested; /** A back-reference to our IdlArray. */ this.array = obj.array;