typo3-typescript-sources 13.4.20
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/.github/workflows/sync-and-publish.yml +265 -0
- package/.last-synced-tag +1 -0
- package/LICENSE.txt +339 -0
- package/README-TYPO3.md +166 -0
- package/README.md +28 -0
- package/adminpanel/admin-panel.ts +375 -0
- package/adminpanel/modules/cache.ts +27 -0
- package/adminpanel/modules/preview.ts +75 -0
- package/backend/action-button/abstract-action.ts +22 -0
- package/backend/action-button/deferred-action.ts +41 -0
- package/backend/action-button/immediate-action.ts +31 -0
- package/backend/action-dispatcher.ts +104 -0
- package/backend/ajax-data-handler/message-interface.ts +18 -0
- package/backend/ajax-data-handler/response-interface.ts +20 -0
- package/backend/ajax-data-handler.ts +214 -0
- package/backend/backend-exception.ts +22 -0
- package/backend/broadcast-message.ts +50 -0
- package/backend/broadcast-service.ts +52 -0
- package/backend/browse-database.ts +38 -0
- package/backend/clear-cache.ts +88 -0
- package/backend/clipboard-panel.ts +240 -0
- package/backend/close-current-window.ts +2 -0
- package/backend/code-editor/autocomplete/completion-result.ts +105 -0
- package/backend/code-editor/autocomplete/ts-code-completion.ts +142 -0
- package/backend/code-editor/autocomplete/ts-parser.ts +485 -0
- package/backend/code-editor/autocomplete/ts-ref.ts +164 -0
- package/backend/code-editor/element/code-mirror-element.ts +282 -0
- package/backend/code-editor/language/typoscript.ts +181 -0
- package/backend/code-editor/stream-parser/typoscript.ts +1600 -0
- package/backend/color-picker.ts +158 -0
- package/backend/color-scheme-switch.ts +179 -0
- package/backend/column-selector-button.ts +302 -0
- package/backend/context-help.ts +68 -0
- package/backend/context-menu-actions.ts +322 -0
- package/backend/context-menu.ts +751 -0
- package/backend/copy-to-clipboard.ts +79 -0
- package/backend/date-time-picker.ts +270 -0
- package/backend/document-save-actions.ts +159 -0
- package/backend/drag-tooltip.ts +285 -0
- package/backend/drag-uploader.ts +914 -0
- package/backend/element/alert-element.ts +116 -0
- package/backend/element/dispatch-modal-button.ts +50 -0
- package/backend/element/draggable-resizable-element.ts +249 -0
- package/backend/element/editable-page-title.ts +306 -0
- package/backend/element/icon-element.ts +84 -0
- package/backend/element/immediate-action-element.ts +89 -0
- package/backend/element/pagination.ts +59 -0
- package/backend/element/progress-bar-element.ts +172 -0
- package/backend/element/progress-tracker-element.ts +119 -0
- package/backend/element/pseudo-button.ts +58 -0
- package/backend/element/spinner-element.ts +51 -0
- package/backend/element/thumbnail-element.ts +80 -0
- package/backend/element-browser.ts +182 -0
- package/backend/enum/data-transfer-types.ts +21 -0
- package/backend/enum/icon-types.ts +31 -0
- package/backend/enum/key-types.ts +27 -0
- package/backend/enum/severity.ts +20 -0
- package/backend/enum/viewport/scaffold-identifier.ts +24 -0
- package/backend/event/client-request.ts +25 -0
- package/backend/event/consumable.ts +18 -0
- package/backend/event/consumer-scope.ts +54 -0
- package/backend/event/event-dispatcher.ts +26 -0
- package/backend/event/interaction-request-assignment.ts +24 -0
- package/backend/event/interaction-request-map.ts +75 -0
- package/backend/event/interaction-request.ts +48 -0
- package/backend/event/trigger-request.ts +56 -0
- package/backend/form/submit-interceptor.ts +66 -0
- package/backend/form-engine/container/files-control-container.ts +716 -0
- package/backend/form-engine/container/flex-form-container-container.ts +166 -0
- package/backend/form-engine/container/flex-form-section-container.ts +210 -0
- package/backend/form-engine/container/inline-control-container.ts +1230 -0
- package/backend/form-engine/container/site-language-container.ts +616 -0
- package/backend/form-engine/element/abstract-sortable-select-items.ts +186 -0
- package/backend/form-engine/element/category-element.ts +160 -0
- package/backend/form-engine/element/color-element.ts +81 -0
- package/backend/form-engine/element/datetime-element.ts +66 -0
- package/backend/form-engine/element/extra/char-counter.ts +112 -0
- package/backend/form-engine/element/extra/select-box-filter.ts +85 -0
- package/backend/form-engine/element/folder-element.ts +66 -0
- package/backend/form-engine/element/group-element.ts +47 -0
- package/backend/form-engine/element/json-element.ts +52 -0
- package/backend/form-engine/element/link-element.ts +121 -0
- package/backend/form-engine/element/mfa-info-element.ts +169 -0
- package/backend/form-engine/element/modifier/resizable.ts +27 -0
- package/backend/form-engine/element/modifier/tabbable.ts +29 -0
- package/backend/form-engine/element/online-media-form-element.ts +65 -0
- package/backend/form-engine/element/password-element.ts +71 -0
- package/backend/form-engine/element/select-multiple-side-by-side-element.ts +83 -0
- package/backend/form-engine/element/select-single-element.ts +82 -0
- package/backend/form-engine/element/select-tree-element.ts +148 -0
- package/backend/form-engine/element/select-tree-toolbar.ts +118 -0
- package/backend/form-engine/element/select-tree.ts +210 -0
- package/backend/form-engine/element/slug-element.ts +243 -0
- package/backend/form-engine/element/suggest/result-container.ts +118 -0
- package/backend/form-engine/element/suggest/result-item.ts +90 -0
- package/backend/form-engine/element/table-permission-element.ts +101 -0
- package/backend/form-engine/element/table-wizard-element.ts +427 -0
- package/backend/form-engine/element/text-element.ts +52 -0
- package/backend/form-engine/element/text-table-element.ts +31 -0
- package/backend/form-engine/field-control/add-record.ts +40 -0
- package/backend/form-engine/field-control/edit-popup.ts +64 -0
- package/backend/form-engine/field-control/insert-clipboard.ts +50 -0
- package/backend/form-engine/field-control/link-popup.ts +53 -0
- package/backend/form-engine/field-control/list-module.ts +40 -0
- package/backend/form-engine/field-control/password-generator.ts +102 -0
- package/backend/form-engine/field-control/reset-selection.ts +48 -0
- package/backend/form-engine/field-wizard/localization-state-selector.ts +67 -0
- package/backend/form-engine/field-wizard/value-picker.ts +123 -0
- package/backend/form-engine/field-wizard/value-slider.ts +86 -0
- package/backend/form-engine/inline-relation/ajax-dispatcher.ts +124 -0
- package/backend/form-engine/inline-relation/inline-response-interface.ts +41 -0
- package/backend/form-engine-link-browser-adapter.ts +129 -0
- package/backend/form-engine-review.ts +155 -0
- package/backend/form-engine-suggest.ts +133 -0
- package/backend/form-engine-validation.ts +686 -0
- package/backend/form-engine.ts +1391 -0
- package/backend/global-event-handler.ts +252 -0
- package/backend/grid-editor.ts +1077 -0
- package/backend/hashing/md5.ts +252 -0
- package/backend/helper.ts +24 -0
- package/backend/hotkeys/hotkey-storage.ts +63 -0
- package/backend/hotkeys.ts +216 -0
- package/backend/icons.ts +236 -0
- package/backend/image-manipulation.ts +885 -0
- package/backend/info-window.ts +46 -0
- package/backend/input/clearable.ts +128 -0
- package/backend/input/index.d.ts +8 -0
- package/backend/java-script-module-import-event-handler.ts +19 -0
- package/backend/key-bindings.ts +42 -0
- package/backend/layout-module/drag-drop.ts +359 -0
- package/backend/layout-module/paste.ts +165 -0
- package/backend/link-browser.ts +89 -0
- package/backend/live-search/element/backend-search.ts +34 -0
- package/backend/live-search/element/hint.ts +33 -0
- package/backend/live-search/element/provider/default-result-item.ts +52 -0
- package/backend/live-search/element/provider/page-provider-result-item.ts +52 -0
- package/backend/live-search/element/result/item/action/action-container.ts +135 -0
- package/backend/live-search/element/result/item/action/action.ts +56 -0
- package/backend/live-search/element/result/item/item-container.ts +224 -0
- package/backend/live-search/element/result/item/item.ts +74 -0
- package/backend/live-search/element/result/result-container.ts +110 -0
- package/backend/live-search/element/result/result-detail-container.ts +50 -0
- package/backend/live-search/element/result/result-pagination.ts +122 -0
- package/backend/live-search/element/search-option-item.ts +70 -0
- package/backend/live-search/live-search-configurator.ts +54 -0
- package/backend/live-search/live-search-shortcut.ts +29 -0
- package/backend/live-search/result-types/backend-module-result-type.ts +8 -0
- package/backend/live-search/result-types/default-result-type.ts +21 -0
- package/backend/live-search/result-types/page-result-type.ts +23 -0
- package/backend/localization.ts +390 -0
- package/backend/login-refresh.ts +525 -0
- package/backend/login.ts +179 -0
- package/backend/mail-link-handler.ts +45 -0
- package/backend/modal-interface.ts +19 -0
- package/backend/modal.ts +685 -0
- package/backend/module/iframe.ts +125 -0
- package/backend/module/router.ts +275 -0
- package/backend/module-menu.ts +550 -0
- package/backend/module.ts +133 -0
- package/backend/multi-record-selection-action.ts +44 -0
- package/backend/multi-record-selection-delete-action.ts +108 -0
- package/backend/multi-record-selection-edit-action.ts +56 -0
- package/backend/multi-record-selection.ts +468 -0
- package/backend/multi-step-wizard.ts +568 -0
- package/backend/new-content-element-wizard-button.ts +51 -0
- package/backend/new-multiple-pages.ts +108 -0
- package/backend/new-record-wizard.ts +680 -0
- package/backend/notification.ts +366 -0
- package/backend/offset.ts +40 -0
- package/backend/online-media.ts +110 -0
- package/backend/page-actions.ts +91 -0
- package/backend/page-link-handler.ts +51 -0
- package/backend/pagetsconfig/pagetsconfig-includes.ts +77 -0
- package/backend/popover.ts +165 -0
- package/backend/record-download-button.ts +104 -0
- package/backend/record-link-handler.ts +31 -0
- package/backend/record-search.ts +44 -0
- package/backend/recordlist.ts +230 -0
- package/backend/resource/resource.ts +35 -0
- package/backend/security/element/csp-reports.ts +406 -0
- package/backend/security/element/sudo-mode.ts +249 -0
- package/backend/security/sudo-mode-interceptor.ts +19 -0
- package/backend/settings/editor/editable-setting.ts +231 -0
- package/backend/settings/editor.ts +451 -0
- package/backend/settings/enum/settings-mode.enum.ts +24 -0
- package/backend/settings/type/base.ts +200 -0
- package/backend/settings/type/bool.ts +56 -0
- package/backend/settings/type/color.ts +64 -0
- package/backend/settings/type/int.ts +85 -0
- package/backend/settings/type/number.ts +61 -0
- package/backend/settings/type/page.ts +100 -0
- package/backend/settings/type/string.ts +77 -0
- package/backend/settings/type/stringlist.ts +87 -0
- package/backend/severity.ts +88 -0
- package/backend/site-inline-actions.ts +32 -0
- package/backend/sortable-table.ts +208 -0
- package/backend/storage/abstract-client-storage.ts +76 -0
- package/backend/storage/browser-session.ts +28 -0
- package/backend/storage/client.ts +28 -0
- package/backend/storage/module-state-storage.ts +118 -0
- package/backend/storage/persistent.ts +204 -0
- package/backend/switch-user.ts +82 -0
- package/backend/tabs.ts +72 -0
- package/backend/telephone-link-handler.ts +40 -0
- package/backend/tests/backend/storage/browser-storage-test.ts +87 -0
- package/backend/tests/backend/storage/client-test.ts +87 -0
- package/backend/tests/backend/utility/dom-helper-test.ts +51 -0
- package/backend/tests/backend-exception-test.ts +28 -0
- package/backend/tests/element/immediate-action-element-test.ts +81 -0
- package/backend/tests/form-engine-validation-test.ts +304 -0
- package/backend/tests/grid-editor-test.ts +29 -0
- package/backend/tests/hashing/md5Test.ts +28 -0
- package/backend/tests/icons-test.ts +23 -0
- package/backend/tests/notification-test.ts +161 -0
- package/backend/tests/popover-test.ts +83 -0
- package/backend/toolbar/clear-cache-menu.ts +88 -0
- package/backend/toolbar/live-search.ts +284 -0
- package/backend/toolbar/shortcut-menu.ts +254 -0
- package/backend/toolbar/system-information-menu.ts +161 -0
- package/backend/toolbar.ts +41 -0
- package/backend/tree/file-storage-browser.ts +194 -0
- package/backend/tree/file-storage-tree-container.ts +465 -0
- package/backend/tree/file-storage-tree.ts +42 -0
- package/backend/tree/page-browser.ts +272 -0
- package/backend/tree/page-tree-element.ts +602 -0
- package/backend/tree/page-tree.ts +152 -0
- package/backend/tree/tree-module-state.ts +159 -0
- package/backend/tree/tree-node-toggle.ts +31 -0
- package/backend/tree/tree-node.ts +97 -0
- package/backend/tree/tree-toolbar.ts +117 -0
- package/backend/tree/tree.ts +1595 -0
- package/backend/url-link-handler.ts +36 -0
- package/backend/user-pass-login.ts +255 -0
- package/backend/user-settings-manager.ts +189 -0
- package/backend/utility/collapse-state-persister.ts +205 -0
- package/backend/utility/collapse-state-search.ts +183 -0
- package/backend/utility/dom-helper.ts +91 -0
- package/backend/utility/drag-drop-utility.ts +47 -0
- package/backend/utility/message-utility.ts +45 -0
- package/backend/utility/top-level-module-import.ts +32 -0
- package/backend/utility.ts +194 -0
- package/backend/viewport/abstract-container.ts +22 -0
- package/backend/viewport/content-container.ts +98 -0
- package/backend/viewport/loader.ts +28 -0
- package/backend/viewport/navigation-container.ts +119 -0
- package/backend/viewport/resizable-navigation.ts +176 -0
- package/backend/viewport/toolbar.ts +27 -0
- package/backend/viewport/topbar.ts +39 -0
- package/backend/viewport.ts +46 -0
- package/backend/window-manager.ts +84 -0
- package/backend/wizard/move-content-element.ts +107 -0
- package/backend/wizard/move-page.ts +74 -0
- package/backend/wizard.ts +331 -0
- package/belog/backend-log.ts +88 -0
- package/beuser/backend-user-listing.ts +40 -0
- package/beuser/permissions.ts +291 -0
- package/core/ajax/ajax-request-types.ts +15 -0
- package/core/ajax/ajax-request.ts +202 -0
- package/core/ajax/ajax-response.ts +57 -0
- package/core/ajax/input-transformer.ts +92 -0
- package/core/ajax/simple-response-interface.ts +5 -0
- package/core/authentication/mfa-provider/totp.ts +54 -0
- package/core/cache/dedupe-async-task.ts +95 -0
- package/core/directive/markdown.ts +82 -0
- package/core/directive/nl2br.ts +16 -0
- package/core/document-service.ts +35 -0
- package/core/event/debounce-event.ts +40 -0
- package/core/event/event-interface.ts +24 -0
- package/core/event/regular-event.ts +58 -0
- package/core/event/request-animation-frame-event.ts +42 -0
- package/core/event/throttle-event.ts +54 -0
- package/core/java-script-item-handler.ts +29 -0
- package/core/java-script-item-processor.ts +171 -0
- package/core/lit-helper.ts +126 -0
- package/core/literals.ts +17 -0
- package/core/referrer-refresh.ts +2 -0
- package/core/security-utility.ts +89 -0
- package/core/tests/ajax/ajax-request-test.ts +290 -0
- package/core/tests/ajax/input-transformer-test.ts +64 -0
- package/core/tests/cache/dedupe-async-task-test.ts +152 -0
- package/core/tests/event/throttle-event-test.ts +47 -0
- package/core/tests/literals-test.ts +24 -0
- package/core/tests/security-utility-test.ts +50 -0
- package/core/utility/types.ts +9 -0
- package/dashboard/chart-initializer.ts +136 -0
- package/dashboard/dashboard.ts +1487 -0
- package/extensionmanager/distribution-image.ts +55 -0
- package/extensionmanager/main.ts +291 -0
- package/extensionmanager/repository.ts +195 -0
- package/extensionmanager/update.ts +118 -0
- package/extensionmanager/upload-form.ts +42 -0
- package/filelist/browse-files.ts +148 -0
- package/filelist/browse-folders.ts +94 -0
- package/filelist/context-menu-actions.ts +335 -0
- package/filelist/create-folder.ts +69 -0
- package/filelist/file-delete.ts +69 -0
- package/filelist/file-list-actions.ts +132 -0
- package/filelist/file-list-dragdrop.ts +139 -0
- package/filelist/file-list-rename-handler.ts +128 -0
- package/filelist/file-list-transfer-handler.ts +138 -0
- package/filelist/file-list.ts +396 -0
- package/filelist/file-replace.ts +37 -0
- package/filelist/linkbrowser-file-handler.ts +94 -0
- package/filelist/linkbrowser-folder-handler.ts +74 -0
- package/filelist/rename-file.ts +109 -0
- package/form/backend/form-editor/component/property-grid-editor.ts +340 -0
- package/form/backend/form-editor/core.ts +2104 -0
- package/form/backend/form-editor/helper.ts +226 -0
- package/form/backend/form-editor/inspector-component.ts +2323 -0
- package/form/backend/form-editor/mediator.ts +941 -0
- package/form/backend/form-editor/modals-component.ts +433 -0
- package/form/backend/form-editor/stage-component.ts +908 -0
- package/form/backend/form-editor/tree-component.ts +548 -0
- package/form/backend/form-editor/view-model.ts +1343 -0
- package/form/backend/form-editor.ts +846 -0
- package/form/backend/form-manager/main.ts +39 -0
- package/form/backend/form-manager/view-model.ts +789 -0
- package/form/backend/form-manager.ts +180 -0
- package/form/backend/helper.ts +60 -0
- package/form/frontend/date-picker.ts +38 -0
- package/frontend/default_frontend.ts +82 -0
- package/impexp/context-menu-actions.ts +50 -0
- package/impexp/import-export.ts +62 -0
- package/indexed-search/pagination.ts +26 -0
- package/indexed-search/statistics.ts +50 -0
- package/info/translation-status.ts +48 -0
- package/install/ajax/ajax-queue.ts +83 -0
- package/install/init-install.ts +2 -0
- package/install/init-installer.ts +2 -0
- package/install/install.ts +25 -0
- package/install/installer.ts +458 -0
- package/install/message-interface.ts +18 -0
- package/install/module/abstract-inline-module.ts +27 -0
- package/install/module/abstract-interactable-module.ts +107 -0
- package/install/module/environment/environment-check.ts +92 -0
- package/install/module/environment/folder-structure.ts +145 -0
- package/install/module/environment/image-processing.ts +141 -0
- package/install/module/environment/mail-test.ts +127 -0
- package/install/module/environment/php-info.ts +50 -0
- package/install/module/environment/system-information.ts +50 -0
- package/install/module/maintenance/cache.ts +59 -0
- package/install/module/maintenance/clear-tables.ts +134 -0
- package/install/module/maintenance/clear-typo3temp-files.ts +137 -0
- package/install/module/maintenance/create-admin.ts +126 -0
- package/install/module/maintenance/database-analyzer.ts +266 -0
- package/install/module/maintenance/dump-autoload.ts +58 -0
- package/install/module/maintenance/language-packs.ts +338 -0
- package/install/module/maintenance/reset-backend-user-uc.ts +58 -0
- package/install/module/password-strength.ts +56 -0
- package/install/module/settings/change-install-tool-password.ts +101 -0
- package/install/module/settings/extension-configuration.ts +224 -0
- package/install/module/settings/features.ts +102 -0
- package/install/module/settings/local-configuration.ts +316 -0
- package/install/module/settings/presets.ts +147 -0
- package/install/module/settings/system-maintainer.ts +111 -0
- package/install/module/upgrade/core-update.ts +255 -0
- package/install/module/upgrade/extension-compat-tester.ts +195 -0
- package/install/module/upgrade/extension-scanner.ts +381 -0
- package/install/module/upgrade/tca-ext-tables-check.ts +93 -0
- package/install/module/upgrade/tca-migrations-check.ts +101 -0
- package/install/module/upgrade/upgrade-docs.ts +310 -0
- package/install/module/upgrade/upgrade-wizards.ts +612 -0
- package/install/renderable/clearable.ts +113 -0
- package/install/renderable/flash-message.ts +64 -0
- package/install/renderable/info-box.ts +66 -0
- package/install/renderable/language-packs.ts +304 -0
- package/install/renderable/offset-group.ts +38 -0
- package/install/renderable/severity.ts +49 -0
- package/install/renderable/wrap-group.ts +36 -0
- package/install/router.ts +468 -0
- package/linkvalidator/linkvalidator-modal.ts +45 -0
- package/linkvalidator/linkvalidator.ts +101 -0
- package/lowlevel/query-generator.ts +132 -0
- package/lowlevel/reference-index.ts +44 -0
- package/opendocs/toolbar/opendocs-menu.ts +117 -0
- package/package.json +34 -0
- package/recycler/recycler.ts +539 -0
- package/redirects/event-handler.ts +108 -0
- package/redirects/form-engine-evaluation.ts +34 -0
- package/redirects/redirects-module.ts +58 -0
- package/rte-ckeditor/ckeditor5.ts +402 -0
- package/rte-ckeditor/css-prefixer.ts +94 -0
- package/rte-ckeditor/legacy/ckeditor5-bundle.ts +17 -0
- package/rte-ckeditor/legacy/ckeditor5-inspector.ts +2 -0
- package/rte-ckeditor/plugin/typo3-link.ts +810 -0
- package/rte-ckeditor/plugin/whitespace.ts +114 -0
- package/rte-ckeditor/rte-link-browser.ts +112 -0
- package/rte-ckeditor/tests/css-prefixer-test.ts +314 -0
- package/scheduler/scheduler-add-group.ts +119 -0
- package/scheduler/scheduler-editable-group-name.ts +307 -0
- package/scheduler/scheduler-sortable-groups.ts +59 -0
- package/scheduler/scheduler.ts +466 -0
- package/setup/setup-module.ts +122 -0
- package/styleguide/checkbox-demo.ts +5 -0
- package/styleguide/element/theme-switcher-element.ts +101 -0
- package/styleguide/filter.ts +22 -0
- package/styleguide/find-icons.ts +78 -0
- package/styleguide/processing-indicator.ts +78 -0
- package/styleguide/render-notifications.ts +64 -0
- package/sys-note/element/delete-button.ts +78 -0
- package/tstemplate/constant-editor.ts +64 -0
- package/tstemplate/information-module.ts +31 -0
- package/tstemplate/template-analyzer.ts +77 -0
- package/viewpage/main.ts +253 -0
- package/workspaces/backend.ts +979 -0
- package/workspaces/preview.ts +232 -0
- package/workspaces/renderable/comment-view.ts +79 -0
- package/workspaces/renderable/diff-view.ts +58 -0
- package/workspaces/renderable/history-view.ts +97 -0
- package/workspaces/renderable/record-information.ts +118 -0
- package/workspaces/renderable/record-table.ts +355 -0
- package/workspaces/renderable/send-to-stage-form.ts +108 -0
- package/workspaces/toolbar/workspaces-menu.ts +190 -0
- package/workspaces/utility/icon-helper.ts +57 -0
- package/workspaces/workspaces.ts +136 -0
|
@@ -0,0 +1,1600 @@
|
|
|
1
|
+
import type { StringStream, StreamParser, IndentContext } from '@codemirror/language';
|
|
2
|
+
|
|
3
|
+
type Type = string;
|
|
4
|
+
type Value = string;
|
|
5
|
+
type Keyword = {
|
|
6
|
+
type: string,
|
|
7
|
+
style: 'keyword'
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type CombinatorReturnType = boolean | undefined;
|
|
11
|
+
type CombinatorFunction = (type?: Type, value?: unknown) => CombinatorReturnType;
|
|
12
|
+
type CombinatorLexFunction = ((type?: Type, value?: unknown) => CombinatorReturnType) & { lex: true };
|
|
13
|
+
type CC = CombinatorFunction | CombinatorLexFunction;
|
|
14
|
+
|
|
15
|
+
type CX = {
|
|
16
|
+
state: State,
|
|
17
|
+
stream?: StringStream,
|
|
18
|
+
column: number,
|
|
19
|
+
marked: string,
|
|
20
|
+
style?: string,
|
|
21
|
+
cc: CC[]
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
type LocalVars = {
|
|
25
|
+
name: string,
|
|
26
|
+
next: LocalVars
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
type Context = {
|
|
30
|
+
vars: LocalVars,
|
|
31
|
+
prev?: Context | null
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
type State = {
|
|
35
|
+
tokenize: (stream: StringStream, state: State) => string | undefined;
|
|
36
|
+
lastType: Type,
|
|
37
|
+
cc: CC[],
|
|
38
|
+
lexical: TSLexical,
|
|
39
|
+
localVars: LocalVars,
|
|
40
|
+
context: Context,
|
|
41
|
+
indented: number,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
class TSLexical {
|
|
45
|
+
public indented: number;
|
|
46
|
+
public column: number;
|
|
47
|
+
public type: Type;
|
|
48
|
+
public prev: TSLexical;
|
|
49
|
+
public info: number | string;
|
|
50
|
+
public align: boolean;
|
|
51
|
+
public pos: number | undefined;
|
|
52
|
+
|
|
53
|
+
constructor(indented: number, column: number, type: Type, align: boolean, prev?: TSLexical, info?: number | string) {
|
|
54
|
+
this.indented = indented;
|
|
55
|
+
this.column = column;
|
|
56
|
+
this.type = type;
|
|
57
|
+
this.prev = prev;
|
|
58
|
+
this.info = info;
|
|
59
|
+
if (align != null) {
|
|
60
|
+
this.align = align;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function expressionAllowed(stream: StringStream, state: State): boolean {
|
|
66
|
+
return (
|
|
67
|
+
// eslint-disable-next-line no-useless-escape
|
|
68
|
+
/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(state.lastType)
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export class TypoScriptStreamParserFactory {
|
|
73
|
+
public create(): StreamParser<State> {
|
|
74
|
+
const wordRE = /[\w$\xa1-\uffff]/;
|
|
75
|
+
//const statementIndent = undefined;
|
|
76
|
+
const statementIndent = false;
|
|
77
|
+
const parserConfig: { name: string, localVars: LocalVars, doubleIndentSwitch: boolean } = {
|
|
78
|
+
name: 'typoscript',
|
|
79
|
+
localVars: undefined,
|
|
80
|
+
doubleIndentSwitch: false,
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Tokenizer
|
|
84
|
+
|
|
85
|
+
const keywords = function(): Record<string, Keyword> {
|
|
86
|
+
function kw(type: string): Keyword {
|
|
87
|
+
return { type: type, style: 'keyword' };
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const A = kw('keyword a'), B = kw('keyword b');
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
'_CSS_DEFAULT_STYLE': kw('_CSS_DEFAULT_STYLE'),
|
|
94
|
+
'_LOCAL_LANG': kw('_LOCAL_LANG'),
|
|
95
|
+
'_offset': kw('_offset'),
|
|
96
|
+
'absRefPrefix': kw('absRefPrefix'),
|
|
97
|
+
'accessibility': kw('accessibility'),
|
|
98
|
+
'ACT': B,
|
|
99
|
+
'ACTIFSUB': B,
|
|
100
|
+
'ACTIFSUBRO': kw('ACTIFSUBRO'),
|
|
101
|
+
'ACTRO': B,
|
|
102
|
+
'addAttributes': kw('addAttributes'),
|
|
103
|
+
'addExtUrlsAndShortCuts': kw('addExtUrlsAndShortCuts'),
|
|
104
|
+
'addItems': kw('addItems'),
|
|
105
|
+
'additionalHeaders': kw('additionalHeaders'),
|
|
106
|
+
'additionalParams': kw('additionalParams'),
|
|
107
|
+
'addQueryString': kw('addQueryString'),
|
|
108
|
+
'adjustItemsH': kw('adjustItemsH'),
|
|
109
|
+
'adjustSubItemsH': kw('adjustSubItemsH'),
|
|
110
|
+
'admPanel': A,
|
|
111
|
+
'after': kw('after'),
|
|
112
|
+
'afterImg': kw('afterImg'),
|
|
113
|
+
'afterImgLink': kw('afterImgLink'),
|
|
114
|
+
'afterImgTagParams': kw('afterImgTagParams'),
|
|
115
|
+
'afterROImg': kw('afterROImg'),
|
|
116
|
+
'afterWrap': kw('afterWrap'),
|
|
117
|
+
'age': kw('age'),
|
|
118
|
+
'alertPopups': kw('alertPopups'),
|
|
119
|
+
'align': kw('align'),
|
|
120
|
+
'all': B,
|
|
121
|
+
'allow': kw('allow'),
|
|
122
|
+
'allowCaching': kw('allowCaching'),
|
|
123
|
+
'allowedAttribs': kw('allowedAttribs'),
|
|
124
|
+
'allowedClasses': kw('allowedClasses'),
|
|
125
|
+
'allowedCols': kw('allowedCols'),
|
|
126
|
+
'allowedNewTables': kw('allowedNewTables'),
|
|
127
|
+
'allowTags': kw('allowTags'),
|
|
128
|
+
'allStdWrap': kw('allStdWrap'),
|
|
129
|
+
'allWrap': kw('allWrap'),
|
|
130
|
+
'alt_print': A,
|
|
131
|
+
'alternativeSortingField': kw('alternativeSortingField'),
|
|
132
|
+
'altIcons': kw('altIcons'),
|
|
133
|
+
'altImgResource': kw('altImgResource'),
|
|
134
|
+
'altLabels': kw('altLabels'),
|
|
135
|
+
'altTarget': kw('altTarget'),
|
|
136
|
+
'altText': kw('altText'),
|
|
137
|
+
'altUrl': kw('altUrl'),
|
|
138
|
+
'altUrl_noDefaultParams': kw('altUrl_noDefaultParams'),
|
|
139
|
+
'altWrap': kw('altWrap'),
|
|
140
|
+
'always': kw('always'),
|
|
141
|
+
'alwaysActivePIDlist': kw('alwaysActivePIDlist'),
|
|
142
|
+
'alwaysLink': kw('alwaysLink'),
|
|
143
|
+
'andWhere': kw('andWhere'),
|
|
144
|
+
'angle': kw('angle'),
|
|
145
|
+
'antiAlias': kw('antiAlias'),
|
|
146
|
+
'append': kw('append'),
|
|
147
|
+
'applyTotalH': kw('applyTotalH'),
|
|
148
|
+
'applyTotalW': kw('applyTotalW'),
|
|
149
|
+
'archive': kw('archive'),
|
|
150
|
+
'ascii': B,
|
|
151
|
+
'ATagAfterWrap': kw('ATagAfterWrap'),
|
|
152
|
+
'ATagBeforeWrap': kw('ATagBeforeWrap'),
|
|
153
|
+
'ATagParams': kw('ATagParams'),
|
|
154
|
+
'ATagTitle': kw('ATagTitle'),
|
|
155
|
+
'atLeast': B,
|
|
156
|
+
'atMost': B,
|
|
157
|
+
'attribute': kw('attribute'),
|
|
158
|
+
'auth': A,
|
|
159
|
+
'autoLevels': kw('autoLevels'),
|
|
160
|
+
'autonumber': kw('autonumber'),
|
|
161
|
+
'backColor': kw('backColor'),
|
|
162
|
+
'background': kw('background'),
|
|
163
|
+
'baseURL': kw('baseURL'),
|
|
164
|
+
'BE': B,
|
|
165
|
+
'be_groups': B,
|
|
166
|
+
'be_users': B,
|
|
167
|
+
'before': kw('before'),
|
|
168
|
+
'beforeImg': kw('beforeImg'),
|
|
169
|
+
'beforeImgLink': kw('beforeImgLink'),
|
|
170
|
+
'beforeImgTagParams': kw('beforeImgTagParams'),
|
|
171
|
+
'beforeROImg': kw('beforeROImg'),
|
|
172
|
+
'beforeWrap': kw('beforeWrap'),
|
|
173
|
+
'begin': kw('begin'),
|
|
174
|
+
'bgCol': kw('bgCol'),
|
|
175
|
+
'bgImg': kw('bgImg'),
|
|
176
|
+
'blur': kw('blur'),
|
|
177
|
+
'bm': kw('bm'),
|
|
178
|
+
'bodyTag': kw('bodyTag'),
|
|
179
|
+
'bodyTagAdd': kw('bodyTagAdd'),
|
|
180
|
+
'bodyTagCObject': kw('bodyTagCObject'),
|
|
181
|
+
'bodytext': kw('bodytext'),
|
|
182
|
+
'borderCol': kw('borderCol'),
|
|
183
|
+
'borderThick': kw('borderThick'),
|
|
184
|
+
'bottomBackColor': kw('bottomBackColor'),
|
|
185
|
+
'bottomContent': kw('bottomContent'),
|
|
186
|
+
'bottomHeight': kw('bottomHeight'),
|
|
187
|
+
'bottomImg': kw('bottomImg'),
|
|
188
|
+
'bottomImg_mask': kw('bottomImg_mask'),
|
|
189
|
+
'BOX': B,
|
|
190
|
+
'br': kw('br'),
|
|
191
|
+
'browse': B,
|
|
192
|
+
'browser': A,
|
|
193
|
+
'brTag': kw('brTag'),
|
|
194
|
+
'bullet': kw('bullet'),
|
|
195
|
+
'bulletlist': kw('bulletlist'),
|
|
196
|
+
'bullets': B,
|
|
197
|
+
'bytes': kw('bytes'),
|
|
198
|
+
'cache': A,
|
|
199
|
+
'cache_clearAtMidnight': kw('cache_clearAtMidnight'),
|
|
200
|
+
'cache_period': kw('cache_period'),
|
|
201
|
+
'caption': kw('caption'),
|
|
202
|
+
'caption_stdWrap': kw('caption_stdWrap'),
|
|
203
|
+
'captionHeader': kw('captionHeader'),
|
|
204
|
+
'captionSplit': kw('captionSplit'),
|
|
205
|
+
'CARRAY': kw('CARRAY'),
|
|
206
|
+
'CASE': kw('CASE'),
|
|
207
|
+
'case': kw('case'),
|
|
208
|
+
'casesensitiveComp': kw('casesensitiveComp'),
|
|
209
|
+
'cellpadding': kw('cellpadding'),
|
|
210
|
+
'cellspacing': kw('cellspacing'),
|
|
211
|
+
'char': kw('char'),
|
|
212
|
+
'charcoal': kw('charcoal'),
|
|
213
|
+
'charMapConfig': kw('charMapConfig'),
|
|
214
|
+
'CHECK': A,
|
|
215
|
+
'check': kw('check'),
|
|
216
|
+
'class': kw('class'),
|
|
217
|
+
'classesAnchor': kw('classesAnchor'),
|
|
218
|
+
'classesCharacter': kw('classesCharacter'),
|
|
219
|
+
'classesImage': kw('classesImage'),
|
|
220
|
+
'classesParagraph': kw('classesParagraph'),
|
|
221
|
+
'clear': kw('clear'),
|
|
222
|
+
'clearCache': kw('clearCache'),
|
|
223
|
+
'clearCache_disable': kw('clearCache_disable'),
|
|
224
|
+
'clearCache_pageGrandParent': kw('clearCache_pageGrandParent'),
|
|
225
|
+
'clearCache_pageSiblingChildren': kw('clearCache_pageSiblingChildren'),
|
|
226
|
+
'clearCacheCmd': kw('clearCacheCmd'),
|
|
227
|
+
'clearCacheLevels': kw('clearCacheLevels'),
|
|
228
|
+
'clearCacheOfPages': kw('clearCacheOfPages'),
|
|
229
|
+
'clickTitleMode': kw('clickTitleMode'),
|
|
230
|
+
'clipboardNumberPads': kw('clipboardNumberPads'),
|
|
231
|
+
'cMargins': kw('cMargins'),
|
|
232
|
+
'COA': kw('COA'),
|
|
233
|
+
'COA_INT': kw('COA_INT'),
|
|
234
|
+
'cObj': A,
|
|
235
|
+
'COBJ_ARRAY': kw('COBJ_ARRAY'),
|
|
236
|
+
'cObject': A,
|
|
237
|
+
'cObjNum': kw('cObjNum'),
|
|
238
|
+
'collapse': kw('collapse'),
|
|
239
|
+
'collections': kw('collections'),
|
|
240
|
+
'color': kw('color'),
|
|
241
|
+
'color1': kw('color1'),
|
|
242
|
+
'color2': kw('color2'),
|
|
243
|
+
'color3': kw('color3'),
|
|
244
|
+
'color4': kw('color4'),
|
|
245
|
+
'colors': kw('colors'),
|
|
246
|
+
'colour': kw('colour'),
|
|
247
|
+
'colPos_list': kw('colPos_list'),
|
|
248
|
+
'colRelations': kw('colRelations'),
|
|
249
|
+
'cols': kw('cols'),
|
|
250
|
+
'colSpace': kw('colSpace'),
|
|
251
|
+
'COMMENT': A,
|
|
252
|
+
'comment_auto': kw('comment_auto'),
|
|
253
|
+
'commentWrap': kw('commentWrap'),
|
|
254
|
+
'compX': kw('compX'),
|
|
255
|
+
'compY': kw('compY'),
|
|
256
|
+
'conf': kw('conf'),
|
|
257
|
+
'CONFIG': kw('CONFIG'),
|
|
258
|
+
'config': A,
|
|
259
|
+
'CONSTANTS': kw('CONSTANTS'),
|
|
260
|
+
'constants': kw('constants'),
|
|
261
|
+
'CONTENT': kw('CONTENT'),
|
|
262
|
+
'content': A,
|
|
263
|
+
'contextMenu': kw('contextMenu'),
|
|
264
|
+
'copy': A,
|
|
265
|
+
'copyLevels': kw('copyLevels'),
|
|
266
|
+
'count_HMENU_MENUOBJ': kw('count_HMENU_MENUOBJ'),
|
|
267
|
+
'count_menuItems': kw('count_menuItems'),
|
|
268
|
+
'count_MENUOBJ': kw('count_MENUOBJ'),
|
|
269
|
+
'create': kw('create'),
|
|
270
|
+
'crop': kw('crop'),
|
|
271
|
+
'csConv': kw('csConv'),
|
|
272
|
+
'CType': kw('CType'),
|
|
273
|
+
'CUR': B,
|
|
274
|
+
'CURIFSUB': B,
|
|
275
|
+
'CURIFSUBRO': B,
|
|
276
|
+
'current': kw('current'),
|
|
277
|
+
'CURRO': B,
|
|
278
|
+
'curUid': kw('curUid'),
|
|
279
|
+
'cut': A,
|
|
280
|
+
'cWidth': kw('cWidth'),
|
|
281
|
+
'data': kw('data'),
|
|
282
|
+
'dataArray': A,
|
|
283
|
+
'dataWrap': kw('dataWrap'),
|
|
284
|
+
'date': kw('date'),
|
|
285
|
+
'date_stdWrap': kw('date_stdWrap'),
|
|
286
|
+
'datePrefix': kw('datePrefix'),
|
|
287
|
+
'dayofmonth': A,
|
|
288
|
+
'dayofweek': A,
|
|
289
|
+
'DB': kw('DB'),
|
|
290
|
+
'db_list': A,
|
|
291
|
+
'debug': kw('debug'),
|
|
292
|
+
'debugData': kw('debugData'),
|
|
293
|
+
'debugFunc': kw('debugFunc'),
|
|
294
|
+
'debugItemConf': kw('debugItemConf'),
|
|
295
|
+
'default': B,
|
|
296
|
+
'defaultAlign': kw('defaultAlign'),
|
|
297
|
+
'defaultCmd': kw('defaultCmd'),
|
|
298
|
+
'defaultHeaderType': kw('defaultHeaderType'),
|
|
299
|
+
'defaultOutput': kw('defaultOutput'),
|
|
300
|
+
'defaults': kw('defaults'),
|
|
301
|
+
'defaultType': kw('defaultType'),
|
|
302
|
+
'delete': kw('delete'),
|
|
303
|
+
'denyTags': kw('denyTags'),
|
|
304
|
+
'depth': kw('depth'),
|
|
305
|
+
'DESC': kw('DESC'),
|
|
306
|
+
'description': B,
|
|
307
|
+
'dimensions': kw('dimensions'),
|
|
308
|
+
'direction': kw('direction'),
|
|
309
|
+
'directory': B,
|
|
310
|
+
'directReturn': B,
|
|
311
|
+
'disableAllHeaderCode': kw('disableAllHeaderCode'),
|
|
312
|
+
'disableAltText': kw('disableAltText'),
|
|
313
|
+
'disableBodyTag': kw('disableBodyTag'),
|
|
314
|
+
'disabled': kw('disabled'),
|
|
315
|
+
'disableDelete': kw('disableDelete'),
|
|
316
|
+
'disableHideAtCopy': kw('disableHideAtCopy'),
|
|
317
|
+
'disableItems': kw('disableItems'),
|
|
318
|
+
'disableNoMatchingValueElement': kw('disableNoMatchingValueElement'),
|
|
319
|
+
'disablePrefixComment': kw('disablePrefixComment'),
|
|
320
|
+
'disablePrependAtCopy': kw('disablePrependAtCopy'),
|
|
321
|
+
'disableSearchBox': kw('disableSearchBox'),
|
|
322
|
+
'disableSingleTableView': kw('disableSingleTableView'),
|
|
323
|
+
'displayContent': kw('displayContent'),
|
|
324
|
+
'displayFieldIcons': kw('displayFieldIcons'),
|
|
325
|
+
'displayIcons': kw('displayIcons'),
|
|
326
|
+
'displayMessages': kw('displayMessages'),
|
|
327
|
+
'displayRecord': kw('displayRecord'),
|
|
328
|
+
'displayTimes': kw('displayTimes'),
|
|
329
|
+
'distributeX': kw('distributeX'),
|
|
330
|
+
'distributeY': kw('distributeY'),
|
|
331
|
+
'div': B,
|
|
332
|
+
'DIV': kw('DIV'),
|
|
333
|
+
'doctype': kw('doctype'),
|
|
334
|
+
'DOCUMENT_BODY': kw('DOCUMENT_BODY'),
|
|
335
|
+
'doktype': kw('doktype'),
|
|
336
|
+
'doNotLinkIt': kw('doNotLinkIt'),
|
|
337
|
+
'doNotShowLink': kw('doNotShowLink'),
|
|
338
|
+
'doNotStripHTML': kw('doNotStripHTML'),
|
|
339
|
+
'dontCheckPid': kw('dontCheckPid'),
|
|
340
|
+
'dontLinkIfSubmenu': kw('dontLinkIfSubmenu'),
|
|
341
|
+
'dontWrapInTable': kw('dontWrapInTable'),
|
|
342
|
+
'doubleBrTag': kw('doubleBrTag'),
|
|
343
|
+
'dynCSS': A,
|
|
344
|
+
'edge': kw('edge'),
|
|
345
|
+
'edit': A,
|
|
346
|
+
'edit_access': A,
|
|
347
|
+
'edit_docModuleUpload': kw('edit_docModuleUpload'),
|
|
348
|
+
'EFFECT': kw('EFFECT'),
|
|
349
|
+
'elements': kw('elements'),
|
|
350
|
+
'else': B,
|
|
351
|
+
'email': B,
|
|
352
|
+
'emailMeAtLogin': kw('emailMeAtLogin'),
|
|
353
|
+
'emailMess': kw('emailMess'),
|
|
354
|
+
'emboss': kw('emboss'),
|
|
355
|
+
'enable': kw('enable'),
|
|
356
|
+
'encapsLines': kw('encapsLines'),
|
|
357
|
+
'encapsLinesStdWrap': kw('encapsLinesStdWrap'),
|
|
358
|
+
'encapsTagList': kw('encapsTagList'),
|
|
359
|
+
'end': B,
|
|
360
|
+
'entryLevel': kw('entryLevel'),
|
|
361
|
+
'equalH': kw('equalH'),
|
|
362
|
+
'equals': B,
|
|
363
|
+
'everybody': kw('everybody'),
|
|
364
|
+
'excludeDoktypes': kw('excludeDoktypes'),
|
|
365
|
+
'excludeUidList': kw('excludeUidList'),
|
|
366
|
+
'expAll': kw('expAll'),
|
|
367
|
+
'expand': kw('expand'),
|
|
368
|
+
'explode': kw('explode'),
|
|
369
|
+
'ext': kw('ext'),
|
|
370
|
+
'external': B,
|
|
371
|
+
'externalBlocks': kw('externalBlocks'),
|
|
372
|
+
'extTarget': kw('extTarget'),
|
|
373
|
+
'face': kw('face'),
|
|
374
|
+
'false': B,
|
|
375
|
+
'FE': B,
|
|
376
|
+
'fe_adminLib': kw('fe_adminLib'),
|
|
377
|
+
'fe_groups': B,
|
|
378
|
+
'fe_users': B,
|
|
379
|
+
'feadmin': B,
|
|
380
|
+
'field': kw('field'),
|
|
381
|
+
'fieldName': kw('fieldName'),
|
|
382
|
+
'fieldOrder': kw('fieldOrder'),
|
|
383
|
+
'fieldRequired': kw('fieldRequired'),
|
|
384
|
+
'fields': kw('fields'),
|
|
385
|
+
'fieldWrap': kw('fieldWrap'),
|
|
386
|
+
'file': kw('file'),
|
|
387
|
+
'file1': kw('file1'),
|
|
388
|
+
'file2': kw('file2'),
|
|
389
|
+
'file3': kw('file3'),
|
|
390
|
+
'file4': kw('file4'),
|
|
391
|
+
'file5': kw('file5'),
|
|
392
|
+
'FILES': kw('FILES'),
|
|
393
|
+
'files': kw('files'),
|
|
394
|
+
'firstLabel': kw('firstLabel'),
|
|
395
|
+
'firstLabelGeneral': kw('firstLabelGeneral'),
|
|
396
|
+
'fixAttrib': kw('fixAttrib'),
|
|
397
|
+
'flip': kw('flip'),
|
|
398
|
+
'flop': kw('flop'),
|
|
399
|
+
'FLUIDTEMPLATE': kw('FLUIDTEMPLATE'),
|
|
400
|
+
'folder': A,
|
|
401
|
+
'folders': kw('folders'),
|
|
402
|
+
'folderTree': A,
|
|
403
|
+
'foldoutMenu': A,
|
|
404
|
+
'fontColor': kw('fontColor'),
|
|
405
|
+
'fontFile': kw('fontFile'),
|
|
406
|
+
'fontOffset': kw('fontOffset'),
|
|
407
|
+
'fontSize': kw('fontSize'),
|
|
408
|
+
'fontSizeMultiplicator': kw('fontSizeMultiplicator'),
|
|
409
|
+
'forceDisplayFieldIcons': kw('forceDisplayFieldIcons'),
|
|
410
|
+
'forceDisplayIcons': kw('forceDisplayIcons'),
|
|
411
|
+
'forceTemplateParsing': kw('forceTemplateParsing'),
|
|
412
|
+
'forceTypeValue': kw('forceTypeValue'),
|
|
413
|
+
'FORM': kw('FORM'),
|
|
414
|
+
'format': kw('format'),
|
|
415
|
+
'function': kw('function'),
|
|
416
|
+
'Functions': A,
|
|
417
|
+
'gamma': kw('gamma'),
|
|
418
|
+
'gapBgCol': kw('gapBgCol'),
|
|
419
|
+
'gapLineCol': kw('gapLineCol'),
|
|
420
|
+
'gapLineThickness': kw('gapLineThickness'),
|
|
421
|
+
'gapWidth': kw('gapWidth'),
|
|
422
|
+
'get': kw('get'),
|
|
423
|
+
'getBorder': kw('getBorder'),
|
|
424
|
+
'getLeft': kw('getLeft'),
|
|
425
|
+
'getRight': kw('getRight'),
|
|
426
|
+
'GIFBUILDER': kw('GIFBUILDER'),
|
|
427
|
+
'global': kw('global'),
|
|
428
|
+
'globalNesting': kw('globalNesting'),
|
|
429
|
+
'globalString': kw('globalString'),
|
|
430
|
+
'globalVar': kw('globalVar'),
|
|
431
|
+
'GP': kw('GP'),
|
|
432
|
+
'gray': kw('gray'),
|
|
433
|
+
'group': kw('group'),
|
|
434
|
+
'groupBy': kw('groupBy'),
|
|
435
|
+
'groupid': kw('groupid'),
|
|
436
|
+
'header': B,
|
|
437
|
+
'header_layout': kw('header_layout'),
|
|
438
|
+
'headerComment': kw('headerComment'),
|
|
439
|
+
'headerData': kw('headerData'),
|
|
440
|
+
'headerSpace': kw('headerSpace'),
|
|
441
|
+
'headTag': kw('headTag'),
|
|
442
|
+
'height': kw('height'),
|
|
443
|
+
'helpText': kw('helpText'),
|
|
444
|
+
'hidden': kw('hidden'),
|
|
445
|
+
'hiddenFields': kw('hiddenFields'),
|
|
446
|
+
'hide': kw('hide'),
|
|
447
|
+
'hidePStyleItems': kw('hidePStyleItems'),
|
|
448
|
+
'hideRecords': kw('hideRecords'),
|
|
449
|
+
'highColor': kw('highColor'),
|
|
450
|
+
'history': kw('history'),
|
|
451
|
+
'HMENU': kw('HMENU'),
|
|
452
|
+
'hostname': A,
|
|
453
|
+
'hour': A,
|
|
454
|
+
'HTML': kw('HTML'),
|
|
455
|
+
'html': B,
|
|
456
|
+
'HTMLparser': kw('HTMLparser'),
|
|
457
|
+
'HTMLparser_tags': kw('HTMLparser_tags'),
|
|
458
|
+
'htmlSpecialChars': kw('htmlSpecialChars'),
|
|
459
|
+
'htmlTag_setParams': kw('htmlTag_setParams'),
|
|
460
|
+
'http': kw('http'),
|
|
461
|
+
'icon': kw('icon'),
|
|
462
|
+
'icon_image_ext_list': kw('icon_image_ext_list'),
|
|
463
|
+
'icon_link': kw('icon_link'),
|
|
464
|
+
'iconCObject': kw('iconCObject'),
|
|
465
|
+
'id': B,
|
|
466
|
+
'IENV': kw('IENV'),
|
|
467
|
+
'if': B,
|
|
468
|
+
'ifEmpty': B,
|
|
469
|
+
'IFSUB': B,
|
|
470
|
+
'IFSUBRO': B,
|
|
471
|
+
'IMAGE': kw('IMAGE'),
|
|
472
|
+
'image': B,
|
|
473
|
+
'image_frames': kw('image_frames'),
|
|
474
|
+
'imageLinkWrap': kw('imageLinkWrap'),
|
|
475
|
+
'imagePath': kw('imagePath'),
|
|
476
|
+
'images': kw('images'),
|
|
477
|
+
'imageWrapIfAny': kw('imageWrapIfAny'),
|
|
478
|
+
'IMG_RESOURCE': kw('IMG_RESOURCE'),
|
|
479
|
+
'imgList': A,
|
|
480
|
+
'imgMax': kw('imgMax'),
|
|
481
|
+
'imgNameNotRandom': kw('imgNameNotRandom'),
|
|
482
|
+
'imgNamePrefix': kw('imgNamePrefix'),
|
|
483
|
+
'imgObjNum': kw('imgObjNum'),
|
|
484
|
+
'imgParams': kw('imgParams'),
|
|
485
|
+
'imgPath': kw('imgPath'),
|
|
486
|
+
'imgResource': A,
|
|
487
|
+
'imgStart': kw('imgStart'),
|
|
488
|
+
'IMGTEXT': kw('IMGTEXT'),
|
|
489
|
+
'imgText': A,
|
|
490
|
+
'import': kw('import'),
|
|
491
|
+
'inBranch': B,
|
|
492
|
+
'inc': kw('inc'),
|
|
493
|
+
'INCLUDE_TYPOSCRIPT': kw('INCLUDE_TYPOSCRIPT'),
|
|
494
|
+
'includeCSS': kw('includeCSS'),
|
|
495
|
+
'includeLibrary': kw('includeLibrary'),
|
|
496
|
+
'includeNotInMenu': kw('includeNotInMenu'),
|
|
497
|
+
'index': kw('index'),
|
|
498
|
+
'index_descrLgd': kw('index_descrLgd'),
|
|
499
|
+
'index_enable': kw('index_enable'),
|
|
500
|
+
'index_externals': kw('index_externals'),
|
|
501
|
+
'info': A,
|
|
502
|
+
'inlineStyle2TempFile': kw('inlineStyle2TempFile'),
|
|
503
|
+
'innerStdWrap': kw('innerStdWrap'),
|
|
504
|
+
'innerStdWrap_all': kw('innerStdWrap_all'),
|
|
505
|
+
'innerWrap': kw('innerWrap'),
|
|
506
|
+
'innerWrap2': kw('innerWrap2'),
|
|
507
|
+
'input': kw('input'),
|
|
508
|
+
'inputLevels': kw('inputLevels'),
|
|
509
|
+
'insertData': kw('insertData'),
|
|
510
|
+
'intensity': kw('intensity'),
|
|
511
|
+
'intTarget': kw('intTarget'),
|
|
512
|
+
'intval': kw('intval'),
|
|
513
|
+
'invert': kw('invert'),
|
|
514
|
+
'IP': A,
|
|
515
|
+
'IProcFunc': kw('IProcFunc'),
|
|
516
|
+
'isFalse': B,
|
|
517
|
+
'isGreaterThan': B,
|
|
518
|
+
'isInList': B,
|
|
519
|
+
'isLessThan': B,
|
|
520
|
+
'isPositive': B,
|
|
521
|
+
'isTrue': B,
|
|
522
|
+
'itemArrayProcFunc': kw('itemArrayProcFunc'),
|
|
523
|
+
'itemH': kw('itemH'),
|
|
524
|
+
'items': kw('items'),
|
|
525
|
+
'itemsProcFunc': kw('itemsProcFunc'),
|
|
526
|
+
'iterations': kw('iterations'),
|
|
527
|
+
'join': kw('join'),
|
|
528
|
+
'JSwindow': A,
|
|
529
|
+
'JSWindow': kw('JSWindow'),
|
|
530
|
+
'JSwindow_params': kw('JSwindow_params'),
|
|
531
|
+
'keep': kw('keep'),
|
|
532
|
+
'keepEntries': kw('keepEntries'),
|
|
533
|
+
'keepNonMatchedTags': kw('keepNonMatchedTags'),
|
|
534
|
+
'key': kw('key'),
|
|
535
|
+
'keyword3': B,
|
|
536
|
+
'LABEL': A,
|
|
537
|
+
'label': kw('label'),
|
|
538
|
+
'labelStdWrap': kw('labelStdWrap'),
|
|
539
|
+
'labelWrap': kw('labelWrap'),
|
|
540
|
+
'lang': kw('lang'),
|
|
541
|
+
'languageField': kw('languageField'),
|
|
542
|
+
'layout': A,
|
|
543
|
+
'left': kw('left'),
|
|
544
|
+
'leftjoin': kw('leftjoin'),
|
|
545
|
+
'levels': kw('levels'),
|
|
546
|
+
'leveltitle': B,
|
|
547
|
+
'leveluid': kw('leveluid'),
|
|
548
|
+
'lib': A,
|
|
549
|
+
'limit': kw('limit'),
|
|
550
|
+
'line': kw('line'),
|
|
551
|
+
'lineColor': kw('lineColor'),
|
|
552
|
+
'lineThickness': kw('lineThickness'),
|
|
553
|
+
'linkPrefix': kw('linkPrefix'),
|
|
554
|
+
'linkTitleToSelf': kw('linkTitleToSelf'),
|
|
555
|
+
'linkVars': kw('linkVars'),
|
|
556
|
+
'linkWrap': kw('linkWrap'),
|
|
557
|
+
'list': B,
|
|
558
|
+
'listNum': kw('listNum'),
|
|
559
|
+
'listOnlyInSingleTableView': kw('listOnlyInSingleTableView'),
|
|
560
|
+
'LIT': kw('LIT'),
|
|
561
|
+
'lm': kw('lm'),
|
|
562
|
+
'LOAD_REGISTER': kw('LOAD_REGISTER'),
|
|
563
|
+
'locale_all': kw('locale_all'),
|
|
564
|
+
'localNesting': kw('localNesting'),
|
|
565
|
+
'locationData': kw('locationData'),
|
|
566
|
+
'login': B,
|
|
567
|
+
'loginUser': A,
|
|
568
|
+
'lowColor': kw('lowColor'),
|
|
569
|
+
'lower': kw('lower'),
|
|
570
|
+
'LR': kw('LR'),
|
|
571
|
+
'mailform': B,
|
|
572
|
+
'mailto': kw('mailto'),
|
|
573
|
+
'main': kw('main'),
|
|
574
|
+
'makelinks': kw('makelinks'),
|
|
575
|
+
'markerWrap': kw('markerWrap'),
|
|
576
|
+
'marks': A,
|
|
577
|
+
'mask': kw('mask'),
|
|
578
|
+
'max': kw('max'),
|
|
579
|
+
'maxAge': kw('maxAge'),
|
|
580
|
+
'maxChars': kw('maxChars'),
|
|
581
|
+
'maxH': kw('maxH'),
|
|
582
|
+
'maxHeight': kw('maxHeight'),
|
|
583
|
+
'maxItems': kw('maxItems'),
|
|
584
|
+
'maxW': kw('maxW'),
|
|
585
|
+
'maxWidth': kw('maxWidth'),
|
|
586
|
+
'maxWInText': kw('maxWInText'),
|
|
587
|
+
'media': B,
|
|
588
|
+
'menu': B,
|
|
589
|
+
'menuHeight': kw('menuHeight'),
|
|
590
|
+
'menuName': kw('menuName'),
|
|
591
|
+
'menuOffset': kw('menuOffset'),
|
|
592
|
+
'menuWidth': kw('menuWidth'),
|
|
593
|
+
'message_preview': kw('message_preview'),
|
|
594
|
+
'META': kw('META'),
|
|
595
|
+
'meta': kw('meta'),
|
|
596
|
+
'method': kw('method'),
|
|
597
|
+
'min': kw('min'),
|
|
598
|
+
'minH': kw('minH'),
|
|
599
|
+
'minItems': kw('minItems'),
|
|
600
|
+
'minute': A,
|
|
601
|
+
'minW': kw('minW'),
|
|
602
|
+
'mod': B,
|
|
603
|
+
'mode': kw('mode'),
|
|
604
|
+
'module': A,
|
|
605
|
+
'month': A,
|
|
606
|
+
'move_wizard': A,
|
|
607
|
+
'MP_defaults': kw('MP_defaults'),
|
|
608
|
+
'MP_disableTypolinkClosestMPvalue': kw('MP_disableTypolinkClosestMPvalue'),
|
|
609
|
+
'MP_mapRootPoints': kw('MP_mapRootPoints'),
|
|
610
|
+
'MULTIMEDIA': kw('MULTIMEDIA'),
|
|
611
|
+
'multimedia': B,
|
|
612
|
+
'name': kw('name'),
|
|
613
|
+
'negate': B,
|
|
614
|
+
'nesting': kw('nesting'),
|
|
615
|
+
'neverHideAtCopy': kw('neverHideAtCopy'),
|
|
616
|
+
'new': A,
|
|
617
|
+
'NEW': B,
|
|
618
|
+
'new_wizard': A,
|
|
619
|
+
'newPageWiz': kw('newPageWiz'),
|
|
620
|
+
'newRecordFromTable': kw('newRecordFromTable'),
|
|
621
|
+
'newWindow': kw('newWindow'),
|
|
622
|
+
'newWizards': kw('newWizards'),
|
|
623
|
+
'next': kw('next'),
|
|
624
|
+
'niceText': kw('niceText'),
|
|
625
|
+
'nicetext': kw('nicetext'),
|
|
626
|
+
'NO': B,
|
|
627
|
+
'no_cache': kw('no_cache'),
|
|
628
|
+
'no_search': kw('no_search'),
|
|
629
|
+
'noAttrib': kw('noAttrib'),
|
|
630
|
+
'noCache': kw('noCache'),
|
|
631
|
+
'noCreateRecordsLink': kw('noCreateRecordsLink'),
|
|
632
|
+
'noLink': kw('noLink'),
|
|
633
|
+
'noMatchingValue_label': kw('noMatchingValue_label'),
|
|
634
|
+
'nonCachedSubst': kw('nonCachedSubst'),
|
|
635
|
+
'none': B,
|
|
636
|
+
'nonTypoTagStdWrap': kw('nonTypoTagStdWrap'),
|
|
637
|
+
'nonTypoTagUserFunc': kw('nonTypoTagUserFunc'),
|
|
638
|
+
'nonWrappedTag': kw('nonWrappedTag'),
|
|
639
|
+
'noOrderBy': kw('noOrderBy'),
|
|
640
|
+
'noPageTitle': kw('noPageTitle'),
|
|
641
|
+
'noResultObj': A,
|
|
642
|
+
'noThumbsInEB': kw('noThumbsInEB'),
|
|
643
|
+
'noTrimWrap': kw('noTrimWrap'),
|
|
644
|
+
'noValueInsert': kw('noValueInsert'),
|
|
645
|
+
'numRows': A,
|
|
646
|
+
'obj': kw('obj'),
|
|
647
|
+
'offset': kw('offset'),
|
|
648
|
+
'onlineWorkspaceInfo': kw('onlineWorkspaceInfo'),
|
|
649
|
+
'onlyCurrentPid': kw('onlyCurrentPid'),
|
|
650
|
+
'opacity': kw('opacity'),
|
|
651
|
+
'options': A,
|
|
652
|
+
'orderBy': kw('orderBy'),
|
|
653
|
+
'outerWrap': kw('outerWrap'),
|
|
654
|
+
'outline': kw('outline'),
|
|
655
|
+
'outputLevels': kw('outputLevels'),
|
|
656
|
+
'override': kw('override'),
|
|
657
|
+
'overrideAttribs': kw('overrideAttribs'),
|
|
658
|
+
'overrideId': kw('overrideId'),
|
|
659
|
+
'PAGE': kw('PAGE'),
|
|
660
|
+
'page': A,
|
|
661
|
+
'PAGE_TARGET': kw('PAGE_TARGET'),
|
|
662
|
+
'PAGE_TSCONFIG_ID': kw('PAGE_TSCONFIG_ID'),
|
|
663
|
+
'PAGE_TSCONFIG_IDLIST': kw('PAGE_TSCONFIG_IDLIST'),
|
|
664
|
+
'PAGE_TSCONFIG_STR': kw('PAGE_TSCONFIG_STR'),
|
|
665
|
+
'pageFrameObj': kw('pageFrameObj'),
|
|
666
|
+
'pages': B,
|
|
667
|
+
'pageTitleFirst': kw('pageTitleFirst'),
|
|
668
|
+
'pageTree': A,
|
|
669
|
+
'parameter': kw('parameter'),
|
|
670
|
+
'params': kw('params'),
|
|
671
|
+
'parseFunc': kw('parseFunc'),
|
|
672
|
+
'parseFunc_RTE': B,
|
|
673
|
+
'parser': kw('parser'),
|
|
674
|
+
'password': kw('password'),
|
|
675
|
+
'paste': A,
|
|
676
|
+
'path': kw('path'),
|
|
677
|
+
'permissions': kw('permissions'),
|
|
678
|
+
'perms': A,
|
|
679
|
+
'pid': B,
|
|
680
|
+
'pid_list': kw('pid_list'),
|
|
681
|
+
'pidInList': kw('pidInList'),
|
|
682
|
+
'PIDinRootline': A,
|
|
683
|
+
'PIDupinRootline': A,
|
|
684
|
+
'pixelSpaceFontSizeRef': kw('pixelSpaceFontSizeRef'),
|
|
685
|
+
'plaintextLib': kw('plaintextLib'),
|
|
686
|
+
'plainTextStdWrap': kw('plainTextStdWrap'),
|
|
687
|
+
'plugin': A,
|
|
688
|
+
'postCObject': kw('postCObject'),
|
|
689
|
+
'postLineBlanks': kw('postLineBlanks'),
|
|
690
|
+
'postLineChar': kw('postLineChar'),
|
|
691
|
+
'postLineLen': kw('postLineLen'),
|
|
692
|
+
'postUserFunc': kw('postUserFunc'),
|
|
693
|
+
'postUserFuncInt': kw('postUserFuncInt'),
|
|
694
|
+
'preBlanks': kw('preBlanks'),
|
|
695
|
+
'preCObject': kw('preCObject'),
|
|
696
|
+
'prefix': kw('prefix'),
|
|
697
|
+
'prefixComment': kw('prefixComment'),
|
|
698
|
+
'prefixRelPathWith': kw('prefixRelPathWith'),
|
|
699
|
+
'preIfEmptyListNum': kw('preIfEmptyListNum'),
|
|
700
|
+
'preLineBlanks': kw('preLineBlanks'),
|
|
701
|
+
'preLineChar': kw('preLineChar'),
|
|
702
|
+
'preLineLen': kw('preLineLen'),
|
|
703
|
+
'prepend': kw('prepend'),
|
|
704
|
+
'preserveEntities': kw('preserveEntities'),
|
|
705
|
+
'preUserFunc': kw('preUserFunc'),
|
|
706
|
+
'prev': kw('prev'),
|
|
707
|
+
'preview': A,
|
|
708
|
+
'previewBorder': kw('previewBorder'),
|
|
709
|
+
'prevnextToSection': kw('prevnextToSection'),
|
|
710
|
+
'prioriCalc': kw('prioriCalc'),
|
|
711
|
+
'proc': kw('proc'),
|
|
712
|
+
'processor_allowUpscaling': kw('processor_allowUpscaling'),
|
|
713
|
+
'properties': kw('properties'),
|
|
714
|
+
'protect': kw('protect'),
|
|
715
|
+
'protectLvar': kw('protectLvar'),
|
|
716
|
+
'publish': A,
|
|
717
|
+
'publish_levels': kw('publish_levels'),
|
|
718
|
+
'quality': kw('quality'),
|
|
719
|
+
'RADIO': A,
|
|
720
|
+
'radio': kw('radio'),
|
|
721
|
+
'radioWrap': kw('radioWrap'),
|
|
722
|
+
'range': kw('range'),
|
|
723
|
+
'rawUrlEncode': kw('rawUrlEncode'),
|
|
724
|
+
'recipient': kw('recipient'),
|
|
725
|
+
'RECORDS': kw('RECORDS'),
|
|
726
|
+
'recursive': kw('recursive'),
|
|
727
|
+
'redirect': kw('redirect'),
|
|
728
|
+
'redirectToURL': kw('redirectToURL'),
|
|
729
|
+
'references': kw('references'),
|
|
730
|
+
'register': kw('register'),
|
|
731
|
+
'relPathPrefix': kw('relPathPrefix'),
|
|
732
|
+
'remap': kw('remap'),
|
|
733
|
+
'remapTag': kw('remapTag'),
|
|
734
|
+
'REMOTE_ADDR': kw('REMOTE_ADDR'),
|
|
735
|
+
'removeDefaultJS': kw('removeDefaultJS'),
|
|
736
|
+
'removeIfEquals': kw('removeIfEquals'),
|
|
737
|
+
'removeIfFalse': kw('removeIfFalse'),
|
|
738
|
+
'removeItems': kw('removeItems'),
|
|
739
|
+
'removeObjectsOfDummy': kw('removeObjectsOfDummy'),
|
|
740
|
+
'removePrependedNumbers': kw('removePrependedNumbers'),
|
|
741
|
+
'removeTags': kw('removeTags'),
|
|
742
|
+
'removeWrapping': kw('removeWrapping'),
|
|
743
|
+
'renderObj': A,
|
|
744
|
+
'renderWrap': kw('renderWrap'),
|
|
745
|
+
'REQ': A,
|
|
746
|
+
'required': B,
|
|
747
|
+
'reset': kw('reset'),
|
|
748
|
+
'resources': kw('resources'),
|
|
749
|
+
'RESTORE_REGISTER': kw('RESTORE_REGISTER'),
|
|
750
|
+
'resultObj': kw('resultObj'),
|
|
751
|
+
'returnLast': kw('returnLast'),
|
|
752
|
+
'returnUrl': kw('returnUrl'),
|
|
753
|
+
'rightjoin': kw('rightjoin'),
|
|
754
|
+
'rm': kw('rm'),
|
|
755
|
+
'rmTagIfNoAttrib': kw('rmTagIfNoAttrib'),
|
|
756
|
+
'RO': B,
|
|
757
|
+
'rootline': B,
|
|
758
|
+
'rotate': kw('rotate'),
|
|
759
|
+
'rows': kw('rows'),
|
|
760
|
+
'rowSpace': kw('rowSpace'),
|
|
761
|
+
'RTE': A,
|
|
762
|
+
'RTE_compliant': A,
|
|
763
|
+
'rules': kw('rules'),
|
|
764
|
+
'sample': kw('sample'),
|
|
765
|
+
'saveClipboard': kw('saveClipboard'),
|
|
766
|
+
'saveDocNew': kw('saveDocNew'),
|
|
767
|
+
'script': B,
|
|
768
|
+
'search': B,
|
|
769
|
+
'SEARCHRESULT': kw('SEARCHRESULT'),
|
|
770
|
+
'secondRow': kw('secondRow'),
|
|
771
|
+
'section': kw('section'),
|
|
772
|
+
'sectionIndex': kw('sectionIndex'),
|
|
773
|
+
'select': A,
|
|
774
|
+
'selectFields': kw('selectFields'),
|
|
775
|
+
'separator': kw('separator'),
|
|
776
|
+
'set': kw('set'),
|
|
777
|
+
'setContentToCurrent': kw('setContentToCurrent'),
|
|
778
|
+
'setCurrent': kw('setCurrent'),
|
|
779
|
+
'setfixed': kw('setfixed'),
|
|
780
|
+
'setOnly': kw('setOnly'),
|
|
781
|
+
'setup': A,
|
|
782
|
+
'shadow': kw('shadow'),
|
|
783
|
+
'SHARED': kw('SHARED'),
|
|
784
|
+
'sharpen': kw('sharpen'),
|
|
785
|
+
'shear': kw('shear'),
|
|
786
|
+
'short': kw('short'),
|
|
787
|
+
'shortcut': B,
|
|
788
|
+
'shortcutFrame': kw('shortcutFrame'),
|
|
789
|
+
'shortcutIcon': kw('shortcutIcon'),
|
|
790
|
+
'show': kw('show'),
|
|
791
|
+
'showAccessRestrictedPages': kw('showAccessRestrictedPages'),
|
|
792
|
+
'showActive': kw('showActive'),
|
|
793
|
+
'showFirst': kw('showFirst'),
|
|
794
|
+
'showHiddenPages': kw('showHiddenPages'),
|
|
795
|
+
'showHiddenRecords': kw('showHiddenRecords'),
|
|
796
|
+
'showHistory': kw('showHistory'),
|
|
797
|
+
'showPageIdWithTitle': kw('showPageIdWithTitle'),
|
|
798
|
+
'showTagFreeClasses': kw('showTagFreeClasses'),
|
|
799
|
+
'showWebsiteTitle': kw('showWebsiteTitle'),
|
|
800
|
+
'simulateDate': kw('simulateDate'),
|
|
801
|
+
'simulateUserGroup': kw('simulateUserGroup'),
|
|
802
|
+
'singlePid': kw('singlePid'),
|
|
803
|
+
'site_author': kw('site_author'),
|
|
804
|
+
'site_reserved': kw('site_reserved'),
|
|
805
|
+
'sitemap': B,
|
|
806
|
+
'siteUrl': kw('siteUrl'),
|
|
807
|
+
'size': kw('size'),
|
|
808
|
+
'solarize': kw('solarize'),
|
|
809
|
+
'sorting': kw('sorting'),
|
|
810
|
+
'source': kw('source'),
|
|
811
|
+
'space': kw('space'),
|
|
812
|
+
'spaceBelowAbove': kw('spaceBelowAbove'),
|
|
813
|
+
'spaceLeft': kw('spaceLeft'),
|
|
814
|
+
'spaceRight': kw('spaceRight'),
|
|
815
|
+
'spacing': kw('spacing'),
|
|
816
|
+
'spamProtectEmailAddresses': kw('spamProtectEmailAddresses'),
|
|
817
|
+
'spamProtectEmailAddresses_atSubst': kw('spamProtectEmailAddresses_atSubst'),
|
|
818
|
+
'spamProtectEmailAddresses_lastDotSubst': kw('spamProtectEmailAddresses_lastDotSubst'),
|
|
819
|
+
'SPC': B,
|
|
820
|
+
'special': kw('special'),
|
|
821
|
+
'split': A,
|
|
822
|
+
'splitChar': kw('splitChar'),
|
|
823
|
+
'splitRendering': kw('splitRendering'),
|
|
824
|
+
'src': kw('src'),
|
|
825
|
+
'stdWrap': A,
|
|
826
|
+
'stdWrap2': kw('stdWrap2'),
|
|
827
|
+
'strftime': kw('strftime'),
|
|
828
|
+
'stripHtml': kw('stripHtml'),
|
|
829
|
+
'styles': kw('styles'),
|
|
830
|
+
'submenuObjSuffixes': kw('submenuObjSuffixes'),
|
|
831
|
+
'subMenuOffset': kw('subMenuOffset'),
|
|
832
|
+
'submit': kw('submit'),
|
|
833
|
+
'subparts': A,
|
|
834
|
+
'subst_elementUid': kw('subst_elementUid'),
|
|
835
|
+
'substMarksSeparately': kw('substMarksSeparately'),
|
|
836
|
+
'substring': kw('substring'),
|
|
837
|
+
'swirl': kw('swirl'),
|
|
838
|
+
'sys_dmail': B,
|
|
839
|
+
'sys_filemounts': B,
|
|
840
|
+
'sys_note': B,
|
|
841
|
+
'sys_template': B,
|
|
842
|
+
'system': A,
|
|
843
|
+
'table': B,
|
|
844
|
+
'tableCellColor': kw('tableCellColor'),
|
|
845
|
+
'tableParams': kw('tableParams'),
|
|
846
|
+
'tables': kw('tables'),
|
|
847
|
+
'tableStdWrap': kw('tableStdWrap'),
|
|
848
|
+
'tableWidth': kw('tableWidth'),
|
|
849
|
+
'tags': kw('tags'),
|
|
850
|
+
'target': kw('target'),
|
|
851
|
+
'TCAdefaults': kw('TCAdefaults'),
|
|
852
|
+
'TCEFORM': kw('TCEFORM'),
|
|
853
|
+
'TCEMAIN': kw('TCEMAIN'),
|
|
854
|
+
'TDparams': kw('TDparams'),
|
|
855
|
+
'temp': A,
|
|
856
|
+
'template': A,
|
|
857
|
+
'templateContent': kw('templateContent'),
|
|
858
|
+
'templateFile': kw('templateFile'),
|
|
859
|
+
'TEXT': kw('TEXT'),
|
|
860
|
+
'text': B,
|
|
861
|
+
'textarea': kw('textarea'),
|
|
862
|
+
'textMargin': kw('textMargin'),
|
|
863
|
+
'textMargin_outOfText': kw('textMargin_outOfText'),
|
|
864
|
+
'textMaxLength': kw('textMaxLength'),
|
|
865
|
+
'textObjNum': kw('textObjNum'),
|
|
866
|
+
'textpic': B,
|
|
867
|
+
'textPos': kw('textPos'),
|
|
868
|
+
'thickness': kw('thickness'),
|
|
869
|
+
'this': B,
|
|
870
|
+
'tile': kw('tile'),
|
|
871
|
+
'time_stdWrap': kw('time_stdWrap'),
|
|
872
|
+
'tipafriendLib': kw('tipafriendLib'),
|
|
873
|
+
'title': kw('title'),
|
|
874
|
+
'titleLen': kw('titleLen'),
|
|
875
|
+
'titleText': kw('titleText'),
|
|
876
|
+
'tm': kw('tm'),
|
|
877
|
+
'TMENU': kw('TMENU'),
|
|
878
|
+
'TMENUITEM': kw('TMENUITEM'),
|
|
879
|
+
'token': kw('token'),
|
|
880
|
+
'top': B,
|
|
881
|
+
'totalWidth': kw('totalWidth'),
|
|
882
|
+
'transparentBackground': kw('transparentBackground'),
|
|
883
|
+
'transparentColor': kw('transparentColor'),
|
|
884
|
+
'treeLevel': A,
|
|
885
|
+
'trim': kw('trim'),
|
|
886
|
+
'true': B,
|
|
887
|
+
'tsdebug': A,
|
|
888
|
+
'tsdebug_tree': kw('tsdebug_tree'),
|
|
889
|
+
'TSFE': kw('TSFE'),
|
|
890
|
+
'type': kw('type'),
|
|
891
|
+
'typeNum': kw('typeNum'),
|
|
892
|
+
'types': kw('types'),
|
|
893
|
+
'typolink': A,
|
|
894
|
+
'uid': B,
|
|
895
|
+
'uidInList': kw('uidInList'),
|
|
896
|
+
'uniqueGlobal': B,
|
|
897
|
+
'uniqueLocal': B,
|
|
898
|
+
'unset': kw('unset'),
|
|
899
|
+
'unsetEmpty': B,
|
|
900
|
+
'updated': B,
|
|
901
|
+
'uploads': B,
|
|
902
|
+
'upper': kw('upper'),
|
|
903
|
+
'url': A,
|
|
904
|
+
'us': B,
|
|
905
|
+
'useLargestItemX': kw('useLargestItemX'),
|
|
906
|
+
'useLargestItemY': kw('useLargestItemY'),
|
|
907
|
+
'USER': kw('USER'),
|
|
908
|
+
'user': kw('user'),
|
|
909
|
+
'USER_INT': kw('USER_INT'),
|
|
910
|
+
'user_task': B,
|
|
911
|
+
'useragent': A,
|
|
912
|
+
'USERDEF1': B,
|
|
913
|
+
'USERDEF1RO': B,
|
|
914
|
+
'USERDEF2': B,
|
|
915
|
+
'USERDEF2RO': B,
|
|
916
|
+
'userdefined': kw('userdefined'),
|
|
917
|
+
'userFunc': A,
|
|
918
|
+
'userfunction': kw('userfunction'),
|
|
919
|
+
'usergroup': B,
|
|
920
|
+
'userid': kw('userid'),
|
|
921
|
+
'userProc': kw('userProc'),
|
|
922
|
+
'USR': B,
|
|
923
|
+
'USRRO': B,
|
|
924
|
+
'value': kw('value'),
|
|
925
|
+
'valueArray': kw('valueArray'),
|
|
926
|
+
'version': A,
|
|
927
|
+
'view': A,
|
|
928
|
+
'wave': kw('wave'),
|
|
929
|
+
'web_func': B,
|
|
930
|
+
'web_info': B,
|
|
931
|
+
'web_layout': B,
|
|
932
|
+
'web_list': B,
|
|
933
|
+
'web_ts': kw('web_ts'),
|
|
934
|
+
'where': kw('where'),
|
|
935
|
+
'width': kw('width'),
|
|
936
|
+
'wiz': kw('wiz'),
|
|
937
|
+
'wordSpacing': kw('wordSpacing'),
|
|
938
|
+
'workArea': kw('workArea'),
|
|
939
|
+
'workOnSubpart': A,
|
|
940
|
+
'wrap': kw('wrap'),
|
|
941
|
+
'wrap1': kw('wrap1'),
|
|
942
|
+
'wrap2': kw('wrap2'),
|
|
943
|
+
'wrap3': kw('wrap3'),
|
|
944
|
+
'wrapAfterTags': kw('wrapAfterTags'),
|
|
945
|
+
'wrapAlign': kw('wrapAlign'),
|
|
946
|
+
'wrapFieldName': kw('wrapFieldName'),
|
|
947
|
+
'wrapItemAndSub': kw('wrapItemAndSub'),
|
|
948
|
+
'wrapNonWrappedLines': kw('wrapNonWrappedLines'),
|
|
949
|
+
'wraps': kw('wraps'),
|
|
950
|
+
'xhtml_strict': B,
|
|
951
|
+
'xhtml_trans': B,
|
|
952
|
+
'xmlprologue': kw('xmlprologue'),
|
|
953
|
+
'XY': B
|
|
954
|
+
};
|
|
955
|
+
}();
|
|
956
|
+
|
|
957
|
+
// eslint-disable-next-line no-useless-escape
|
|
958
|
+
const isOperatorChar = /[\+\-\*\&\%\/=<>!\?]/;
|
|
959
|
+
let inValue = false;
|
|
960
|
+
|
|
961
|
+
function readRegexp(stream: StringStream) {
|
|
962
|
+
let escaped = false, next, inSet = false;
|
|
963
|
+
while ((next = stream.next()) !== undefined) {
|
|
964
|
+
if (!escaped) {
|
|
965
|
+
if (next === '/' && !inSet) {return;}
|
|
966
|
+
if (next === '[') {inSet = true;}
|
|
967
|
+
else if (inSet && next === ']') {inSet = false;}
|
|
968
|
+
}
|
|
969
|
+
escaped = !escaped && next === '\\';
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
// Used as scratch variables to communicate multiple values without
|
|
974
|
+
// consing up tons of objects.
|
|
975
|
+
let type: string;
|
|
976
|
+
let content: string;
|
|
977
|
+
|
|
978
|
+
function ret(tp: string, style?: string, cont?: string): string | undefined {
|
|
979
|
+
type = tp;
|
|
980
|
+
content = cont;
|
|
981
|
+
return style;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
function tokenBase(stream: StringStream, state: State): string | undefined {
|
|
985
|
+
const ch = stream.next();
|
|
986
|
+
if (typeof ch !== 'string') {
|
|
987
|
+
return undefined;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
if (ch === '\n') {
|
|
991
|
+
inValue = false;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
// eslint-disable-next-line no-useless-escape
|
|
995
|
+
if (ch === '.' && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) {
|
|
996
|
+
return ret('number', 'number');
|
|
997
|
+
}
|
|
998
|
+
if (ch === '.' && stream.match('..')) {
|
|
999
|
+
return ret('spread', 'meta');
|
|
1000
|
+
}
|
|
1001
|
+
// eslint-disable-next-line no-useless-escape
|
|
1002
|
+
if (ch && /[\[\]{}\(\),;\:\.]/.test(ch)) {
|
|
1003
|
+
return ret(ch);
|
|
1004
|
+
}
|
|
1005
|
+
if ((ch === '<' || ch === '>' || ch === '.' || (ch === '=' && stream.peek() !== '<'))) {
|
|
1006
|
+
inValue = true;
|
|
1007
|
+
return ret(ch, 'operator');
|
|
1008
|
+
}
|
|
1009
|
+
// eslint-disable-next-line no-useless-escape
|
|
1010
|
+
if (!inValue && ch && /[\[\]\(\),;\:\.\<\>\=]/.test(ch)) {
|
|
1011
|
+
return ret(ch, 'operator');
|
|
1012
|
+
}
|
|
1013
|
+
if (ch === '0' && stream.eat(/x/i)) {
|
|
1014
|
+
stream.eatWhile(/[\da-f]/i);
|
|
1015
|
+
return ret('number', 'number');
|
|
1016
|
+
}
|
|
1017
|
+
if (ch === '0' && stream.eat(/o/i)) {
|
|
1018
|
+
stream.eatWhile(/[0-7]/i);
|
|
1019
|
+
return ret('number', 'number');
|
|
1020
|
+
}
|
|
1021
|
+
if (ch === '0' && stream.eat(/b/i)) {
|
|
1022
|
+
stream.eatWhile(/[01]/i);
|
|
1023
|
+
return ret('number', 'number');
|
|
1024
|
+
}
|
|
1025
|
+
if (ch && /\d/.test(ch)) {
|
|
1026
|
+
// eslint-disable-next-line no-useless-escape
|
|
1027
|
+
stream.match(/^\d*(?:\.\d+)?(?:[eE][+\-]?\d+)?/);
|
|
1028
|
+
return ret('number', 'number');
|
|
1029
|
+
}
|
|
1030
|
+
if (ch === '/') {
|
|
1031
|
+
if (stream.eat('*')) {
|
|
1032
|
+
state.tokenize = tokenComment;
|
|
1033
|
+
return tokenComment(stream, state);
|
|
1034
|
+
}
|
|
1035
|
+
if (stream.eat('/')) {
|
|
1036
|
+
stream.skipToEnd();
|
|
1037
|
+
return ret('comment', 'comment');
|
|
1038
|
+
}
|
|
1039
|
+
if (expressionAllowed(stream, state)) {
|
|
1040
|
+
readRegexp(stream);
|
|
1041
|
+
stream.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);
|
|
1042
|
+
return ret('regexp', 'string-2');
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
stream.eatWhile(isOperatorChar);
|
|
1046
|
+
return ret('operator', 'operator', stream.current());
|
|
1047
|
+
}
|
|
1048
|
+
if (ch === '#') {
|
|
1049
|
+
stream.skipToEnd();
|
|
1050
|
+
return ret('comment', 'comment');
|
|
1051
|
+
}
|
|
1052
|
+
if (isOperatorChar.test(ch)) {
|
|
1053
|
+
if (ch !== '>' || !state.lexical || state.lexical.type !== '>') {
|
|
1054
|
+
stream.eatWhile(isOperatorChar);
|
|
1055
|
+
}
|
|
1056
|
+
return ret('operator', 'operator', stream.current());
|
|
1057
|
+
}
|
|
1058
|
+
if (wordRE.test(ch)) {
|
|
1059
|
+
stream.eatWhile(wordRE);
|
|
1060
|
+
const word = stream.current();
|
|
1061
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
1062
|
+
if (keywords.propertyIsEnumerable(word)) {
|
|
1063
|
+
const kw = keywords[word];
|
|
1064
|
+
return ret(kw.type, kw.style, word);
|
|
1065
|
+
}
|
|
1066
|
+
if (inValue) {
|
|
1067
|
+
return ret('string', 'string', word);
|
|
1068
|
+
}
|
|
1069
|
+
return ret('variable', undefined, word);
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
return undefined;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
function tokenComment(stream: StringStream, state: State) {
|
|
1076
|
+
let maybeEnd = false, ch;
|
|
1077
|
+
while ((ch = stream.next()) !== undefined) {
|
|
1078
|
+
if (ch === '/' && maybeEnd) {
|
|
1079
|
+
state.tokenize = tokenBase;
|
|
1080
|
+
break;
|
|
1081
|
+
}
|
|
1082
|
+
maybeEnd = (ch === '*');
|
|
1083
|
+
}
|
|
1084
|
+
return ret('comment', 'comment');
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
// Parser
|
|
1088
|
+
|
|
1089
|
+
const atomicTypes = {
|
|
1090
|
+
'atom': true,
|
|
1091
|
+
'number': true,
|
|
1092
|
+
'variable': true,
|
|
1093
|
+
'string': true,
|
|
1094
|
+
'regexp': true
|
|
1095
|
+
};
|
|
1096
|
+
|
|
1097
|
+
function inScope(state: State, varname: string): CombinatorReturnType {
|
|
1098
|
+
for (let v = state.localVars; v; v = v.next) {
|
|
1099
|
+
if (v.name == varname) {
|
|
1100
|
+
return true;
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
for (let cx = state.context; cx; cx = cx.prev) {
|
|
1104
|
+
for (let v = cx.vars; v; v = v.next) {
|
|
1105
|
+
if (v.name == varname) {
|
|
1106
|
+
return true;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
return undefined;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
const cx: CX = {
|
|
1115
|
+
state: null,
|
|
1116
|
+
column: null,
|
|
1117
|
+
marked: null,
|
|
1118
|
+
cc: null
|
|
1119
|
+
};
|
|
1120
|
+
|
|
1121
|
+
function parseTS(state: State, style: string, type: Type, content: string, stream: StringStream): string {
|
|
1122
|
+
const cc = state.cc;
|
|
1123
|
+
// Communicate our context to the combinators.
|
|
1124
|
+
// (Less wasteful than consing up a hundred closures on every call.)
|
|
1125
|
+
cx.state = state;
|
|
1126
|
+
cx.stream = stream;
|
|
1127
|
+
cx.marked = null;
|
|
1128
|
+
cx.cc = cc;
|
|
1129
|
+
cx.style = style;
|
|
1130
|
+
|
|
1131
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
1132
|
+
if (!state.lexical.hasOwnProperty('align')) {
|
|
1133
|
+
state.lexical.align = true;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
while (true) {
|
|
1137
|
+
const combinator = cc.length ? cc.pop() : statement;
|
|
1138
|
+
if (typeof combinator === 'function' && combinator(type, content)) {
|
|
1139
|
+
while (cc.length && cc[cc.length - 1] && (cc[cc.length - 1] as CombinatorLexFunction).lex) {
|
|
1140
|
+
cc.pop()();
|
|
1141
|
+
}
|
|
1142
|
+
if (cx.marked) {
|
|
1143
|
+
return cx.marked;
|
|
1144
|
+
}
|
|
1145
|
+
if (type === 'variable' && inScope(state, content)) {
|
|
1146
|
+
return 'variable-2';
|
|
1147
|
+
}
|
|
1148
|
+
return style;
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
// Combinator utils
|
|
1154
|
+
|
|
1155
|
+
function pass(...args: CC[]): undefined {
|
|
1156
|
+
for (let i = args.length - 1; i >= 0; i--) {
|
|
1157
|
+
cx.cc.push(args[i]);
|
|
1158
|
+
}
|
|
1159
|
+
return undefined;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
function cont(...args: CC[]): CombinatorReturnType {
|
|
1163
|
+
pass(...args);
|
|
1164
|
+
return true;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
function register(varname: string): void {
|
|
1168
|
+
function inList(list: LocalVars): boolean {
|
|
1169
|
+
for (let v = list; v; v = v.next) {
|
|
1170
|
+
if (v.name == varname) {
|
|
1171
|
+
return true;
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
return false;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
const state = cx.state;
|
|
1178
|
+
cx.marked = 'def';
|
|
1179
|
+
if (state.context) {
|
|
1180
|
+
if (inList(state.localVars)) {
|
|
1181
|
+
return;
|
|
1182
|
+
}
|
|
1183
|
+
state.localVars = { name: varname, next: state.localVars };
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
// Combinators
|
|
1188
|
+
|
|
1189
|
+
function pushlex(type: Type, info?: number | string): CombinatorLexFunction {
|
|
1190
|
+
const result: CombinatorLexFunction = function(): CombinatorReturnType {
|
|
1191
|
+
const state = cx.state;
|
|
1192
|
+
let indent = state.indented;
|
|
1193
|
+
if (state.lexical.type === 'stat') {
|
|
1194
|
+
indent = state.lexical.indented;
|
|
1195
|
+
} else {
|
|
1196
|
+
for (let outer = state.lexical; outer && outer.type === ')' && outer.align; outer = outer.prev) {
|
|
1197
|
+
indent = outer.indented;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
state.lexical = new TSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
|
|
1201
|
+
return undefined;
|
|
1202
|
+
};
|
|
1203
|
+
result.lex = true;
|
|
1204
|
+
return result;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
function poplex(): CombinatorReturnType {
|
|
1208
|
+
const state = cx.state;
|
|
1209
|
+
if (state.lexical.prev) {
|
|
1210
|
+
if (state.lexical.type === ')') {
|
|
1211
|
+
state.indented = state.lexical.indented;
|
|
1212
|
+
}
|
|
1213
|
+
state.lexical = state.lexical.prev;
|
|
1214
|
+
}
|
|
1215
|
+
return undefined;
|
|
1216
|
+
}
|
|
1217
|
+
poplex.lex = true;
|
|
1218
|
+
|
|
1219
|
+
function expect(wanted: Type): CombinatorFunction {
|
|
1220
|
+
function exp(type: Type): CombinatorReturnType {
|
|
1221
|
+
if (type == wanted) {
|
|
1222
|
+
return cont();
|
|
1223
|
+
} else if (wanted === ';') {
|
|
1224
|
+
return pass();
|
|
1225
|
+
} else {
|
|
1226
|
+
return cont(exp);
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
return exp;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
function statement(type: Type, value: Value): CombinatorReturnType {
|
|
1233
|
+
if (type === 'keyword a') {
|
|
1234
|
+
return cont(pushlex('form'), parenExpr, statement, poplex);
|
|
1235
|
+
}
|
|
1236
|
+
if (type === 'keyword b') {
|
|
1237
|
+
return cont(pushlex('form'), statement, poplex);
|
|
1238
|
+
}
|
|
1239
|
+
if (type === '{') {
|
|
1240
|
+
return cont(pushlex('}'), block, poplex);
|
|
1241
|
+
}
|
|
1242
|
+
if (type === ';') {
|
|
1243
|
+
return cont();
|
|
1244
|
+
}
|
|
1245
|
+
if (type === 'variable') {
|
|
1246
|
+
return cont(pushlex('stat'), maybelabel);
|
|
1247
|
+
}
|
|
1248
|
+
if (type === 'import') {
|
|
1249
|
+
return cont(pushlex('stat'), afterImport, poplex);
|
|
1250
|
+
}
|
|
1251
|
+
if (value === '@') {
|
|
1252
|
+
return cont(expression, statement);
|
|
1253
|
+
}
|
|
1254
|
+
return pass(pushlex('stat'), expression, expect(';'), poplex);
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
function expression(type: Type): CombinatorReturnType {
|
|
1258
|
+
return expressionInner(type, false);
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
function expressionNoComma(type: Type): CombinatorReturnType {
|
|
1262
|
+
return expressionInner(type, true);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
function parenExpr(type: Type): CombinatorReturnType {
|
|
1266
|
+
if (type !== '(') {
|
|
1267
|
+
return pass();
|
|
1268
|
+
}
|
|
1269
|
+
return cont(pushlex(')'), expression, expect(')'), poplex);
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
function expressionInner(type: Type, noComma: boolean) {
|
|
1273
|
+
const maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
|
|
1274
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
1275
|
+
if (atomicTypes.hasOwnProperty(type)) {
|
|
1276
|
+
return cont(maybeop);
|
|
1277
|
+
}
|
|
1278
|
+
if (type === 'keyword c') {
|
|
1279
|
+
return cont(noComma ? maybeexpressionNoComma : maybeexpression);
|
|
1280
|
+
}
|
|
1281
|
+
if (type === '(') {
|
|
1282
|
+
return cont(pushlex(')'), maybeexpression, expect(')'), poplex, maybeop);
|
|
1283
|
+
}
|
|
1284
|
+
if (type === 'operator') {
|
|
1285
|
+
return cont(noComma ? expressionNoComma : expression);
|
|
1286
|
+
}
|
|
1287
|
+
if (type === '{') {
|
|
1288
|
+
return contCommasep(objprop, '}', null, maybeop);
|
|
1289
|
+
}
|
|
1290
|
+
return cont();
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
function maybeexpression(type: Type): CombinatorReturnType {
|
|
1294
|
+
// eslint-disable-next-line no-useless-escape
|
|
1295
|
+
if (type.match(/[;\}\)\],]/)) {
|
|
1296
|
+
return pass();
|
|
1297
|
+
}
|
|
1298
|
+
return pass(expression);
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
function maybeexpressionNoComma(type: Type): CombinatorReturnType {
|
|
1302
|
+
// eslint-disable-next-line no-useless-escape
|
|
1303
|
+
if (type.match(/[;\}\)\],]/)) {return pass();}
|
|
1304
|
+
return pass(expressionNoComma);
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
function maybeoperatorComma(type: Type, value: Value): CombinatorReturnType {
|
|
1308
|
+
if (type === ',') {return cont(expression);}
|
|
1309
|
+
return maybeoperatorNoComma(type, value, false);
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
function maybeoperatorNoComma(type: Type, value: Value, noComma?: boolean): CombinatorReturnType {
|
|
1313
|
+
const me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
|
|
1314
|
+
const expr = noComma == false ? expression : expressionNoComma;
|
|
1315
|
+
if (type === 'operator') {
|
|
1316
|
+
if (/\+\+|--/.test(value)) {return cont(me);}
|
|
1317
|
+
if (value === '?') {return cont(expression, expect(':'), expr);}
|
|
1318
|
+
return cont(expr);
|
|
1319
|
+
}
|
|
1320
|
+
if (type === ';') {
|
|
1321
|
+
return undefined;
|
|
1322
|
+
}
|
|
1323
|
+
if (type === '(') {
|
|
1324
|
+
return contCommasep(expressionNoComma, ')', 'call', me);
|
|
1325
|
+
}
|
|
1326
|
+
if (type === '.') {
|
|
1327
|
+
return cont(property, me);
|
|
1328
|
+
}
|
|
1329
|
+
if (type === '[') {
|
|
1330
|
+
return cont(pushlex(']'), maybeexpression, expect(']'), poplex, me);
|
|
1331
|
+
}
|
|
1332
|
+
return undefined;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
function maybelabel(type: Type): CombinatorReturnType {
|
|
1336
|
+
if (type === ':') {
|
|
1337
|
+
return cont(poplex, statement);
|
|
1338
|
+
}
|
|
1339
|
+
return pass(maybeoperatorComma, expect(';'), poplex);
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
function property(type: Type): CombinatorReturnType {
|
|
1343
|
+
if (type === 'variable') {
|
|
1344
|
+
cx.marked = 'property';
|
|
1345
|
+
return cont();
|
|
1346
|
+
}
|
|
1347
|
+
return undefined;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
function objprop(type: Type): CombinatorReturnType {
|
|
1351
|
+
if (type === 'async') {
|
|
1352
|
+
cx.marked = 'property';
|
|
1353
|
+
return cont(objprop);
|
|
1354
|
+
} else if (type === 'variable' || cx.style === 'keyword') {
|
|
1355
|
+
cx.marked = 'property';
|
|
1356
|
+
return cont(afterprop);
|
|
1357
|
+
} else if (type === 'number' || type === 'string') {
|
|
1358
|
+
cx.marked = cx.style + ' property';
|
|
1359
|
+
return cont(afterprop);
|
|
1360
|
+
} else if (type === 'modifier') {
|
|
1361
|
+
return cont(objprop);
|
|
1362
|
+
} else if (type === ':') {
|
|
1363
|
+
return pass(afterprop);
|
|
1364
|
+
}
|
|
1365
|
+
return undefined;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
function afterprop(type: Type): CombinatorReturnType {
|
|
1369
|
+
if (type === ':') {
|
|
1370
|
+
return cont(expressionNoComma);
|
|
1371
|
+
}
|
|
1372
|
+
return undefined;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
function commasep(what: CC, end: Type, sep?: string): CombinatorFunction {
|
|
1376
|
+
function proceed(type: Type, value: Value): CombinatorReturnType {
|
|
1377
|
+
if (sep ? sep.indexOf(type) > -1 : type === ',') {
|
|
1378
|
+
const lex = cx.state.lexical;
|
|
1379
|
+
if (lex.info === 'call') {
|
|
1380
|
+
lex.pos = (lex.pos || 0) + 1;
|
|
1381
|
+
}
|
|
1382
|
+
return cont(
|
|
1383
|
+
function(type: Type, value: Value): CombinatorReturnType {
|
|
1384
|
+
if (type == end || value == end) {
|
|
1385
|
+
return pass();
|
|
1386
|
+
}
|
|
1387
|
+
return pass(what);
|
|
1388
|
+
},
|
|
1389
|
+
proceed
|
|
1390
|
+
);
|
|
1391
|
+
}
|
|
1392
|
+
if (type == end || value == end) {
|
|
1393
|
+
return cont();
|
|
1394
|
+
}
|
|
1395
|
+
return cont(expect(end));
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
return function(type, value): CombinatorReturnType {
|
|
1399
|
+
if (type == end || value == end) {
|
|
1400
|
+
return cont();
|
|
1401
|
+
}
|
|
1402
|
+
return pass(what, proceed);
|
|
1403
|
+
};
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
function contCommasep(what: CC, end: Type, info?: string, ...rest: CC[]): CombinatorReturnType {
|
|
1407
|
+
for (const combinator of rest) {
|
|
1408
|
+
cx.cc.push(combinator);
|
|
1409
|
+
}
|
|
1410
|
+
return cont(pushlex(end, info), commasep(what, end), poplex);
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
function block(type: Type): CombinatorReturnType {
|
|
1414
|
+
if (type === '}') {
|
|
1415
|
+
return cont();
|
|
1416
|
+
}
|
|
1417
|
+
return pass(statement, block);
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
function pattern(type: Type, value: Value): CombinatorReturnType {
|
|
1421
|
+
if (type === 'modifier') {
|
|
1422
|
+
return cont(pattern);
|
|
1423
|
+
}
|
|
1424
|
+
if (type === 'variable') {
|
|
1425
|
+
register(value);
|
|
1426
|
+
return cont();
|
|
1427
|
+
}
|
|
1428
|
+
if (type === '{') {
|
|
1429
|
+
return contCommasep(proppattern, '}');
|
|
1430
|
+
}
|
|
1431
|
+
return undefined;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
function proppattern(type: Type, value: Value): CombinatorReturnType {
|
|
1435
|
+
if (type === 'variable' && !cx.stream.match(/^\s*:/, false)) {
|
|
1436
|
+
register(value);
|
|
1437
|
+
return cont(maybeAssign);
|
|
1438
|
+
}
|
|
1439
|
+
if (type === 'variable') {
|
|
1440
|
+
cx.marked = 'property';
|
|
1441
|
+
}
|
|
1442
|
+
if (type === '}') {
|
|
1443
|
+
return pass();
|
|
1444
|
+
}
|
|
1445
|
+
return cont(expect(':'), pattern, maybeAssign);
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
function maybeAssign(_type: Type, value: Value): CombinatorReturnType {
|
|
1449
|
+
if (value === '=') {
|
|
1450
|
+
return cont(expressionNoComma);
|
|
1451
|
+
}
|
|
1452
|
+
return undefined;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
function afterImport(type: Type): CombinatorReturnType {
|
|
1457
|
+
if (type === 'string') {
|
|
1458
|
+
return cont();
|
|
1459
|
+
}
|
|
1460
|
+
return pass(importSpec, maybeMoreImports, maybeFrom);
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
function importSpec(type: Type, value: Value): CombinatorReturnType {
|
|
1464
|
+
if (type === '{') {
|
|
1465
|
+
return contCommasep(importSpec, '}');
|
|
1466
|
+
}
|
|
1467
|
+
if (type === 'variable') {
|
|
1468
|
+
register(value);
|
|
1469
|
+
}
|
|
1470
|
+
if (value === '*') {
|
|
1471
|
+
cx.marked = 'keyword';
|
|
1472
|
+
}
|
|
1473
|
+
return cont(maybeAs);
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
function maybeMoreImports(type: Type): CombinatorReturnType {
|
|
1477
|
+
if (type === ',') {
|
|
1478
|
+
return cont(importSpec, maybeMoreImports);
|
|
1479
|
+
}
|
|
1480
|
+
return undefined;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
function maybeAs(_type: Value, value: Value): CombinatorReturnType {
|
|
1484
|
+
if (value === 'as') {
|
|
1485
|
+
cx.marked = 'keyword';
|
|
1486
|
+
return cont(importSpec);
|
|
1487
|
+
}
|
|
1488
|
+
return undefined;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
function maybeFrom(_type: Type, value: Value): CombinatorReturnType {
|
|
1492
|
+
if (value === 'from') {
|
|
1493
|
+
cx.marked = 'keyword';
|
|
1494
|
+
return cont(expression);
|
|
1495
|
+
}
|
|
1496
|
+
return undefined;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
function isContinuedStatement(state: State, textAfter: string): CombinatorReturnType {
|
|
1500
|
+
return state.lastType === 'operator' || state.lastType === ',' ||
|
|
1501
|
+
isOperatorChar.test(textAfter.charAt(0)) ||
|
|
1502
|
+
/[,.]/.test(textAfter.charAt(0));
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
// Interface
|
|
1506
|
+
|
|
1507
|
+
class TypoScriptStreamParser implements StreamParser<State> {
|
|
1508
|
+
public readonly electricInput: RegExp = /^\s*(?:case .*?:|default:|\{|\})$/;
|
|
1509
|
+
public readonly blockCommentStart: string = '/*';
|
|
1510
|
+
public readonly blockCommentEnd: string = '*/';
|
|
1511
|
+
public readonly lineComment: string = '#';
|
|
1512
|
+
public readonly fold: string = 'brace';
|
|
1513
|
+
public readonly closeBrackets: string = '(){}\'\'""`';
|
|
1514
|
+
public readonly helperType: string = 'typoscript';
|
|
1515
|
+
|
|
1516
|
+
public readonly name: string = 'TypoScript';
|
|
1517
|
+
|
|
1518
|
+
public startState(indentUnit: number): State {
|
|
1519
|
+
return {
|
|
1520
|
+
tokenize: tokenBase,
|
|
1521
|
+
lastType: 'sof',
|
|
1522
|
+
cc: [],
|
|
1523
|
+
lexical: new TSLexical(-indentUnit, 0, 'block', false),
|
|
1524
|
+
localVars: parserConfig.localVars,
|
|
1525
|
+
context: parserConfig.localVars && { vars: parserConfig.localVars },
|
|
1526
|
+
indented: 0
|
|
1527
|
+
};
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
public token(stream: StringStream, state: State): string | null {
|
|
1531
|
+
if (stream.sol()) {
|
|
1532
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
1533
|
+
if (!state.lexical.hasOwnProperty('align')) {
|
|
1534
|
+
state.lexical.align = false;
|
|
1535
|
+
}
|
|
1536
|
+
state.indented = stream.indentation();
|
|
1537
|
+
}
|
|
1538
|
+
if (state.tokenize != tokenComment && stream.eatSpace()) {
|
|
1539
|
+
return null;
|
|
1540
|
+
}
|
|
1541
|
+
const style = state.tokenize(stream, state);
|
|
1542
|
+
if (type === 'comment') {
|
|
1543
|
+
return style;
|
|
1544
|
+
}
|
|
1545
|
+
state.lastType = type === 'operator' && (content === '++' || content === '--') ? 'incdec' : type;
|
|
1546
|
+
return parseTS(state, style, type, content, stream);
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
public indent(state: State, textAfter: string, cx: IndentContext): number | null {
|
|
1550
|
+
if (state.tokenize == tokenComment) {
|
|
1551
|
+
// pass
|
|
1552
|
+
return null;
|
|
1553
|
+
}
|
|
1554
|
+
if (state.tokenize != tokenBase) {
|
|
1555
|
+
return 0;
|
|
1556
|
+
}
|
|
1557
|
+
const firstChar = textAfter && textAfter.charAt(0);
|
|
1558
|
+
let lexical = state.lexical;
|
|
1559
|
+
let top;
|
|
1560
|
+
while (
|
|
1561
|
+
(lexical.type === 'stat' || lexical.type === 'form') && (
|
|
1562
|
+
firstChar === '}' || (
|
|
1563
|
+
(top = state.cc[state.cc.length - 1]) &&
|
|
1564
|
+
(top == maybeoperatorComma || top == maybeoperatorNoComma) &&
|
|
1565
|
+
// eslint-disable-next-line no-useless-escape
|
|
1566
|
+
!/^[,\.=+\-*:?[\(]/.test(textAfter)
|
|
1567
|
+
)
|
|
1568
|
+
)
|
|
1569
|
+
) {
|
|
1570
|
+
lexical = lexical.prev;
|
|
1571
|
+
}
|
|
1572
|
+
if (statementIndent && lexical.type === ')' && lexical.prev.type === 'stat') {
|
|
1573
|
+
lexical = lexical.prev;
|
|
1574
|
+
}
|
|
1575
|
+
const type = lexical.type;
|
|
1576
|
+
const closing = firstChar == type;
|
|
1577
|
+
|
|
1578
|
+
if (type === 'form' && firstChar === '{') {
|
|
1579
|
+
return lexical.indented;
|
|
1580
|
+
} else if (type === 'form') {
|
|
1581
|
+
return lexical.indented + cx.unit;
|
|
1582
|
+
} else if (type === 'stat') {
|
|
1583
|
+
return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || cx.unit : 0);
|
|
1584
|
+
} else if (lexical.info === 'switch' && !closing && parserConfig.doubleIndentSwitch != false) {
|
|
1585
|
+
return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? cx.unit : 2 * cx.unit);
|
|
1586
|
+
} else if (lexical.align) {
|
|
1587
|
+
return lexical.column + (closing ? 0 : 1);
|
|
1588
|
+
} else {
|
|
1589
|
+
return lexical.indented + (closing ? 0 : cx.unit);
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
public expressionAllowed(stream: StringStream, state: State): boolean {
|
|
1594
|
+
return expressionAllowed(stream, state);
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
return new TypoScriptStreamParser();
|
|
1599
|
+
}
|
|
1600
|
+
}
|