@flarum/cli 2.0.0-beta.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +178 -48
- package/bin/run +2 -1
- package/bin/splitsh-lite-darwin +0 -0
- package/bin/splitsh-lite-linux +0 -0
- package/boilerplate/skeleton/extension/.gitattributes +16 -14
- package/boilerplate/skeleton/extension/.github/workflows/backend.yml +2 -6
- package/boilerplate/skeleton/extension/.github/workflows/frontend.yml +5 -6
- package/boilerplate/skeleton/extension/.github/workflows/phpstan.yml +12 -0
- package/boilerplate/skeleton/extension/LICENSE.md +1 -1
- package/boilerplate/skeleton/extension/README.md +1 -1
- package/boilerplate/skeleton/extension/composer.json +13 -7
- package/boilerplate/skeleton/extension/extend.php +2 -2
- package/boilerplate/skeleton/extension/gitignore +1 -0
- package/boilerplate/skeleton/extension/js/admin.ts +2 -0
- package/boilerplate/skeleton/extension/js/forum.ts +2 -0
- package/boilerplate/skeleton/extension/js/jest.config.cjs +1 -0
- package/boilerplate/skeleton/extension/js/package.json +11 -4
- package/boilerplate/skeleton/extension/js/src/admin/extend.js +8 -0
- package/boilerplate/skeleton/extension/js/src/admin/extend.ts +8 -0
- package/boilerplate/skeleton/extension/js/src/admin/index.js +2 -0
- package/boilerplate/skeleton/extension/js/src/admin/index.ts +7 -0
- package/boilerplate/skeleton/extension/js/src/common/extend.js +5 -0
- package/boilerplate/skeleton/extension/js/src/common/extend.ts +5 -0
- package/boilerplate/skeleton/extension/js/src/common/index.ts +5 -0
- package/boilerplate/skeleton/extension/js/src/forum/extend.js +8 -0
- package/boilerplate/skeleton/extension/js/src/forum/extend.ts +8 -0
- package/boilerplate/skeleton/extension/js/src/forum/index.js +2 -0
- package/boilerplate/skeleton/extension/js/src/forum/index.ts +7 -0
- package/boilerplate/skeleton/extension/js/tests/unit/.gitkeep +0 -0
- package/boilerplate/skeleton/extension/js/tsconfig.json +10 -2
- package/boilerplate/skeleton/extension/js/tsconfig.test.json +10 -0
- package/boilerplate/skeleton/extension/locale/en.yml +1 -1
- package/boilerplate/skeleton/extension/phpstan.neon +12 -0
- package/boilerplate/skeleton/extension/tests/phpunit.integration.xml +6 -7
- package/boilerplate/skeleton/extension/tests/phpunit.unit.xml +5 -10
- package/boilerplate/stubs/backend/advanced-api-resource.php +85 -0
- package/boilerplate/stubs/backend/api-resource.php +73 -0
- package/boilerplate/stubs/backend/command.php +2 -2
- package/boilerplate/stubs/backend/controller.php +19 -0
- package/boilerplate/stubs/backend/event-listener.php +1 -1
- package/boilerplate/stubs/backend/filter.php +25 -0
- package/boilerplate/stubs/backend/handler/command.php +6 -20
- package/boilerplate/stubs/backend/handler/handler.php +6 -14
- package/boilerplate/stubs/backend/integration-test.php +10 -7
- package/boilerplate/stubs/backend/job.php +6 -11
- package/boilerplate/stubs/backend/mail-driver.php +36 -0
- package/boilerplate/stubs/backend/middleware.php +19 -0
- package/boilerplate/stubs/backend/model.php +1 -1
- package/boilerplate/stubs/backend/notification-blueprint.php +42 -0
- package/boilerplate/stubs/backend/notification-driver.php +32 -0
- package/boilerplate/stubs/backend/policy.php +1 -1
- package/boilerplate/stubs/backend/post-type.php +35 -0
- package/boilerplate/stubs/backend/repository.php +2 -10
- package/boilerplate/stubs/backend/search/driver.php +13 -0
- package/boilerplate/stubs/backend/search/searcher.php +41 -0
- package/boilerplate/stubs/backend/service-provider.php +1 -1
- package/boilerplate/stubs/backend/validator.php +1 -1
- package/boilerplate/stubs/frontend/component.js +1 -1
- package/boilerplate/stubs/frontend/forum-page.js +68 -0
- package/boilerplate/stubs/frontend/gambit/boolean.js +12 -0
- package/boilerplate/stubs/frontend/gambit/key-value.js +16 -0
- package/boilerplate/stubs/frontend/modal.js +1 -1
- package/boilerplate/stubs/frontend/model.js +1 -1
- package/boilerplate/stubs/frontend/notification.js +22 -0
- package/boilerplate/stubs/frontend/post-type.js +13 -0
- package/boilerplate/stubs/migration.php +1 -1
- package/boilerplate/stubs/views/email/html/information.blade.php +8 -0
- package/boilerplate/stubs/views/email/html/notification.blade.php +8 -0
- package/boilerplate/stubs/views/email/plain/information.blade.php +7 -0
- package/boilerplate/stubs/views/email/plain/notification.blade.php +6 -0
- package/lib/base-command.d.ts +22 -6
- package/lib/base-command.js +114 -56
- package/lib/boilersmith/io.d.ts +33 -11
- package/lib/boilersmith/io.js +32 -17
- package/lib/boilersmith/paths.d.ts +3 -3
- package/lib/boilersmith/paths.js +7 -7
- package/lib/boilersmith/scaffolding/audit-step-factory.js +12 -12
- package/lib/boilersmith/scaffolding/infra-step-factory.js +2 -2
- package/lib/boilersmith/scaffolding/init-step-factory.js +5 -5
- package/lib/boilersmith/scaffolding/module.d.ts +30 -10
- package/lib/boilersmith/scaffolding/module.js +61 -19
- package/lib/boilersmith/scaffolding/scaffolder.d.ts +4 -1
- package/lib/boilersmith/scaffolding/scaffolder.js +33 -33
- package/lib/boilersmith/scaffolding/template-param.d.ts +2 -2
- package/lib/boilersmith/scaffolding/template-param.js +2 -2
- package/lib/boilersmith/step-manager.d.ts +15 -11
- package/lib/boilersmith/step-manager.js +45 -29
- package/lib/boilersmith/steps/stub-base.js +4 -4
- package/lib/boilersmith/utils/clone-and-fill.js +1 -1
- package/lib/boilersmith/utils/commit-async.d.ts +2 -0
- package/lib/boilersmith/utils/commit-async.js +15 -0
- package/lib/boilersmith/utils/json-leaf-paths.d.ts +2 -2
- package/lib/boilersmith/utils/read-tpl.js +2 -2
- package/lib/commands/audit/infra.d.ts +2 -5
- package/lib/commands/audit/infra.js +31 -9
- package/lib/commands/infra.d.ts +2 -10
- package/lib/commands/infra.js +20 -14
- package/lib/commands/init.d.ts +2 -5
- package/lib/commands/init.js +7 -5
- package/lib/commands/make/backend/{api-serializer.d.ts → api-resource.d.ts} +2 -5
- package/lib/commands/make/backend/api-resource.js +26 -0
- package/lib/commands/make/backend/command.d.ts +1 -4
- package/lib/commands/make/backend/command.js +3 -4
- package/lib/commands/make/backend/{api-controller.d.ts → controller.d.ts} +2 -5
- package/lib/commands/make/backend/controller.js +31 -0
- package/lib/commands/make/backend/event-listener.d.ts +1 -4
- package/lib/commands/make/backend/event-listener.js +2 -3
- package/lib/commands/make/backend/{api-serializer-attributes.d.ts → filter.d.ts} +3 -6
- package/lib/commands/make/backend/filter.js +26 -0
- package/lib/commands/make/backend/handler.d.ts +2 -5
- package/lib/commands/make/backend/handler.js +8 -11
- package/lib/commands/make/backend/integration-test.d.ts +1 -4
- package/lib/commands/make/backend/integration-test.js +4 -6
- package/lib/commands/make/backend/job.d.ts +1 -4
- package/lib/commands/make/backend/job.js +2 -2
- package/lib/commands/make/backend/mail-driver.d.ts +12 -0
- package/lib/commands/make/backend/mail-driver.js +29 -0
- package/lib/commands/make/backend/middleware.d.ts +11 -0
- package/lib/commands/make/backend/middleware.js +26 -0
- package/lib/commands/make/backend/migration.d.ts +1 -4
- package/lib/commands/make/backend/migration.js +10 -4
- package/lib/commands/make/backend/model.d.ts +6 -7
- package/lib/commands/make/backend/model.js +69 -449
- package/lib/commands/make/backend/notification-blueprint.d.ts +12 -0
- package/lib/commands/make/backend/notification-blueprint.js +29 -0
- package/lib/commands/make/backend/notification-driver.d.ts +12 -0
- package/lib/commands/make/backend/notification-driver.js +29 -0
- package/lib/commands/make/backend/policy.d.ts +1 -4
- package/lib/commands/make/backend/policy.js +2 -3
- package/lib/commands/make/backend/post-type.d.ts +12 -0
- package/lib/commands/make/backend/post-type.js +29 -0
- package/lib/commands/make/backend/repository.d.ts +1 -4
- package/lib/commands/make/backend/repository.js +1 -1
- package/lib/commands/make/backend/route.d.ts +1 -4
- package/lib/commands/make/backend/route.js +2 -3
- package/lib/commands/make/backend/search-driver.d.ts +11 -0
- package/lib/commands/make/backend/search-driver.js +51 -0
- package/lib/commands/make/backend/service-provider.d.ts +1 -4
- package/lib/commands/make/backend/service-provider.js +3 -4
- package/lib/commands/make/backend/validator.d.ts +1 -4
- package/lib/commands/make/backend/validator.js +2 -2
- package/lib/commands/make/frontend/component.d.ts +4 -5
- package/lib/commands/make/frontend/component.js +7 -2
- package/lib/commands/make/frontend/forum-page.d.ts +11 -0
- package/lib/commands/make/frontend/forum-page.js +92 -0
- package/lib/commands/make/frontend/gambit.d.ts +11 -0
- package/lib/commands/make/frontend/gambit.js +30 -0
- package/lib/commands/make/frontend/modal.d.ts +1 -4
- package/lib/commands/make/frontend/modal.js +3 -2
- package/lib/commands/make/frontend/model.d.ts +6 -7
- package/lib/commands/make/frontend/model.js +27 -28
- package/lib/commands/make/frontend/notification.d.ts +12 -0
- package/lib/commands/make/frontend/notification.js +62 -0
- package/lib/commands/make/frontend/post-type.d.ts +12 -0
- package/lib/commands/make/frontend/post-type.js +59 -0
- package/lib/commands/make/locale.d.ts +11 -0
- package/lib/commands/make/locale.js +27 -0
- package/lib/commands/make/model.d.ts +12 -0
- package/lib/commands/make/model.js +29 -0
- package/lib/commands/make/notification.d.ts +11 -0
- package/lib/commands/make/notification.js +33 -0
- package/lib/commands/make/post-type.d.ts +11 -0
- package/lib/commands/make/post-type.js +31 -0
- package/lib/commands/monorepo/create.d.ts +12 -0
- package/lib/commands/monorepo/create.js +20 -0
- package/lib/commands/monorepo/split.d.ts +12 -0
- package/lib/commands/monorepo/split.js +19 -0
- package/lib/commands/update/js-imports.d.ts +1 -4
- package/lib/commands/update/js-imports.js +2 -3
- package/lib/commands/upgrade/2.0.d.ts +17 -0
- package/lib/commands/upgrade/2.0.js +113 -0
- package/lib/help.js +2 -2
- package/lib/providers/php-provider.d.ts +7 -1
- package/lib/providers/php-provider.js +18 -5
- package/lib/steps/extenders/{api-serializer.d.ts → api-resource.d.ts} +1 -1
- package/lib/steps/extenders/api-resource.js +38 -0
- package/lib/steps/extenders/base.d.ts +1 -1
- package/lib/steps/extenders/base.js +13 -1
- package/lib/steps/extenders/console-command.js +1 -1
- package/lib/steps/extenders/event.js +1 -1
- package/lib/steps/extenders/mail-driver.d.ts +5 -0
- package/lib/steps/extenders/mail-driver.js +58 -0
- package/lib/steps/extenders/middleware.d.ts +5 -0
- package/lib/steps/extenders/middleware.js +57 -0
- package/lib/steps/extenders/notification-driver.d.ts +5 -0
- package/lib/steps/extenders/notification-driver.js +58 -0
- package/lib/steps/extenders/notification-type.d.ts +5 -0
- package/lib/steps/extenders/notification-type.js +55 -0
- package/lib/steps/extenders/policy.js +1 -1
- package/lib/steps/extenders/post-type.d.ts +5 -0
- package/lib/steps/extenders/post-type.js +42 -0
- package/lib/steps/extenders/route.js +11 -2
- package/lib/steps/extenders/search-driver.d.ts +5 -0
- package/lib/steps/extenders/search-driver.js +38 -0
- package/lib/steps/extenders/search-filter.d.ts +5 -0
- package/lib/steps/extenders/search-filter.js +67 -0
- package/lib/steps/extenders/service-provider.js +1 -1
- package/lib/steps/gen-ext-scaffolder.d.ts +4 -4
- package/lib/steps/gen-ext-scaffolder.js +262 -56
- package/lib/steps/js/base.d.ts +14 -5
- package/lib/steps/js/base.js +101 -27
- package/lib/steps/js/model.d.ts +4 -7
- package/lib/steps/js/model.js +45 -19
- package/lib/steps/js/notification.d.ts +7 -0
- package/lib/steps/js/notification.js +58 -0
- package/lib/steps/js/post-type.d.ts +8 -0
- package/lib/steps/js/post-type.js +60 -0
- package/lib/steps/js/routes.d.ts +7 -0
- package/lib/steps/js/routes.js +63 -0
- package/lib/steps/js/search-driver-locale.d.ts +8 -0
- package/lib/steps/js/search-driver-locale.js +36 -0
- package/lib/steps/js/search-gambit.d.ts +7 -0
- package/lib/steps/js/search-gambit.js +51 -0
- package/lib/steps/locale/base.d.ts +32 -0
- package/lib/steps/locale/base.js +97 -0
- package/lib/steps/misc/composer.js +2 -2
- package/lib/steps/misc/git.d.ts +1 -1
- package/lib/steps/misc/git.js +3 -3
- package/lib/steps/misc/npm.d.ts +11 -0
- package/lib/steps/misc/npm.js +19 -0
- package/lib/steps/misc/yarn.js +2 -2
- package/lib/steps/monorepo/create.d.ts +19 -0
- package/lib/steps/monorepo/create.js +187 -0
- package/lib/steps/monorepo/split.d.ts +14 -0
- package/lib/steps/monorepo/split.js +99 -0
- package/lib/steps/stubs/backend/advanced-api-resource.d.ts +13 -0
- package/lib/steps/stubs/backend/advanced-api-resource.js +81 -0
- package/lib/steps/stubs/backend/{api-serializer.d.ts → api-resource.d.ts} +2 -2
- package/lib/steps/stubs/backend/{api-serializer.js → api-resource.js} +12 -9
- package/lib/steps/stubs/backend/command.d.ts +2 -21
- package/lib/steps/stubs/backend/command.js +15 -1
- package/lib/steps/stubs/backend/{api-controller.d.ts → controller.d.ts} +4 -14
- package/lib/steps/stubs/backend/controller.js +40 -0
- package/lib/steps/stubs/backend/event-listener.d.ts +1 -1
- package/lib/steps/stubs/backend/event-listener.js +3 -1
- package/lib/steps/stubs/backend/filter.d.ts +8 -0
- package/lib/steps/stubs/backend/filter.js +44 -0
- package/lib/steps/stubs/backend/handler-command.d.ts +2 -27
- package/lib/steps/stubs/backend/handler-command.js +3 -1
- package/lib/steps/stubs/backend/handler.d.ts +1 -1
- package/lib/steps/stubs/backend/handler.js +5 -1
- package/lib/steps/stubs/backend/integration-test.d.ts +1 -1
- package/lib/steps/stubs/backend/integration-test.js +1 -4
- package/lib/steps/stubs/backend/job.d.ts +1 -1
- package/lib/steps/stubs/backend/job.js +1 -0
- package/lib/steps/stubs/backend/mail-driver.d.ts +7 -0
- package/lib/steps/stubs/backend/mail-driver.js +30 -0
- package/lib/steps/stubs/backend/middleware.d.ts +22 -0
- package/lib/steps/stubs/backend/middleware.js +31 -0
- package/lib/steps/stubs/backend/migration.js +6 -3
- package/lib/steps/stubs/backend/model.d.ts +2 -24
- package/lib/steps/stubs/backend/model.js +3 -5
- package/lib/steps/stubs/backend/notification-blueprint.d.ts +7 -0
- package/lib/steps/stubs/backend/notification-blueprint.js +44 -0
- package/lib/steps/stubs/backend/notification-driver.d.ts +7 -0
- package/lib/steps/stubs/backend/notification-driver.js +30 -0
- package/lib/steps/stubs/backend/policy.d.ts +1 -1
- package/lib/steps/stubs/backend/policy.js +3 -1
- package/lib/steps/stubs/backend/post-type.d.ts +7 -0
- package/lib/steps/stubs/backend/post-type.js +44 -0
- package/lib/steps/stubs/backend/repository.d.ts +1 -1
- package/lib/steps/stubs/backend/repository.js +3 -1
- package/lib/steps/stubs/backend/search-driver-searcher.d.ts +24 -0
- package/lib/steps/stubs/backend/search-driver-searcher.js +32 -0
- package/lib/steps/stubs/backend/search-driver.d.ts +8 -0
- package/lib/steps/stubs/backend/search-driver.js +49 -0
- package/lib/steps/stubs/backend/service-provider.d.ts +1 -1
- package/lib/steps/stubs/backend/service-provider.js +1 -0
- package/lib/steps/stubs/backend/validator.d.ts +1 -1
- package/lib/steps/stubs/backend/validator.js +1 -0
- package/lib/steps/stubs/flarum-base.js +1 -1
- package/lib/steps/stubs/frontend/component.d.ts +0 -5
- package/lib/steps/stubs/frontend/component.js +1 -0
- package/lib/steps/stubs/frontend/forum-page.d.ts +25 -0
- package/lib/steps/stubs/frontend/forum-page.js +37 -0
- package/lib/steps/stubs/frontend/gambit.d.ts +7 -0
- package/lib/steps/stubs/frontend/gambit.js +50 -0
- package/lib/steps/stubs/frontend/modal.d.ts +0 -5
- package/lib/steps/stubs/frontend/modal.js +1 -0
- package/lib/steps/stubs/frontend/model.d.ts +8 -1
- package/lib/steps/stubs/frontend/model.js +6 -0
- package/lib/steps/stubs/frontend/notification.d.ts +11 -0
- package/lib/steps/stubs/frontend/notification.js +48 -0
- package/lib/steps/stubs/frontend/post-type.d.ts +11 -0
- package/lib/steps/stubs/frontend/post-type.js +48 -0
- package/lib/steps/stubs/js-base.js +12 -5
- package/lib/steps/stubs/php-base.js +13 -9
- package/lib/steps/update/js-imports.js +9 -3
- package/lib/steps/upgrade/twopointoh/backend/email-views.d.ts +18 -0
- package/lib/steps/upgrade/twopointoh/backend/email-views.js +81 -0
- package/lib/steps/upgrade/twopointoh/backend/filesystem.d.ts +8 -0
- package/lib/steps/upgrade/twopointoh/backend/filesystem.js +40 -0
- package/lib/steps/upgrade/twopointoh/backend/intervention-image.d.ts +8 -0
- package/lib/steps/upgrade/twopointoh/backend/intervention-image.js +44 -0
- package/lib/steps/upgrade/twopointoh/backend/json-api.d.ts +12 -0
- package/lib/steps/upgrade/twopointoh/backend/json-api.js +111 -0
- package/lib/steps/upgrade/twopointoh/backend/mailer.d.ts +8 -0
- package/lib/steps/upgrade/twopointoh/backend/mailer.js +37 -0
- package/lib/steps/upgrade/twopointoh/backend/misc.d.ts +8 -0
- package/lib/steps/upgrade/twopointoh/backend/misc.js +42 -0
- package/lib/steps/upgrade/twopointoh/backend/phpunit.d.ts +8 -0
- package/lib/steps/upgrade/twopointoh/backend/phpunit.js +52 -0
- package/lib/steps/upgrade/twopointoh/backend/search.d.ts +28 -0
- package/lib/steps/upgrade/twopointoh/backend/search.js +200 -0
- package/lib/steps/upgrade/twopointoh/base.d.ts +58 -0
- package/lib/steps/upgrade/twopointoh/base.js +284 -0
- package/lib/steps/upgrade/twopointoh/dependencies.d.ts +10 -0
- package/lib/steps/upgrade/twopointoh/dependencies.js +108 -0
- package/lib/steps/upgrade/twopointoh/frontend/code-splitting/usage-of-lazy-modules.d.ts +26 -0
- package/lib/steps/upgrade/twopointoh/frontend/code-splitting/usage-of-lazy-modules.js +418 -0
- package/lib/steps/upgrade/twopointoh/frontend/export-registry/compat.d.ts +12 -0
- package/lib/steps/upgrade/twopointoh/frontend/export-registry/compat.js +75 -0
- package/lib/steps/upgrade/twopointoh/frontend/export-registry/import-ext.d.ts +13 -0
- package/lib/steps/upgrade/twopointoh/frontend/export-registry/import-ext.js +126 -0
- package/lib/steps/upgrade/twopointoh/frontend/format.d.ts +8 -0
- package/lib/steps/upgrade/twopointoh/frontend/format.js +32 -0
- package/lib/steps/upgrade/twopointoh/frontend/misc.d.ts +17 -0
- package/lib/steps/upgrade/twopointoh/frontend/misc.js +433 -0
- package/lib/steps/upgrade/twopointoh/infra.d.ts +10 -0
- package/lib/steps/upgrade/twopointoh/infra.js +51 -0
- package/lib/steps/upgrade/twopointoh/less.d.ts +12 -0
- package/lib/steps/upgrade/twopointoh/less.js +217 -0
- package/lib/utils/add-extenders.d.ts +2 -0
- package/lib/utils/add-extenders.js +115 -0
- package/lib/utils/ast.d.ts +22 -0
- package/lib/utils/ast.js +235 -0
- package/lib/utils/composer.d.ts +2 -1
- package/lib/utils/migration.js +3 -1
- package/lib/utils/model-name.d.ts +1 -0
- package/lib/utils/model-name.js +7 -3
- package/lib/utils/monorepo.d.ts +24 -0
- package/lib/utils/monorepo.js +24 -0
- package/lib/utils/validation.d.ts +6 -1
- package/lib/utils/validation.js +15 -0
- package/oclif.manifest.json +1 -1
- package/package.json +27 -14
- package/php-subsystem/composer.json +11 -9
- package/php-subsystem/composer.lock +66 -71
- package/php-subsystem/index.php +41 -6
- package/php-subsystem/src/CustomPrettyPrinter.php +1 -1
- package/php-subsystem/src/ExtenderUtil.php +7 -13
- package/php-subsystem/src/NodeUtil.php +72 -0
- package/php-subsystem/src/NodeVisitors/AddExtender.php +28 -12
- package/php-subsystem/src/NodeVisitors/AddUses.php +24 -0
- package/php-subsystem/src/NodeVisitors/ChangeSignatures.php +200 -0
- package/php-subsystem/src/NodeVisitors/ReplaceUses.php +175 -0
- package/php-subsystem/src/Upgrade/Replacement.php +51 -0
- package/php-subsystem/src/Upgrade/ReplacementResult.php +17 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/EmailViews.php +94 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/Filesystem.php +88 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/InterventionImage.php +86 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/JsonApi.php +186 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/Misc.php +564 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/PhpUnit.php +241 -0
- package/php-subsystem/src/Upgrade/TwoPointOh/Search.php +589 -0
- package/php-subsystem/vendor/autoload.php +18 -0
- package/php-subsystem/vendor/bin/php-parse +119 -0
- package/php-subsystem/vendor/composer/ClassLoader.php +166 -32
- package/php-subsystem/vendor/composer/InstalledVersions.php +350 -209
- package/php-subsystem/vendor/composer/autoload_classmap.php +1 -1
- package/php-subsystem/vendor/composer/autoload_namespaces.php +1 -1
- package/php-subsystem/vendor/composer/autoload_psr4.php +1 -1
- package/php-subsystem/vendor/composer/autoload_real.php +3 -22
- package/php-subsystem/vendor/composer/installed.json +56 -61
- package/php-subsystem/vendor/composer/installed.php +29 -30
- package/php-subsystem/vendor/composer/platform_check.php +2 -2
- package/php-subsystem/vendor/nikic/php-parser/README.md +21 -13
- package/php-subsystem/vendor/nikic/php-parser/bin/php-parse +12 -11
- package/php-subsystem/vendor/nikic/php-parser/composer.json +41 -39
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php +58 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php +54 -25
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +11 -4
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +87 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +116 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php +22 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +26 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php +31 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +5 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php +69 -26
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php +47 -18
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +6 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +25 -28
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +31 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php +8 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Builder.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php +85 -70
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +119 -71
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php +1 -2
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Comment.php +35 -67
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php +3 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php +17 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Error.php +24 -33
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php +6 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php +11 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php +36 -22
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +24 -14
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php +237 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +63 -69
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php +15 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +74 -92
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +11 -18
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +10 -15
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +45 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +19 -25
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +6 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +22 -29
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php +31 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +31 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +6 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +10 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer.php +70 -491
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php +69 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NameContext.php +23 -24
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php +13 -14
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php +43 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +5 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php +36 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +13 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php +12 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php +37 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php +10 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +1 -39
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php +11 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +35 -30
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +8 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +35 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php +5 -6
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +5 -6
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php +12 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +34 -27
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +1 -32
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +5 -6
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +10 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +15 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +13 -14
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +11 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +12 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +8 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +18 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +17 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +18 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +10 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +6 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +10 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +9 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +19 -14
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +11 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +12 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +6 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +6 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +10 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php +1 -2
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +6 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php +13 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php +32 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +27 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php +80 -53
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php +10 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php +47 -23
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php +37 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php +1 -68
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php +1 -29
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +1 -28
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php +78 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php +82 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php +34 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +1 -71
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php +44 -24
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php +1 -2
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php +39 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php +29 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +10 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +11 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +33 -27
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +15 -15
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +66 -71
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +48 -61
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +1 -32
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php +12 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +11 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +17 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +19 -15
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +20 -17
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +31 -27
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +16 -14
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +18 -15
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +13 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +11 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +35 -36
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +1 -32
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +1 -35
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php +8 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +8 -9
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +12 -13
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +3 -4
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +10 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +11 -12
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +7 -8
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +1 -50
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php +16 -16
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +9 -10
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php +1 -2
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php +8 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php +55 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php +27 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node.php +24 -29
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php +20 -20
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php +169 -82
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php +28 -19
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php +71 -84
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +4 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +1 -2
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php +82 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +4 -5
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +6 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +40 -24
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +2 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +8 -11
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php +59 -7
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +1 -2
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php +2011 -2058
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php +2717 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser.php +9 -3
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php +466 -248
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php +31 -33
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php +164 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +419 -338
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php +51 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +587 -431
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Token.php +18 -0
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php +63 -0
- package/boilerplate/stubs/backend/api-controller/create.php +0 -53
- package/boilerplate/stubs/backend/api-controller/delete.php +0 -52
- package/boilerplate/stubs/backend/api-controller/list.php +0 -61
- package/boilerplate/stubs/backend/api-controller/normal.php +0 -29
- package/boilerplate/stubs/backend/api-controller/show.php +0 -48
- package/boilerplate/stubs/backend/api-controller/update.php +0 -54
- package/boilerplate/stubs/backend/api-serializer.php +0 -36
- package/lib/commands/make/backend/api-controller.js +0 -27
- package/lib/commands/make/backend/api-serializer-attributes.js +0 -15
- package/lib/commands/make/backend/api-serializer.js +0 -15
- package/lib/steps/extenders/api-serializer.js +0 -77
- package/lib/steps/stubs/backend/api-controller.js +0 -62
- package/lib/steps/stubs/frontend/migration.js +0 -1
- package/php-subsystem/vendor/nikic/php-parser/.editorconfig +0 -9
- package/php-subsystem/vendor/nikic/php-parser/grammar/README.md +0 -30
- package/php-subsystem/vendor/nikic/php-parser/grammar/parser.template +0 -106
- package/php-subsystem/vendor/nikic/php-parser/grammar/php5.y +0 -1026
- package/php-subsystem/vendor/nikic/php-parser/grammar/php7.y +0 -1152
- package/php-subsystem/vendor/nikic/php-parser/grammar/phpyLang.php +0 -192
- package/php-subsystem/vendor/nikic/php-parser/grammar/rebuildParsers.php +0 -81
- package/php-subsystem/vendor/nikic/php-parser/grammar/tokens.template +0 -17
- package/php-subsystem/vendor/nikic/php-parser/grammar/tokens.y +0 -115
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +0 -47
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +0 -76
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +0 -23
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +0 -105
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php +0 -30
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php +0 -55
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php +0 -2630
- package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php +0 -145
- /package/{lib/steps/stubs/frontend/migration.d.ts → boilerplate/skeleton/extension/js/tests/integration/.gitkeep} +0 -0
- /package/boilerplate/skeleton/extension/js/{webpack.config.js → webpack.config.cjs} +0 -0
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
///////////////////////////////
|
|
4
|
-
/// Utility regex constants ///
|
|
5
|
-
///////////////////////////////
|
|
6
|
-
|
|
7
|
-
const LIB = '(?(DEFINE)
|
|
8
|
-
(?<singleQuotedString>\'[^\\\\\']*+(?:\\\\.[^\\\\\']*+)*+\')
|
|
9
|
-
(?<doubleQuotedString>"[^\\\\"]*+(?:\\\\.[^\\\\"]*+)*+")
|
|
10
|
-
(?<string>(?&singleQuotedString)|(?&doubleQuotedString))
|
|
11
|
-
(?<comment>/\*[^*]*+(?:\*(?!/)[^*]*+)*+\*/)
|
|
12
|
-
(?<code>\{[^\'"/{}]*+(?:(?:(?&string)|(?&comment)|(?&code)|/)[^\'"/{}]*+)*+})
|
|
13
|
-
)';
|
|
14
|
-
|
|
15
|
-
const PARAMS = '\[(?<params>[^[\]]*+(?:\[(?¶ms)\][^[\]]*+)*+)\]';
|
|
16
|
-
const ARGS = '\((?<args>[^()]*+(?:\((?&args)\)[^()]*+)*+)\)';
|
|
17
|
-
|
|
18
|
-
///////////////////////////////
|
|
19
|
-
/// Preprocessing functions ///
|
|
20
|
-
///////////////////////////////
|
|
21
|
-
|
|
22
|
-
function preprocessGrammar($code) {
|
|
23
|
-
$code = resolveNodes($code);
|
|
24
|
-
$code = resolveMacros($code);
|
|
25
|
-
$code = resolveStackAccess($code);
|
|
26
|
-
|
|
27
|
-
return $code;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function resolveNodes($code) {
|
|
31
|
-
return preg_replace_callback(
|
|
32
|
-
'~\b(?<name>[A-Z][a-zA-Z_\\\\]++)\s*' . PARAMS . '~',
|
|
33
|
-
function($matches) {
|
|
34
|
-
// recurse
|
|
35
|
-
$matches['params'] = resolveNodes($matches['params']);
|
|
36
|
-
|
|
37
|
-
$params = magicSplit(
|
|
38
|
-
'(?:' . PARAMS . '|' . ARGS . ')(*SKIP)(*FAIL)|,',
|
|
39
|
-
$matches['params']
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
$paramCode = '';
|
|
43
|
-
foreach ($params as $param) {
|
|
44
|
-
$paramCode .= $param . ', ';
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return 'new ' . $matches['name'] . '(' . $paramCode . 'attributes())';
|
|
48
|
-
},
|
|
49
|
-
$code
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function resolveMacros($code) {
|
|
54
|
-
return preg_replace_callback(
|
|
55
|
-
'~\b(?<!::|->)(?!array\()(?<name>[a-z][A-Za-z]++)' . ARGS . '~',
|
|
56
|
-
function($matches) {
|
|
57
|
-
// recurse
|
|
58
|
-
$matches['args'] = resolveMacros($matches['args']);
|
|
59
|
-
|
|
60
|
-
$name = $matches['name'];
|
|
61
|
-
$args = magicSplit(
|
|
62
|
-
'(?:' . PARAMS . '|' . ARGS . ')(*SKIP)(*FAIL)|,',
|
|
63
|
-
$matches['args']
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
if ('attributes' === $name) {
|
|
67
|
-
assertArgs(0, $args, $name);
|
|
68
|
-
return '$this->startAttributeStack[#1] + $this->endAttributes';
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if ('stackAttributes' === $name) {
|
|
72
|
-
assertArgs(1, $args, $name);
|
|
73
|
-
return '$this->startAttributeStack[' . $args[0] . ']'
|
|
74
|
-
. ' + $this->endAttributeStack[' . $args[0] . ']';
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if ('init' === $name) {
|
|
78
|
-
return '$$ = array(' . implode(', ', $args) . ')';
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if ('push' === $name) {
|
|
82
|
-
assertArgs(2, $args, $name);
|
|
83
|
-
|
|
84
|
-
return $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0];
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if ('pushNormalizing' === $name) {
|
|
88
|
-
assertArgs(2, $args, $name);
|
|
89
|
-
|
|
90
|
-
return 'if (is_array(' . $args[1] . ')) { $$ = array_merge(' . $args[0] . ', ' . $args[1] . '); }'
|
|
91
|
-
. ' else { ' . $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0] . '; }';
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if ('toArray' == $name) {
|
|
95
|
-
assertArgs(1, $args, $name);
|
|
96
|
-
|
|
97
|
-
return 'is_array(' . $args[0] . ') ? ' . $args[0] . ' : array(' . $args[0] . ')';
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if ('parseVar' === $name) {
|
|
101
|
-
assertArgs(1, $args, $name);
|
|
102
|
-
|
|
103
|
-
return 'substr(' . $args[0] . ', 1)';
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
if ('parseEncapsed' === $name) {
|
|
107
|
-
assertArgs(3, $args, $name);
|
|
108
|
-
|
|
109
|
-
return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) {'
|
|
110
|
-
. ' $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, ' . $args[1] . ', ' . $args[2] . '); } }';
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if ('makeNop' === $name) {
|
|
114
|
-
assertArgs(3, $args, $name);
|
|
115
|
-
|
|
116
|
-
return '$startAttributes = ' . $args[1] . ';'
|
|
117
|
-
. ' if (isset($startAttributes[\'comments\']))'
|
|
118
|
-
. ' { ' . $args[0] . ' = new Stmt\Nop($startAttributes + ' . $args[2] . '); }'
|
|
119
|
-
. ' else { ' . $args[0] . ' = null; }';
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if ('makeZeroLengthNop' == $name) {
|
|
123
|
-
assertArgs(2, $args, $name);
|
|
124
|
-
|
|
125
|
-
return '$startAttributes = ' . $args[1] . ';'
|
|
126
|
-
. ' if (isset($startAttributes[\'comments\']))'
|
|
127
|
-
. ' { ' . $args[0] . ' = new Stmt\Nop($this->createCommentNopAttributes($startAttributes[\'comments\'])); }'
|
|
128
|
-
. ' else { ' . $args[0] . ' = null; }';
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if ('strKind' === $name) {
|
|
132
|
-
assertArgs(1, $args, $name);
|
|
133
|
-
|
|
134
|
-
return '(' . $args[0] . '[0] === "\'" || (' . $args[0] . '[1] === "\'" && '
|
|
135
|
-
. '(' . $args[0] . '[0] === \'b\' || ' . $args[0] . '[0] === \'B\')) '
|
|
136
|
-
. '? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED)';
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if ('prependLeadingComments' === $name) {
|
|
140
|
-
assertArgs(1, $args, $name);
|
|
141
|
-
|
|
142
|
-
return '$attrs = $this->startAttributeStack[#1]; $stmts = ' . $args[0] . '; '
|
|
143
|
-
. 'if (!empty($attrs[\'comments\'])) {'
|
|
144
|
-
. '$stmts[0]->setAttribute(\'comments\', '
|
|
145
|
-
. 'array_merge($attrs[\'comments\'], $stmts[0]->getAttribute(\'comments\', []))); }';
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
return $matches[0];
|
|
149
|
-
},
|
|
150
|
-
$code
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
function assertArgs($num, $args, $name) {
|
|
155
|
-
if ($num != count($args)) {
|
|
156
|
-
die('Wrong argument count for ' . $name . '().');
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function resolveStackAccess($code) {
|
|
161
|
-
$code = preg_replace('/\$\d+/', '$this->semStack[$0]', $code);
|
|
162
|
-
$code = preg_replace('/#(\d+)/', '$$1', $code);
|
|
163
|
-
return $code;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
function removeTrailingWhitespace($code) {
|
|
167
|
-
$lines = explode("\n", $code);
|
|
168
|
-
$lines = array_map('rtrim', $lines);
|
|
169
|
-
return implode("\n", $lines);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
//////////////////////////////
|
|
173
|
-
/// Regex helper functions ///
|
|
174
|
-
//////////////////////////////
|
|
175
|
-
|
|
176
|
-
function regex($regex) {
|
|
177
|
-
return '~' . LIB . '(?:' . str_replace('~', '\~', $regex) . ')~';
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function magicSplit($regex, $string) {
|
|
181
|
-
$pieces = preg_split(regex('(?:(?&string)|(?&comment)|(?&code))(*SKIP)(*FAIL)|' . $regex), $string);
|
|
182
|
-
|
|
183
|
-
foreach ($pieces as &$piece) {
|
|
184
|
-
$piece = trim($piece);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if ($pieces === ['']) {
|
|
188
|
-
return [];
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
return $pieces;
|
|
192
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
require __DIR__ . '/phpyLang.php';
|
|
4
|
-
|
|
5
|
-
$grammarFileToName = [
|
|
6
|
-
__DIR__ . '/php5.y' => 'Php5',
|
|
7
|
-
__DIR__ . '/php7.y' => 'Php7',
|
|
8
|
-
];
|
|
9
|
-
|
|
10
|
-
$tokensFile = __DIR__ . '/tokens.y';
|
|
11
|
-
$tokensTemplate = __DIR__ . '/tokens.template';
|
|
12
|
-
$skeletonFile = __DIR__ . '/parser.template';
|
|
13
|
-
$tmpGrammarFile = __DIR__ . '/tmp_parser.phpy';
|
|
14
|
-
$tmpResultFile = __DIR__ . '/tmp_parser.php';
|
|
15
|
-
$resultDir = __DIR__ . '/../lib/PhpParser/Parser';
|
|
16
|
-
$tokensResultsFile = $resultDir . '/Tokens.php';
|
|
17
|
-
|
|
18
|
-
$kmyacc = getenv('KMYACC');
|
|
19
|
-
if (!$kmyacc) {
|
|
20
|
-
// Use phpyacc from dev dependencies by default.
|
|
21
|
-
$kmyacc = __DIR__ . '/../vendor/bin/phpyacc';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
$options = array_flip($argv);
|
|
25
|
-
$optionDebug = isset($options['--debug']);
|
|
26
|
-
$optionKeepTmpGrammar = isset($options['--keep-tmp-grammar']);
|
|
27
|
-
|
|
28
|
-
///////////////////
|
|
29
|
-
/// Main script ///
|
|
30
|
-
///////////////////
|
|
31
|
-
|
|
32
|
-
$tokens = file_get_contents($tokensFile);
|
|
33
|
-
|
|
34
|
-
foreach ($grammarFileToName as $grammarFile => $name) {
|
|
35
|
-
echo "Building temporary $name grammar file.\n";
|
|
36
|
-
|
|
37
|
-
$grammarCode = file_get_contents($grammarFile);
|
|
38
|
-
$grammarCode = str_replace('%tokens', $tokens, $grammarCode);
|
|
39
|
-
$grammarCode = preprocessGrammar($grammarCode);
|
|
40
|
-
|
|
41
|
-
file_put_contents($tmpGrammarFile, $grammarCode);
|
|
42
|
-
|
|
43
|
-
$additionalArgs = $optionDebug ? '-t -v' : '';
|
|
44
|
-
|
|
45
|
-
echo "Building $name parser.\n";
|
|
46
|
-
$output = execCmd("$kmyacc $additionalArgs -m $skeletonFile -p $name $tmpGrammarFile");
|
|
47
|
-
|
|
48
|
-
$resultCode = file_get_contents($tmpResultFile);
|
|
49
|
-
$resultCode = removeTrailingWhitespace($resultCode);
|
|
50
|
-
|
|
51
|
-
ensureDirExists($resultDir);
|
|
52
|
-
file_put_contents("$resultDir/$name.php", $resultCode);
|
|
53
|
-
unlink($tmpResultFile);
|
|
54
|
-
|
|
55
|
-
echo "Building token definition.\n";
|
|
56
|
-
$output = execCmd("$kmyacc -m $tokensTemplate $tmpGrammarFile");
|
|
57
|
-
rename($tmpResultFile, $tokensResultsFile);
|
|
58
|
-
|
|
59
|
-
if (!$optionKeepTmpGrammar) {
|
|
60
|
-
unlink($tmpGrammarFile);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
////////////////////////////////
|
|
65
|
-
/// Utility helper functions ///
|
|
66
|
-
////////////////////////////////
|
|
67
|
-
|
|
68
|
-
function ensureDirExists($dir) {
|
|
69
|
-
if (!is_dir($dir)) {
|
|
70
|
-
mkdir($dir, 0777, true);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function execCmd($cmd) {
|
|
75
|
-
$output = trim(shell_exec("$cmd 2>&1"));
|
|
76
|
-
if ($output !== "") {
|
|
77
|
-
echo "> " . $cmd . "\n";
|
|
78
|
-
echo $output;
|
|
79
|
-
}
|
|
80
|
-
return $output;
|
|
81
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
$meta #
|
|
3
|
-
#semval($) $this->semValue
|
|
4
|
-
#semval($,%t) $this->semValue
|
|
5
|
-
#semval(%n) $this->stackPos-(%l-%n)
|
|
6
|
-
#semval(%n,%t) $this->stackPos-(%l-%n)
|
|
7
|
-
|
|
8
|
-
namespace PhpParser\Parser;
|
|
9
|
-
#include;
|
|
10
|
-
|
|
11
|
-
/* GENERATED file based on grammar/tokens.y */
|
|
12
|
-
final class Tokens
|
|
13
|
-
{
|
|
14
|
-
#tokenval
|
|
15
|
-
const %s = %n;
|
|
16
|
-
#endtokenval
|
|
17
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/* We currently rely on the token ID mapping to be the same between PHP 5 and PHP 7 - so the same lexer can be used for
|
|
2
|
-
* both. This is enforced by sharing this token file. */
|
|
3
|
-
|
|
4
|
-
%right T_THROW
|
|
5
|
-
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
|
|
6
|
-
%left ','
|
|
7
|
-
%left T_LOGICAL_OR
|
|
8
|
-
%left T_LOGICAL_XOR
|
|
9
|
-
%left T_LOGICAL_AND
|
|
10
|
-
%right T_PRINT
|
|
11
|
-
%right T_YIELD
|
|
12
|
-
%right T_DOUBLE_ARROW
|
|
13
|
-
%right T_YIELD_FROM
|
|
14
|
-
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL T_COALESCE_EQUAL
|
|
15
|
-
%left '?' ':'
|
|
16
|
-
%right T_COALESCE
|
|
17
|
-
%left T_BOOLEAN_OR
|
|
18
|
-
%left T_BOOLEAN_AND
|
|
19
|
-
%left '|'
|
|
20
|
-
%left '^'
|
|
21
|
-
%left '&'
|
|
22
|
-
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL T_SPACESHIP
|
|
23
|
-
%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
|
|
24
|
-
%left T_SL T_SR
|
|
25
|
-
%left '+' '-' '.'
|
|
26
|
-
%left '*' '/' '%'
|
|
27
|
-
%right '!'
|
|
28
|
-
%nonassoc T_INSTANCEOF
|
|
29
|
-
%right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
|
|
30
|
-
%right T_POW
|
|
31
|
-
%right '['
|
|
32
|
-
%nonassoc T_NEW T_CLONE
|
|
33
|
-
%token T_EXIT
|
|
34
|
-
%token T_IF
|
|
35
|
-
%left T_ELSEIF
|
|
36
|
-
%left T_ELSE
|
|
37
|
-
%left T_ENDIF
|
|
38
|
-
%token T_LNUMBER
|
|
39
|
-
%token T_DNUMBER
|
|
40
|
-
%token T_STRING
|
|
41
|
-
%token T_STRING_VARNAME
|
|
42
|
-
%token T_VARIABLE
|
|
43
|
-
%token T_NUM_STRING
|
|
44
|
-
%token T_INLINE_HTML
|
|
45
|
-
%token T_ENCAPSED_AND_WHITESPACE
|
|
46
|
-
%token T_CONSTANT_ENCAPSED_STRING
|
|
47
|
-
%token T_ECHO
|
|
48
|
-
%token T_DO
|
|
49
|
-
%token T_WHILE
|
|
50
|
-
%token T_ENDWHILE
|
|
51
|
-
%token T_FOR
|
|
52
|
-
%token T_ENDFOR
|
|
53
|
-
%token T_FOREACH
|
|
54
|
-
%token T_ENDFOREACH
|
|
55
|
-
%token T_DECLARE
|
|
56
|
-
%token T_ENDDECLARE
|
|
57
|
-
%token T_AS
|
|
58
|
-
%token T_SWITCH
|
|
59
|
-
%token T_MATCH
|
|
60
|
-
%token T_ENDSWITCH
|
|
61
|
-
%token T_CASE
|
|
62
|
-
%token T_DEFAULT
|
|
63
|
-
%token T_BREAK
|
|
64
|
-
%token T_CONTINUE
|
|
65
|
-
%token T_GOTO
|
|
66
|
-
%token T_FUNCTION
|
|
67
|
-
%token T_FN
|
|
68
|
-
%token T_CONST
|
|
69
|
-
%token T_RETURN
|
|
70
|
-
%token T_TRY
|
|
71
|
-
%token T_CATCH
|
|
72
|
-
%token T_FINALLY
|
|
73
|
-
%token T_THROW
|
|
74
|
-
%token T_USE
|
|
75
|
-
%token T_INSTEADOF
|
|
76
|
-
%token T_GLOBAL
|
|
77
|
-
%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC
|
|
78
|
-
%token T_VAR
|
|
79
|
-
%token T_UNSET
|
|
80
|
-
%token T_ISSET
|
|
81
|
-
%token T_EMPTY
|
|
82
|
-
%token T_HALT_COMPILER
|
|
83
|
-
%token T_CLASS
|
|
84
|
-
%token T_TRAIT
|
|
85
|
-
%token T_INTERFACE
|
|
86
|
-
%token T_ENUM
|
|
87
|
-
%token T_EXTENDS
|
|
88
|
-
%token T_IMPLEMENTS
|
|
89
|
-
%token T_OBJECT_OPERATOR
|
|
90
|
-
%token T_NULLSAFE_OBJECT_OPERATOR
|
|
91
|
-
%token T_DOUBLE_ARROW
|
|
92
|
-
%token T_LIST
|
|
93
|
-
%token T_ARRAY
|
|
94
|
-
%token T_CALLABLE
|
|
95
|
-
%token T_CLASS_C
|
|
96
|
-
%token T_TRAIT_C
|
|
97
|
-
%token T_METHOD_C
|
|
98
|
-
%token T_FUNC_C
|
|
99
|
-
%token T_LINE
|
|
100
|
-
%token T_FILE
|
|
101
|
-
%token T_START_HEREDOC
|
|
102
|
-
%token T_END_HEREDOC
|
|
103
|
-
%token T_DOLLAR_OPEN_CURLY_BRACES
|
|
104
|
-
%token T_CURLY_OPEN
|
|
105
|
-
%token T_PAAMAYIM_NEKUDOTAYIM
|
|
106
|
-
%token T_NAMESPACE
|
|
107
|
-
%token T_NS_C
|
|
108
|
-
%token T_DIR
|
|
109
|
-
%token T_NS_SEPARATOR
|
|
110
|
-
%token T_ELLIPSIS
|
|
111
|
-
%token T_NAME_FULLY_QUALIFIED
|
|
112
|
-
%token T_NAME_QUALIFIED
|
|
113
|
-
%token T_NAME_RELATIVE
|
|
114
|
-
%token T_ATTRIBUTE
|
|
115
|
-
%token T_ENUM
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<?php declare(strict_types=1);
|
|
2
|
-
|
|
3
|
-
namespace PhpParser\Lexer\TokenEmulator;
|
|
4
|
-
|
|
5
|
-
use PhpParser\Lexer\Emulative;
|
|
6
|
-
|
|
7
|
-
final class CoaleseEqualTokenEmulator extends TokenEmulator
|
|
8
|
-
{
|
|
9
|
-
public function getPhpVersion(): string
|
|
10
|
-
{
|
|
11
|
-
return Emulative::PHP_7_4;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public function isEmulationNeeded(string $code): bool
|
|
15
|
-
{
|
|
16
|
-
return strpos($code, '??=') !== false;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
public function emulate(string $code, array $tokens): array
|
|
20
|
-
{
|
|
21
|
-
// We need to manually iterate and manage a count because we'll change
|
|
22
|
-
// the tokens array on the way
|
|
23
|
-
$line = 1;
|
|
24
|
-
for ($i = 0, $c = count($tokens); $i < $c; ++$i) {
|
|
25
|
-
if (isset($tokens[$i + 1])) {
|
|
26
|
-
if ($tokens[$i][0] === T_COALESCE && $tokens[$i + 1] === '=') {
|
|
27
|
-
array_splice($tokens, $i, 2, [
|
|
28
|
-
[\T_COALESCE_EQUAL, '??=', $line]
|
|
29
|
-
]);
|
|
30
|
-
$c--;
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
if (\is_array($tokens[$i])) {
|
|
35
|
-
$line += substr_count($tokens[$i][1], "\n");
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return $tokens;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
public function reverseEmulate(string $code, array $tokens): array
|
|
43
|
-
{
|
|
44
|
-
// ??= was not valid code previously, don't bother.
|
|
45
|
-
return $tokens;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<?php declare(strict_types=1);
|
|
2
|
-
|
|
3
|
-
namespace PhpParser\Lexer\TokenEmulator;
|
|
4
|
-
|
|
5
|
-
use PhpParser\Lexer\Emulative;
|
|
6
|
-
|
|
7
|
-
final class FlexibleDocStringEmulator extends TokenEmulator
|
|
8
|
-
{
|
|
9
|
-
const FLEXIBLE_DOC_STRING_REGEX = <<<'REGEX'
|
|
10
|
-
/<<<[ \t]*(['"]?)([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)\1\r?\n
|
|
11
|
-
(?:.*\r?\n)*?
|
|
12
|
-
(?<indentation>\h*)\2(?![a-zA-Z0-9_\x80-\xff])(?<separator>(?:;?[\r\n])?)/x
|
|
13
|
-
REGEX;
|
|
14
|
-
|
|
15
|
-
public function getPhpVersion(): string
|
|
16
|
-
{
|
|
17
|
-
return Emulative::PHP_7_3;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public function isEmulationNeeded(string $code) : bool
|
|
21
|
-
{
|
|
22
|
-
return strpos($code, '<<<') !== false;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
public function emulate(string $code, array $tokens): array
|
|
26
|
-
{
|
|
27
|
-
// Handled by preprocessing + fixup.
|
|
28
|
-
return $tokens;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
public function reverseEmulate(string $code, array $tokens): array
|
|
32
|
-
{
|
|
33
|
-
// Not supported.
|
|
34
|
-
return $tokens;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
public function preprocessCode(string $code, array &$patches): string {
|
|
38
|
-
if (!preg_match_all(self::FLEXIBLE_DOC_STRING_REGEX, $code, $matches, PREG_SET_ORDER|PREG_OFFSET_CAPTURE)) {
|
|
39
|
-
// No heredoc/nowdoc found
|
|
40
|
-
return $code;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Keep track of how much we need to adjust string offsets due to the modifications we
|
|
44
|
-
// already made
|
|
45
|
-
$posDelta = 0;
|
|
46
|
-
foreach ($matches as $match) {
|
|
47
|
-
$indentation = $match['indentation'][0];
|
|
48
|
-
$indentationStart = $match['indentation'][1];
|
|
49
|
-
|
|
50
|
-
$separator = $match['separator'][0];
|
|
51
|
-
$separatorStart = $match['separator'][1];
|
|
52
|
-
|
|
53
|
-
if ($indentation === '' && $separator !== '') {
|
|
54
|
-
// Ordinary heredoc/nowdoc
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if ($indentation !== '') {
|
|
59
|
-
// Remove indentation
|
|
60
|
-
$indentationLen = strlen($indentation);
|
|
61
|
-
$code = substr_replace($code, '', $indentationStart + $posDelta, $indentationLen);
|
|
62
|
-
$patches[] = [$indentationStart + $posDelta, 'add', $indentation];
|
|
63
|
-
$posDelta -= $indentationLen;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if ($separator === '') {
|
|
67
|
-
// Insert newline as separator
|
|
68
|
-
$code = substr_replace($code, "\n", $separatorStart + $posDelta, 0);
|
|
69
|
-
$patches[] = [$separatorStart + $posDelta, 'remove', "\n"];
|
|
70
|
-
$posDelta += 1;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return $code;
|
|
75
|
-
}
|
|
76
|
-
}
|
package/php-subsystem/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<?php declare(strict_types=1);
|
|
2
|
-
|
|
3
|
-
namespace PhpParser\Lexer\TokenEmulator;
|
|
4
|
-
|
|
5
|
-
use PhpParser\Lexer\Emulative;
|
|
6
|
-
|
|
7
|
-
final class FnTokenEmulator extends KeywordEmulator
|
|
8
|
-
{
|
|
9
|
-
public function getPhpVersion(): string
|
|
10
|
-
{
|
|
11
|
-
return Emulative::PHP_7_4;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public function getKeywordString(): string
|
|
15
|
-
{
|
|
16
|
-
return 'fn';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
public function getKeywordToken(): int
|
|
20
|
-
{
|
|
21
|
-
return \T_FN;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<?php declare(strict_types=1);
|
|
2
|
-
|
|
3
|
-
namespace PhpParser\Lexer\TokenEmulator;
|
|
4
|
-
|
|
5
|
-
use PhpParser\Lexer\Emulative;
|
|
6
|
-
|
|
7
|
-
final class NumericLiteralSeparatorEmulator extends TokenEmulator
|
|
8
|
-
{
|
|
9
|
-
const BIN = '(?:0b[01]+(?:_[01]+)*)';
|
|
10
|
-
const HEX = '(?:0x[0-9a-f]+(?:_[0-9a-f]+)*)';
|
|
11
|
-
const DEC = '(?:[0-9]+(?:_[0-9]+)*)';
|
|
12
|
-
const SIMPLE_FLOAT = '(?:' . self::DEC . '\.' . self::DEC . '?|\.' . self::DEC . ')';
|
|
13
|
-
const EXP = '(?:e[+-]?' . self::DEC . ')';
|
|
14
|
-
const FLOAT = '(?:' . self::SIMPLE_FLOAT . self::EXP . '?|' . self::DEC . self::EXP . ')';
|
|
15
|
-
const NUMBER = '~' . self::FLOAT . '|' . self::BIN . '|' . self::HEX . '|' . self::DEC . '~iA';
|
|
16
|
-
|
|
17
|
-
public function getPhpVersion(): string
|
|
18
|
-
{
|
|
19
|
-
return Emulative::PHP_7_4;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
public function isEmulationNeeded(string $code) : bool
|
|
23
|
-
{
|
|
24
|
-
return preg_match('~[0-9]_[0-9]~', $code)
|
|
25
|
-
|| preg_match('~0x[0-9a-f]+_[0-9a-f]~i', $code);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
public function emulate(string $code, array $tokens): array
|
|
29
|
-
{
|
|
30
|
-
// We need to manually iterate and manage a count because we'll change
|
|
31
|
-
// the tokens array on the way
|
|
32
|
-
$codeOffset = 0;
|
|
33
|
-
for ($i = 0, $c = count($tokens); $i < $c; ++$i) {
|
|
34
|
-
$token = $tokens[$i];
|
|
35
|
-
$tokenLen = \strlen(\is_array($token) ? $token[1] : $token);
|
|
36
|
-
|
|
37
|
-
if ($token[0] !== T_LNUMBER && $token[0] !== T_DNUMBER) {
|
|
38
|
-
$codeOffset += $tokenLen;
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
$res = preg_match(self::NUMBER, $code, $matches, 0, $codeOffset);
|
|
43
|
-
assert($res, "No number at number token position");
|
|
44
|
-
|
|
45
|
-
$match = $matches[0];
|
|
46
|
-
$matchLen = \strlen($match);
|
|
47
|
-
if ($matchLen === $tokenLen) {
|
|
48
|
-
// Original token already holds the full number.
|
|
49
|
-
$codeOffset += $tokenLen;
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
$tokenKind = $this->resolveIntegerOrFloatToken($match);
|
|
54
|
-
$newTokens = [[$tokenKind, $match, $token[2]]];
|
|
55
|
-
|
|
56
|
-
$numTokens = 1;
|
|
57
|
-
$len = $tokenLen;
|
|
58
|
-
while ($matchLen > $len) {
|
|
59
|
-
$nextToken = $tokens[$i + $numTokens];
|
|
60
|
-
$nextTokenText = \is_array($nextToken) ? $nextToken[1] : $nextToken;
|
|
61
|
-
$nextTokenLen = \strlen($nextTokenText);
|
|
62
|
-
|
|
63
|
-
$numTokens++;
|
|
64
|
-
if ($matchLen < $len + $nextTokenLen) {
|
|
65
|
-
// Split trailing characters into a partial token.
|
|
66
|
-
assert(is_array($nextToken), "Partial token should be an array token");
|
|
67
|
-
$partialText = substr($nextTokenText, $matchLen - $len);
|
|
68
|
-
$newTokens[] = [$nextToken[0], $partialText, $nextToken[2]];
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
$len += $nextTokenLen;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
array_splice($tokens, $i, $numTokens, $newTokens);
|
|
76
|
-
$c -= $numTokens - \count($newTokens);
|
|
77
|
-
$codeOffset += $matchLen;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return $tokens;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
private function resolveIntegerOrFloatToken(string $str): int
|
|
84
|
-
{
|
|
85
|
-
$str = str_replace('_', '', $str);
|
|
86
|
-
|
|
87
|
-
if (stripos($str, '0b') === 0) {
|
|
88
|
-
$num = bindec($str);
|
|
89
|
-
} elseif (stripos($str, '0x') === 0) {
|
|
90
|
-
$num = hexdec($str);
|
|
91
|
-
} elseif (stripos($str, '0') === 0 && ctype_digit($str)) {
|
|
92
|
-
$num = octdec($str);
|
|
93
|
-
} else {
|
|
94
|
-
$num = +$str;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return is_float($num) ? T_DNUMBER : T_LNUMBER;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
public function reverseEmulate(string $code, array $tokens): array
|
|
101
|
-
{
|
|
102
|
-
// Numeric separators were not legal code previously, don't bother.
|
|
103
|
-
return $tokens;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<?php declare(strict_types=1);
|
|
2
|
-
|
|
3
|
-
namespace PhpParser\Node\Stmt;
|
|
4
|
-
|
|
5
|
-
use PhpParser\Node;
|
|
6
|
-
|
|
7
|
-
class Throw_ extends Node\Stmt
|
|
8
|
-
{
|
|
9
|
-
/** @var Node\Expr Expression */
|
|
10
|
-
public $expr;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Constructs a legacy throw statement node.
|
|
14
|
-
*
|
|
15
|
-
* @param Node\Expr $expr Expression
|
|
16
|
-
* @param array $attributes Additional attributes
|
|
17
|
-
*/
|
|
18
|
-
public function __construct(Node\Expr $expr, array $attributes = []) {
|
|
19
|
-
$this->attributes = $attributes;
|
|
20
|
-
$this->expr = $expr;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
public function getSubNodeNames() : array {
|
|
24
|
-
return ['expr'];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public function getType() : string {
|
|
28
|
-
return 'Stmt_Throw';
|
|
29
|
-
}
|
|
30
|
-
}
|