@hyperfixi/core 3.3.0 → 4.0.1
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/README.md +57 -179
- package/dist/ast-utils/index.cjs +74 -806
- package/dist/ast-utils/index.d.ts +1 -1
- package/dist/ast-utils/index.mjs +74 -805
- package/dist/ast-utils/interchange/engine-positions.d.ts +3 -0
- package/dist/ast-utils/interchange/index.d.ts +1 -2
- package/dist/hyperfixi.js +19 -2
- package/dist/index.d.ts +2 -22
- package/dist/index.mjs +3 -29128
- package/dist/lsp-metadata.cjs +77 -73
- package/dist/lsp-metadata.d.ts +4 -4
- package/dist/lsp-metadata.mjs +77 -73
- package/dist/metadata.cjs +34 -266
- package/dist/metadata.d.ts +31 -26
- package/dist/metadata.mjs +34 -266
- package/dist/multilingual/index.cjs +16 -382
- package/dist/multilingual/index.d.ts +4 -32
- package/dist/multilingual/index.mjs +15 -377
- package/dist/reference/index.cjs +67 -216
- package/dist/reference/index.d.ts +0 -3
- package/dist/reference/index.mjs +68 -216
- package/dist/version.d.ts +1 -1
- package/package.json +13 -179
- package/dist/__test-utils__/context-builders.d.ts +0 -42
- package/dist/__test-utils__/error-testing.d.ts +0 -18
- package/dist/__test-utils__/index.d.ts +0 -6
- package/dist/__test-utils__/mock-types.d.ts +0 -57
- package/dist/__test-utils__/parser-context-mock.d.ts +0 -7
- package/dist/__test-utils__/parser-helpers.d.ts +0 -38
- package/dist/api/hyperscript-api.d.ts +0 -90
- package/dist/api/lokascript-api.d.ts +0 -9
- package/dist/ast/command-slots.d.ts +0 -140
- package/dist/ast/guards.d.ts +0 -15
- package/dist/ast/legacy.d.ts +0 -15
- package/dist/ast/nodes.d.ts +0 -243
- package/dist/ast-utils/interchange/from-core.d.ts +0 -12
- package/dist/ast-utils/interchange/to-core.d.ts +0 -8
- package/dist/behaviors/boosted.d.ts +0 -29
- package/dist/behaviors/history-swap.d.ts +0 -24
- package/dist/behaviors/index.cjs +0 -1155
- package/dist/behaviors/index.d.ts +0 -4
- package/dist/behaviors/index.mjs +0 -1145
- package/dist/bundle-generator/executor-core.d.ts +0 -4
- package/dist/bundle-generator/generator.d.ts +0 -4
- package/dist/bundle-generator/index.cjs +0 -2804
- package/dist/bundle-generator/index.d.ts +0 -6
- package/dist/bundle-generator/index.mjs +0 -2779
- package/dist/bundle-generator/parser-templates.d.ts +0 -6
- package/dist/bundle-generator/template-capabilities.d.ts +0 -12
- package/dist/bundle-generator/templates.d.ts +0 -12
- package/dist/bundle-generator/types.d.ts +0 -34
- package/dist/chunks/bridge-CI9SOl8u.js +0 -2
- package/dist/chunks/browser-modular-7CpI5VF2.js +0 -2
- package/dist/chunks/index-BwXDEK0m.js +0 -2
- package/dist/chunks/index-DQi2o8Lk.js +0 -2
- package/dist/chunks/index-uCOQ8Qn0.js +0 -2
- package/dist/commands/advanced/js.d.ts +0 -40
- package/dist/commands/animation/measure.d.ts +0 -43
- package/dist/commands/animation/settle.d.ts +0 -38
- package/dist/commands/animation/start-view-transition.d.ts +0 -38
- package/dist/commands/animation/take.d.ts +0 -41
- package/dist/commands/animation/transition.d.ts +0 -49
- package/dist/commands/async/fetch.d.ts +0 -61
- package/dist/commands/async/wait.d.ts +0 -51
- package/dist/commands/behaviors/install.d.ts +0 -40
- package/dist/commands/content/append.d.ts +0 -26
- package/dist/commands/content/insertion-base.d.ts +0 -60
- package/dist/commands/content/prepend.d.ts +0 -26
- package/dist/commands/control-flow/break.d.ts +0 -29
- package/dist/commands/control-flow/continue.d.ts +0 -29
- package/dist/commands/control-flow/exit.d.ts +0 -29
- package/dist/commands/control-flow/halt.d.ts +0 -39
- package/dist/commands/control-flow/if.d.ts +0 -58
- package/dist/commands/control-flow/repeat.d.ts +0 -50
- package/dist/commands/control-flow/return.d.ts +0 -33
- package/dist/commands/control-flow/signal-base.d.ts +0 -18
- package/dist/commands/control-flow/throw.d.ts +0 -34
- package/dist/commands/control-flow/unless.d.ts +0 -3
- package/dist/commands/data/clear.d.ts +0 -37
- package/dist/commands/data/decrement.d.ts +0 -3
- package/dist/commands/data/default.d.ts +0 -60
- package/dist/commands/data/get.d.ts +0 -35
- package/dist/commands/data/increment.d.ts +0 -42
- package/dist/commands/data/set.d.ts +0 -76
- package/dist/commands/decorators/index.d.ts +0 -14
- package/dist/commands/dom/add.d.ts +0 -44
- package/dist/commands/dom/close.d.ts +0 -32
- package/dist/commands/dom/dom-modification-base.d.ts +0 -48
- package/dist/commands/dom/empty.d.ts +0 -32
- package/dist/commands/dom/hide.d.ts +0 -28
- package/dist/commands/dom/make.d.ts +0 -34
- package/dist/commands/dom/open.d.ts +0 -34
- package/dist/commands/dom/process-partials.d.ts +0 -51
- package/dist/commands/dom/put.d.ts +0 -42
- package/dist/commands/dom/remove.d.ts +0 -46
- package/dist/commands/dom/reset.d.ts +0 -32
- package/dist/commands/dom/select.d.ts +0 -32
- package/dist/commands/dom/show.d.ts +0 -29
- package/dist/commands/dom/swap.d.ts +0 -65
- package/dist/commands/dom/toggle.d.ts +0 -69
- package/dist/commands/dom/visibility-base.d.ts +0 -22
- package/dist/commands/events/send.d.ts +0 -3
- package/dist/commands/events/trigger.d.ts +0 -49
- package/dist/commands/execution/blur.d.ts +0 -32
- package/dist/commands/execution/call.d.ts +0 -35
- package/dist/commands/execution/focus.d.ts +0 -32
- package/dist/commands/execution/pseudo-command.d.ts +0 -41
- package/dist/commands/helpers/attribute-manipulation.d.ts +0 -11
- package/dist/commands/helpers/attribute-target.d.ts +0 -9
- package/dist/commands/helpers/batch-dom-operations.d.ts +0 -12
- package/dist/commands/helpers/body-ops.d.ts +0 -10
- package/dist/commands/helpers/class-manipulation.d.ts +0 -11
- package/dist/commands/helpers/condition-helpers.d.ts +0 -4
- package/dist/commands/helpers/dom-mutation.d.ts +0 -16
- package/dist/commands/helpers/duration-parsing.d.ts +0 -8
- package/dist/commands/helpers/element-property-access.d.ts +0 -7
- package/dist/commands/helpers/element-resolution.d.ts +0 -16
- package/dist/commands/helpers/error-helpers.d.ts +0 -17
- package/dist/commands/helpers/event-helpers.d.ts +0 -13
- package/dist/commands/helpers/event-waiting.d.ts +0 -37
- package/dist/commands/helpers/index.d.ts +0 -32
- package/dist/commands/helpers/input-validator.d.ts +0 -23
- package/dist/commands/helpers/loop-executor.d.ts +0 -56
- package/dist/commands/helpers/numeric-target-parser.d.ts +0 -21
- package/dist/commands/helpers/property-target.d.ts +0 -20
- package/dist/commands/helpers/selector-type-detection.d.ts +0 -24
- package/dist/commands/helpers/slots.d.ts +0 -5
- package/dist/commands/helpers/smart-element.d.ts +0 -16
- package/dist/commands/helpers/style-manipulation.d.ts +0 -16
- package/dist/commands/helpers/target-elements.d.ts +0 -5
- package/dist/commands/helpers/temporal-modifiers.d.ts +0 -15
- package/dist/commands/helpers/url-argument-parser.d.ts +0 -13
- package/dist/commands/helpers/url-validation.d.ts +0 -7
- package/dist/commands/helpers/variable-access.d.ts +0 -13
- package/dist/commands/helpers/visibility-target-parser.d.ts +0 -15
- package/dist/commands/helpers/write-target.d.ts +0 -42
- package/dist/commands/index.cjs +0 -24168
- package/dist/commands/index.d.ts +0 -171
- package/dist/commands/index.mjs +0 -23981
- package/dist/commands/manifest.d.ts +0 -17
- package/dist/commands/navigation/go.d.ts +0 -58
- package/dist/commands/navigation/push-url.d.ts +0 -48
- package/dist/commands/navigation/replace-url.d.ts +0 -3
- package/dist/commands/navigation/scroll-to.d.ts +0 -43
- package/dist/commands/templates/render.d.ts +0 -47
- package/dist/commands/utility/beep.d.ts +0 -41
- package/dist/commands/utility/breakpoint.d.ts +0 -32
- package/dist/commands/utility/copy.d.ts +0 -41
- package/dist/commands/utility/log.d.ts +0 -36
- package/dist/commands/utility/pick.d.ts +0 -47
- package/dist/commands/utility/tell.d.ts +0 -39
- package/dist/compatibility/browser-bundle-classic.d.ts +0 -17
- package/dist/compatibility/browser-bundle-hybrid-complete.d.ts +0 -22
- package/dist/compatibility/browser-bundle-hybrid-hx.d.ts +0 -43
- package/dist/compatibility/browser-bundle-lite.d.ts +0 -15
- package/dist/compatibility/browser-bundle-modular.d.ts +0 -18
- package/dist/compatibility/browser-bundle-multilingual.d.ts +0 -19
- package/dist/compatibility/browser-bundle-semantic-complete.d.ts +0 -24
- package/dist/compatibility/browser-bundle-textshelf-minimal.d.ts +0 -16
- package/dist/compatibility/browser-bundle-textshelf-profile.d.ts +0 -18
- package/dist/compatibility/browser-modular.d.ts +0 -42
- package/dist/compatibility/browser-tests/helpers/semantic-page.d.ts +0 -3
- package/dist/compatibility/browser-tests/test-utils.d.ts +0 -21
- package/dist/compatibility/bundle-shell.d.ts +0 -13
- package/dist/compatibility/bundle-sources.d.ts +0 -4
- package/dist/compatibility/eval-hyperscript.d.ts +0 -16
- package/dist/compatibility/hyperscript-adapter.d.ts +0 -38
- package/dist/core/ast-property-utils.d.ts +0 -2
- package/dist/core/context.d.ts +0 -19
- package/dist/core/dom.d.ts +0 -15
- package/dist/core/evaluator-types.d.ts +0 -5
- package/dist/core/events.d.ts +0 -48
- package/dist/core/executor.d.ts +0 -34
- package/dist/core/expression-evaluator.d.ts +0 -6
- package/dist/core/expression-registry.d.ts +0 -8
- package/dist/core/scope-hooks.d.ts +0 -24
- package/dist/debug/debug-controller.d.ts +0 -62
- package/dist/debug/index.d.ts +0 -5
- package/dist/dom/attribute-processor.d.ts +0 -75
- package/dist/dom/detect-language.d.ts +0 -3
- package/dist/dom/minimal-attribute-processor.d.ts +0 -20
- package/dist/expressions/base-expression.d.ts +0 -27
- package/dist/expressions/bundles/common-expressions.d.ts +0 -10
- package/dist/expressions/bundles/core-expressions.d.ts +0 -8
- package/dist/expressions/bundles/full-expressions.d.ts +0 -11
- package/dist/expressions/bundles/index.d.ts +0 -7
- package/dist/expressions/collection/index.d.ts +0 -10
- package/dist/expressions/conversion/index.d.ts +0 -31
- package/dist/expressions/expression-tiers.d.ts +0 -13
- package/dist/expressions/index.cjs +0 -4331
- package/dist/expressions/index.d.ts +0 -13
- package/dist/expressions/index.mjs +0 -4312
- package/dist/expressions/logical/index.d.ts +0 -61
- package/dist/expressions/mathematical/index.d.ts +0 -80
- package/dist/expressions/positional/index.d.ts +0 -31
- package/dist/expressions/properties/index.d.ts +0 -27
- package/dist/expressions/property-access-utils.d.ts +0 -23
- package/dist/expressions/references/index.d.ts +0 -39
- package/dist/expressions/shared/comparison-utils.d.ts +0 -10
- package/dist/expressions/shared/index.d.ts +0 -10
- package/dist/expressions/shared/number-utils.d.ts +0 -8
- package/dist/expressions/shared/tracking.d.ts +0 -20
- package/dist/expressions/shared/validation-utils.d.ts +0 -13
- package/dist/expressions/special/index.d.ts +0 -78
- package/dist/expressions/type-helpers.d.ts +0 -11
- package/dist/expressions/type-registry.d.ts +0 -57
- package/dist/expressions/validation-helpers.d.ts +0 -15
- package/dist/htmx/hcon.d.ts +0 -9
- package/dist/htmx/htmx-attribute-processor.d.ts +0 -120
- package/dist/htmx/htmx-translator.d.ts +0 -22
- package/dist/htmx/i18n-hooks.d.ts +0 -18
- package/dist/htmx/i18n-orchestrator.d.ts +0 -16
- package/dist/htmx/index.d.ts +0 -3
- package/dist/htmx/lang-resolver.d.ts +0 -3
- package/dist/htmx/sse.d.ts +0 -60
- package/dist/htmx/ws.d.ts +0 -59
- package/dist/hyperfixi-browser-classic-i18n.js +0 -2
- package/dist/hyperfixi-browser.js +0 -2
- package/dist/hyperfixi-classic-i18n.js +0 -2
- package/dist/hyperfixi-hx-v4.js +0 -1
- package/dist/hyperfixi-hx.js +0 -1
- package/dist/hyperfixi-hybrid-complete.js +0 -1
- package/dist/hyperfixi-hybrid-hx.js +0 -1
- package/dist/hyperfixi-multilingual.js +0 -2
- package/dist/hyperfixi.mjs +0 -2
- package/dist/i18n/error-catalog.d.ts +0 -12
- package/dist/index.cjs +0 -29159
- package/dist/index.min.js +0 -2
- package/dist/lib/dom-globals-shim.d.ts +0 -2
- package/dist/lib/index.d.ts +0 -4
- package/dist/lib/morph-adapter.d.ts +0 -9
- package/dist/lib/swap-executor.d.ts +0 -12
- package/dist/lib/view-transitions.d.ts +0 -7
- package/dist/lokascript-browser-classic-i18n.js +0 -2
- package/dist/lokascript-browser.js +0 -2
- package/dist/lokascript-hybrid-complete.js +0 -1
- package/dist/lokascript-hybrid-hx.js +0 -1
- package/dist/lokascript-multilingual.js +0 -2
- package/dist/lse/index.cjs +0 -84
- package/dist/lse/index.d.ts +0 -15
- package/dist/lse/index.mjs +0 -71
- package/dist/multilingual/bridge.d.ts +0 -38
- package/dist/multilingual/schema-roles.d.ts +0 -3
- package/dist/parser/__types__/test-helpers.d.ts +0 -25
- package/dist/parser/command-grammar.d.ts +0 -14
- package/dist/parser/command-node-builder.d.ts +0 -46
- package/dist/parser/command-parsers/animation-commands.d.ts +0 -6
- package/dist/parser/command-parsers/async-commands.d.ts +0 -5
- package/dist/parser/command-parsers/control-flow-commands.d.ts +0 -7
- package/dist/parser/command-parsers/declared-commands.d.ts +0 -6
- package/dist/parser/command-parsers/dom-commands.d.ts +0 -11
- package/dist/parser/command-parsers/event-commands.d.ts +0 -4
- package/dist/parser/command-parsers/navigation-commands.d.ts +0 -6
- package/dist/parser/command-parsers/utility-commands.d.ts +0 -14
- package/dist/parser/command-parsers/variable-commands.d.ts +0 -12
- package/dist/parser/error-handler.d.ts +0 -34
- package/dist/parser/extensions.d.ts +0 -43
- package/dist/parser/full-parser.cjs +0 -7943
- package/dist/parser/full-parser.d.ts +0 -4
- package/dist/parser/full-parser.mjs +0 -7940
- package/dist/parser/helpers/ast-helpers.d.ts +0 -24
- package/dist/parser/helpers/parsing-helpers.d.ts +0 -19
- package/dist/parser/helpers/token-helpers.d.ts +0 -28
- package/dist/parser/hybrid/aliases.cjs +0 -44
- package/dist/parser/hybrid/aliases.d.ts +0 -7
- package/dist/parser/hybrid/aliases.mjs +0 -37
- package/dist/parser/hybrid/ast-types.cjs +0 -3
- package/dist/parser/hybrid/ast-types.d.ts +0 -97
- package/dist/parser/hybrid/ast-types.mjs +0 -2
- package/dist/parser/hybrid/index.cjs +0 -1185
- package/dist/parser/hybrid/index.d.ts +0 -6
- package/dist/parser/hybrid/index.mjs +0 -1175
- package/dist/parser/hybrid/parser-core.cjs +0 -1171
- package/dist/parser/hybrid/parser-core.d.ts +0 -69
- package/dist/parser/hybrid/parser-core.mjs +0 -1169
- package/dist/parser/hybrid/tokenizer.cjs +0 -255
- package/dist/parser/hybrid/tokenizer.d.ts +0 -9
- package/dist/parser/hybrid/tokenizer.mjs +0 -252
- package/dist/parser/hybrid-parser.cjs +0 -1249
- package/dist/parser/hybrid-parser.d.ts +0 -10
- package/dist/parser/hybrid-parser.mjs +0 -1242
- package/dist/parser/parser-constants.d.ts +0 -100
- package/dist/parser/parser-interface.d.ts +0 -12
- package/dist/parser/parser-types.d.ts +0 -164
- package/dist/parser/parser.d.ts +0 -165
- package/dist/parser/pratt-parser.d.ts +0 -41
- package/dist/parser/regex-parser.cjs +0 -422
- package/dist/parser/regex-parser.d.ts +0 -4
- package/dist/parser/regex-parser.mjs +0 -419
- package/dist/parser/runtime.d.ts +0 -14
- package/dist/parser/semantic-integration.d.ts +0 -17
- package/dist/parser/token-consumer.d.ts +0 -34
- package/dist/parser/token-predicates.d.ts +0 -77
- package/dist/parser/tokenizer.d.ts +0 -28
- package/dist/parser/types.d.ts +0 -105
- package/dist/performance/expression-cache.d.ts +0 -78
- package/dist/performance/integration.d.ts +0 -40
- package/dist/performance/production-monitor.d.ts +0 -67
- package/dist/registry/browser-types.cjs +0 -81
- package/dist/registry/browser-types.d.ts +0 -20
- package/dist/registry/browser-types.mjs +0 -76
- package/dist/registry/environment.cjs +0 -36
- package/dist/registry/environment.d.ts +0 -19
- package/dist/registry/environment.mjs +0 -30
- package/dist/registry/event-source-registry.d.ts +0 -54
- package/dist/registry/examples/server-commands.d.ts +0 -6
- package/dist/registry/examples/server-event-source.d.ts +0 -32
- package/dist/registry/index.cjs +0 -14055
- package/dist/registry/index.d.ts +0 -39
- package/dist/registry/index.mjs +0 -14039
- package/dist/registry/runtime-integration.d.ts +0 -23
- package/dist/registry/universal-types.cjs +0 -91
- package/dist/registry/universal-types.d.ts +0 -35
- package/dist/registry/universal-types.mjs +0 -86
- package/dist/runtime/cleanup-registry.d.ts +0 -47
- package/dist/runtime/command-adapter.d.ts +0 -69
- package/dist/runtime/environment.d.ts +0 -75
- package/dist/runtime/plugin.d.ts +0 -14
- package/dist/runtime/runtime-base.d.ts +0 -100
- package/dist/runtime/runtime-factory.d.ts +0 -29
- package/dist/runtime/runtime.d.ts +0 -20
- package/dist/runtime/temporal-modifiers.d.ts +0 -37
- package/dist/test-setup.d.ts +0 -28
- package/dist/test-utilities.d.ts +0 -39
- package/dist/types/base-types.d.ts +0 -231
- package/dist/types/code-fix.d.ts +0 -39
- package/dist/types/command-metadata.d.ts +0 -57
- package/dist/types/command-types.d.ts +0 -262
- package/dist/types/context-types.d.ts +0 -106
- package/dist/types/core-context.d.ts +0 -22
- package/dist/types/core.d.ts +0 -143
- package/dist/types/error-codes.d.ts +0 -207
- package/dist/types/expression-types.d.ts +0 -155
- package/dist/types/hooks.d.ts +0 -45
- package/dist/types/index.d.ts +0 -32
- package/dist/types/program.d.ts +0 -8
- package/dist/types/result.d.ts +0 -73
- package/dist/types/template-types.d.ts +0 -162
- package/dist/types/type-guards.d.ts +0 -24
- package/dist/types/unified-types.d.ts +0 -91
- package/dist/utils/beep.d.ts +0 -8
- package/dist/utils/debug-events.d.ts +0 -41
- package/dist/utils/debug.d.ts +0 -35
- package/dist/utils/dom-utils.d.ts +0 -16
- package/dist/utils/element-check.d.ts +0 -8
- package/dist/utils/keyboard-shortcuts.d.ts +0 -18
- package/dist/utils/performance.d.ts +0 -40
- package/dist/validation/command-pattern-validator.d.ts +0 -53
- package/dist/validation/common-validators.d.ts +0 -24
- package/dist/validation/lightweight-validators.d.ts +0 -113
- package/dist/validation/partial-validation-types.d.ts +0 -50
- package/dist/validation/partial-validator.d.ts +0 -6
- package/dist/validation/partial-warning-formatter.d.ts +0 -6
- package/dist/validation/validate-cli.d.ts +0 -41
- package/vocab/htmx/ar.js +0 -62
- package/vocab/htmx/bn.js +0 -65
- package/vocab/htmx/de.js +0 -83
- package/vocab/htmx/en.js +0 -24
- package/vocab/htmx/es.js +0 -79
- package/vocab/htmx/fr.js +0 -79
- package/vocab/htmx/he.js +0 -61
- package/vocab/htmx/hi.js +0 -81
- package/vocab/htmx/id.js +0 -76
- package/vocab/htmx/it.js +0 -79
- package/vocab/htmx/ja.js +0 -85
- package/vocab/htmx/ko.js +0 -81
- package/vocab/htmx/ms.js +0 -58
- package/vocab/htmx/pl.js +0 -80
- package/vocab/htmx/pt.js +0 -81
- package/vocab/htmx/qu.js +0 -83
- package/vocab/htmx/ru.js +0 -82
- package/vocab/htmx/sw.js +0 -79
- package/vocab/htmx/th.js +0 -67
- package/vocab/htmx/tl.js +0 -56
- package/vocab/htmx/tr.js +0 -86
- package/vocab/htmx/uk.js +0 -82
- package/vocab/htmx/vi.js +0 -59
- package/vocab/htmx/zh.js +0 -79
package/dist/lse/index.cjs
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
let _fw = null;
|
|
4
|
-
async function getFramework() {
|
|
5
|
-
if (!_fw) {
|
|
6
|
-
try {
|
|
7
|
-
_fw = await import('@lokascript/framework');
|
|
8
|
-
}
|
|
9
|
-
catch {
|
|
10
|
-
throw new Error('@lokascript/framework is required for LSE support. ' +
|
|
11
|
-
'Install it: npm install @lokascript/framework');
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return _fw;
|
|
15
|
-
}
|
|
16
|
-
function isLSEAvailable() {
|
|
17
|
-
if (_fw)
|
|
18
|
-
return true;
|
|
19
|
-
try {
|
|
20
|
-
require.resolve('@lokascript/framework');
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
async function parseExplicit(input, options) {
|
|
28
|
-
const fw = await getFramework();
|
|
29
|
-
return fw.parseExplicit(input, options);
|
|
30
|
-
}
|
|
31
|
-
async function isExplicitSyntax(input) {
|
|
32
|
-
const fw = await getFramework();
|
|
33
|
-
return fw.isExplicitSyntax(input);
|
|
34
|
-
}
|
|
35
|
-
async function renderExplicit(node) {
|
|
36
|
-
const fw = await getFramework();
|
|
37
|
-
return fw.renderExplicit(node);
|
|
38
|
-
}
|
|
39
|
-
async function fromInterchangeNode(node) {
|
|
40
|
-
const fw = await getFramework();
|
|
41
|
-
return fw.fromInterchangeNode(node);
|
|
42
|
-
}
|
|
43
|
-
async function toProtocolJSON(node) {
|
|
44
|
-
const fw = await getFramework();
|
|
45
|
-
return fw.toProtocolJSON(node);
|
|
46
|
-
}
|
|
47
|
-
async function fromProtocolJSON(json) {
|
|
48
|
-
const fw = await getFramework();
|
|
49
|
-
return fw.fromProtocolJSON(json);
|
|
50
|
-
}
|
|
51
|
-
async function validateProtocolJSON(json) {
|
|
52
|
-
const fw = await getFramework();
|
|
53
|
-
return fw.validateProtocolJSON(json);
|
|
54
|
-
}
|
|
55
|
-
async function toEnvelopeJSON(envelope) {
|
|
56
|
-
const fw = await getFramework();
|
|
57
|
-
return fw.toEnvelopeJSON(envelope);
|
|
58
|
-
}
|
|
59
|
-
async function fromEnvelopeJSON(json) {
|
|
60
|
-
const fw = await getFramework();
|
|
61
|
-
return fw.fromEnvelopeJSON(json);
|
|
62
|
-
}
|
|
63
|
-
async function isEnvelope(json) {
|
|
64
|
-
const fw = await getFramework();
|
|
65
|
-
return fw.isEnvelope(json);
|
|
66
|
-
}
|
|
67
|
-
async function semanticNodeToRuntimeAST(node) {
|
|
68
|
-
const fw = await getFramework();
|
|
69
|
-
return fw.semanticNodeToRuntimeAST(node);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
exports.fromEnvelopeJSON = fromEnvelopeJSON;
|
|
73
|
-
exports.fromInterchangeNode = fromInterchangeNode;
|
|
74
|
-
exports.fromProtocolJSON = fromProtocolJSON;
|
|
75
|
-
exports.isEnvelope = isEnvelope;
|
|
76
|
-
exports.isExplicitSyntax = isExplicitSyntax;
|
|
77
|
-
exports.isLSEAvailable = isLSEAvailable;
|
|
78
|
-
exports.parseExplicit = parseExplicit;
|
|
79
|
-
exports.renderExplicit = renderExplicit;
|
|
80
|
-
exports.semanticNodeToRuntimeAST = semanticNodeToRuntimeAST;
|
|
81
|
-
exports.toEnvelopeJSON = toEnvelopeJSON;
|
|
82
|
-
exports.toProtocolJSON = toProtocolJSON;
|
|
83
|
-
exports.validateProtocolJSON = validateProtocolJSON;
|
|
84
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/lse/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type { SemanticNode, CommandSemanticNode, EventHandlerSemanticNode, ConditionalSemanticNode, CompoundSemanticNode, LoopSemanticNode, SemanticValue, LiteralValue, SelectorValue, ReferenceValue, PropertyPathValue, ExpressionValue, FlagValue, SemanticMetadata, ActionType, SemanticRoleType, Annotation, ProtocolDiagnostic, LSEEnvelope, Diagnostic, DiagnosticSeverity, DiagnosticResult, } from '@lokascript/framework';
|
|
2
|
-
export type { SemanticJSON, SchemaLookup, ParseExplicitOptions, IRDiagnostic, ProtocolNodeJSON, ProtocolValueJSON, ProtocolDiagnosticJSON, AnnotationJSON, MatchArmJSON, LSEEnvelopeJSON, RuntimeASTNode, RuntimeCommandNode, RuntimeEventNode, } from '@lokascript/framework';
|
|
3
|
-
export declare function isLSEAvailable(): boolean;
|
|
4
|
-
export declare function parseExplicit(input: string, options?: import('@lokascript/framework').ParseExplicitOptions): Promise<import("@lokascript/intent").SemanticNode>;
|
|
5
|
-
export declare function isExplicitSyntax(input: string): Promise<boolean>;
|
|
6
|
-
export declare function renderExplicit(node: import('@lokascript/framework').SemanticNode): Promise<string>;
|
|
7
|
-
export declare function fromInterchangeNode(node: unknown): Promise<import("@lokascript/intent").SemanticNode>;
|
|
8
|
-
export declare function toProtocolJSON(node: import('@lokascript/framework').SemanticNode): Promise<import("@lokascript/intent").ProtocolNodeJSON>;
|
|
9
|
-
export declare function fromProtocolJSON(json: import('@lokascript/framework').ProtocolNodeJSON): Promise<import("@lokascript/intent").SemanticNode>;
|
|
10
|
-
export declare function validateProtocolJSON(json: unknown): Promise<import("@lokascript/intent").IRDiagnostic[]>;
|
|
11
|
-
export declare function toEnvelopeJSON(envelope: import('@lokascript/framework').LSEEnvelope): Promise<import("@lokascript/intent").LSEEnvelopeJSON>;
|
|
12
|
-
export declare function fromEnvelopeJSON(json: import('@lokascript/framework').LSEEnvelopeJSON): Promise<import("@lokascript/intent").LSEEnvelope>;
|
|
13
|
-
export declare function isEnvelope(json: unknown): Promise<boolean>;
|
|
14
|
-
export declare function semanticNodeToRuntimeAST(node: import('@lokascript/framework').SemanticNode): Promise<import("@lokascript/framework").RuntimeASTNode>;
|
|
15
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/lse/index.mjs
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
let _fw = null;
|
|
2
|
-
async function getFramework() {
|
|
3
|
-
if (!_fw) {
|
|
4
|
-
try {
|
|
5
|
-
_fw = await import('@lokascript/framework');
|
|
6
|
-
}
|
|
7
|
-
catch {
|
|
8
|
-
throw new Error('@lokascript/framework is required for LSE support. ' +
|
|
9
|
-
'Install it: npm install @lokascript/framework');
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return _fw;
|
|
13
|
-
}
|
|
14
|
-
function isLSEAvailable() {
|
|
15
|
-
if (_fw)
|
|
16
|
-
return true;
|
|
17
|
-
try {
|
|
18
|
-
require.resolve('@lokascript/framework');
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
catch {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
async function parseExplicit(input, options) {
|
|
26
|
-
const fw = await getFramework();
|
|
27
|
-
return fw.parseExplicit(input, options);
|
|
28
|
-
}
|
|
29
|
-
async function isExplicitSyntax(input) {
|
|
30
|
-
const fw = await getFramework();
|
|
31
|
-
return fw.isExplicitSyntax(input);
|
|
32
|
-
}
|
|
33
|
-
async function renderExplicit(node) {
|
|
34
|
-
const fw = await getFramework();
|
|
35
|
-
return fw.renderExplicit(node);
|
|
36
|
-
}
|
|
37
|
-
async function fromInterchangeNode(node) {
|
|
38
|
-
const fw = await getFramework();
|
|
39
|
-
return fw.fromInterchangeNode(node);
|
|
40
|
-
}
|
|
41
|
-
async function toProtocolJSON(node) {
|
|
42
|
-
const fw = await getFramework();
|
|
43
|
-
return fw.toProtocolJSON(node);
|
|
44
|
-
}
|
|
45
|
-
async function fromProtocolJSON(json) {
|
|
46
|
-
const fw = await getFramework();
|
|
47
|
-
return fw.fromProtocolJSON(json);
|
|
48
|
-
}
|
|
49
|
-
async function validateProtocolJSON(json) {
|
|
50
|
-
const fw = await getFramework();
|
|
51
|
-
return fw.validateProtocolJSON(json);
|
|
52
|
-
}
|
|
53
|
-
async function toEnvelopeJSON(envelope) {
|
|
54
|
-
const fw = await getFramework();
|
|
55
|
-
return fw.toEnvelopeJSON(envelope);
|
|
56
|
-
}
|
|
57
|
-
async function fromEnvelopeJSON(json) {
|
|
58
|
-
const fw = await getFramework();
|
|
59
|
-
return fw.fromEnvelopeJSON(json);
|
|
60
|
-
}
|
|
61
|
-
async function isEnvelope(json) {
|
|
62
|
-
const fw = await getFramework();
|
|
63
|
-
return fw.isEnvelope(json);
|
|
64
|
-
}
|
|
65
|
-
async function semanticNodeToRuntimeAST(node) {
|
|
66
|
-
const fw = await getFramework();
|
|
67
|
-
return fw.semanticNodeToRuntimeAST(node);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export { fromEnvelopeJSON, fromInterchangeNode, fromProtocolJSON, isEnvelope, isExplicitSyntax, isLSEAvailable, parseExplicit, renderExplicit, semanticNodeToRuntimeAST, toEnvelopeJSON, toProtocolJSON, validateProtocolJSON };
|
|
71
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { SemanticNode, ASTNode } from '@lokascript/semantic';
|
|
2
|
-
import type { FrontEnd } from '../parser/semantic-integration';
|
|
3
|
-
export interface BridgeConfig {
|
|
4
|
-
confidenceThreshold?: number;
|
|
5
|
-
fallbackOnLowConfidence?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface BridgeResult {
|
|
8
|
-
output: string;
|
|
9
|
-
usedSemantic: boolean;
|
|
10
|
-
confidence: number;
|
|
11
|
-
sourceLang: string;
|
|
12
|
-
targetLang: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ParseToASTResult {
|
|
15
|
-
ast: ASTNode | null;
|
|
16
|
-
usedDirectPath: boolean;
|
|
17
|
-
confidence: number;
|
|
18
|
-
lang: string;
|
|
19
|
-
fallbackText: string | null;
|
|
20
|
-
warnings?: string[];
|
|
21
|
-
}
|
|
22
|
-
export declare class SemanticGrammarBridge {
|
|
23
|
-
private _initialized;
|
|
24
|
-
private config;
|
|
25
|
-
constructor(config?: BridgeConfig);
|
|
26
|
-
initialize(): Promise<void>;
|
|
27
|
-
isInitialized(): boolean;
|
|
28
|
-
transform(input: string, sourceLang: string, targetLang: string): Promise<BridgeResult>;
|
|
29
|
-
parse(input: string, lang: string): Promise<SemanticNode | null>;
|
|
30
|
-
render(node: SemanticNode, targetLang: string): Promise<string>;
|
|
31
|
-
parseToAST(input: string, lang: string): Promise<ASTNode | null>;
|
|
32
|
-
parseToASTWithDetails(input: string, lang: string): Promise<ParseToASTResult>;
|
|
33
|
-
getAllTranslations(input: string, sourceLang: string): Promise<Record<string, BridgeResult>>;
|
|
34
|
-
}
|
|
35
|
-
export declare function createBridgeFrontEnd(bridge: SemanticGrammarBridge): FrontEnd;
|
|
36
|
-
export declare function getDefaultBridge(): Promise<SemanticGrammarBridge>;
|
|
37
|
-
export declare function translate(input: string, sourceLang: string, targetLang: string): Promise<string>;
|
|
38
|
-
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { CommandNode, ASTNode, Token } from '../types';
|
|
2
|
-
import type { ParserContext } from '../parser-types';
|
|
3
|
-
export interface ParsedStatementResult {
|
|
4
|
-
node: CommandNode;
|
|
5
|
-
tokens: Token[];
|
|
6
|
-
context?: ParserContext;
|
|
7
|
-
metadata?: ParsingMetadata;
|
|
8
|
-
}
|
|
9
|
-
export interface ParsingMetadata {
|
|
10
|
-
duration?: number;
|
|
11
|
-
warnings?: string[];
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
}
|
|
14
|
-
export interface ASTNodeAssertable extends CommandNode {
|
|
15
|
-
name: string;
|
|
16
|
-
type: 'Command';
|
|
17
|
-
children?: CommandNode[];
|
|
18
|
-
arguments: ASTNode[];
|
|
19
|
-
target?: ASTNode;
|
|
20
|
-
}
|
|
21
|
-
export declare function isCommandNode(node: unknown): node is CommandNode;
|
|
22
|
-
export declare function assertCommandNode(node: unknown): asserts node is CommandNode;
|
|
23
|
-
export declare function getNodeProperty<T = unknown>(node: unknown, property: string): T | undefined;
|
|
24
|
-
export declare function assertNodeHasProperty<T = unknown>(node: unknown, property: string): asserts node is Record<string, T>;
|
|
25
|
-
//# sourceMappingURL=test-helpers.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export type PositionalRule = 'none' | 'expression' | 'primary';
|
|
2
|
-
export interface CommandGrammar {
|
|
3
|
-
readonly positional: PositionalRule;
|
|
4
|
-
readonly markers: readonly string[];
|
|
5
|
-
readonly commaList?: readonly string[];
|
|
6
|
-
readonly namedArgs?: readonly string[];
|
|
7
|
-
readonly continuation?: readonly string[];
|
|
8
|
-
readonly syntax: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const DEDICATED_PARSER_COMMANDS: ReadonlySet<string>;
|
|
11
|
-
export declare const COMMAND_GRAMMAR: Readonly<Record<string, CommandGrammar>>;
|
|
12
|
-
export declare const PLUGIN_COMMAND_GRAMMAR: CommandGrammar;
|
|
13
|
-
export declare function grammarOf(commandName: string): CommandGrammar | null;
|
|
14
|
-
//# sourceMappingURL=command-grammar.d.ts.map
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { Token, CommandNode, ExpressionNode, ASTNode, StatementNode } from '../types/core';
|
|
2
|
-
import type { SlotKey, SlotMap, SlottedCommandName } from '../ast/command-slots';
|
|
3
|
-
export declare class CommandNodeBuilder<K extends SlottedCommandName = SlottedCommandName> {
|
|
4
|
-
private name;
|
|
5
|
-
private args;
|
|
6
|
-
private body?;
|
|
7
|
-
private implicitTarget?;
|
|
8
|
-
private isBlocking;
|
|
9
|
-
private modifiers?;
|
|
10
|
-
private originalCmd?;
|
|
11
|
-
private startPos?;
|
|
12
|
-
private endPos?;
|
|
13
|
-
private constructor();
|
|
14
|
-
static from<K extends SlottedCommandName = SlottedCommandName>(token: Token): CommandNodeBuilder<K>;
|
|
15
|
-
static fromIdentifier<K extends SlottedCommandName = SlottedCommandName>(node: {
|
|
16
|
-
name: string;
|
|
17
|
-
start?: number;
|
|
18
|
-
end?: number;
|
|
19
|
-
line?: number;
|
|
20
|
-
column?: number;
|
|
21
|
-
}): CommandNodeBuilder<K>;
|
|
22
|
-
static named<K extends SlottedCommandName = SlottedCommandName>(name: string): CommandNodeBuilder<K>;
|
|
23
|
-
withArgs(...args: ASTNode[]): this;
|
|
24
|
-
withBody(body: StatementNode[]): this;
|
|
25
|
-
withImplicitTarget(target: ExpressionNode): this;
|
|
26
|
-
withModifier(key: SlotKey<K>, value: ExpressionNode): this;
|
|
27
|
-
withModifiers(modifiers: SlotMap<K>): this;
|
|
28
|
-
withName(name: string): this;
|
|
29
|
-
withOriginalCommand(name: string): this;
|
|
30
|
-
blocking(value?: boolean): this;
|
|
31
|
-
startingAt(source: Token | {
|
|
32
|
-
start?: number;
|
|
33
|
-
end?: number;
|
|
34
|
-
line?: number;
|
|
35
|
-
column?: number;
|
|
36
|
-
}): this;
|
|
37
|
-
endingAt(position: {
|
|
38
|
-
start?: number;
|
|
39
|
-
end: number;
|
|
40
|
-
line?: number;
|
|
41
|
-
column?: number;
|
|
42
|
-
}): this;
|
|
43
|
-
build(): CommandNode;
|
|
44
|
-
clone(): CommandNodeBuilder;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=command-node-builder.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ParserContext, IdentifierNode } from '../parser-types';
|
|
2
|
-
import type { Token } from '../../types/core';
|
|
3
|
-
export declare function parseMeasureCommand(ctx: ParserContext, identifierNode: IdentifierNode): import("../..").CommandNode;
|
|
4
|
-
export declare function parseTransitionCommand(ctx: ParserContext, commandToken: Token): import("../..").CommandNode;
|
|
5
|
-
export declare function parseStartCommand(ctx: ParserContext, identifierNode: IdentifierNode): import('../../types/core').CommandNode;
|
|
6
|
-
//# sourceMappingURL=animation-commands.d.ts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ParserContext } from '../parser-types';
|
|
2
|
-
import type { Token } from '../../types/core';
|
|
3
|
-
export declare function parseWaitCommand(ctx: ParserContext, commandToken: Token): import("../..").CommandNode;
|
|
4
|
-
export declare function parseInstallCommand(ctx: ParserContext, commandToken: Token): import("../..").CommandNode;
|
|
5
|
-
//# sourceMappingURL=async-commands.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ParserContext, IdentifierNode } from '../parser-types';
|
|
2
|
-
import type { CommandNode, Token } from '../../types/core';
|
|
3
|
-
export declare function parseHaltCommand(ctx: ParserContext, identifierNode: IdentifierNode): CommandNode | null;
|
|
4
|
-
export declare function parseRepeatCommand(ctx: ParserContext, commandToken: Token): CommandNode;
|
|
5
|
-
export declare function parseIfCommand(ctx: ParserContext, commandToken: Token): CommandNode;
|
|
6
|
-
export declare function parseForCommand(ctx: ParserContext, commandToken: Token): CommandNode;
|
|
7
|
-
//# sourceMappingURL=control-flow-commands.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ASTNode } from '../../types/base-types';
|
|
2
|
-
import type { ParserContext } from '../parser-types';
|
|
3
|
-
import type { Token } from '../../types/core';
|
|
4
|
-
import type { CommandGrammar } from '../command-grammar';
|
|
5
|
-
export declare function parseDeclaredCommand(ctx: ParserContext, commandToken: Token, name: string, grammar: CommandGrammar): ASTNode;
|
|
6
|
-
//# sourceMappingURL=declared-commands.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ParserContext, IdentifierNode } from '../parser-types';
|
|
2
|
-
import type { Token } from '../../types/core';
|
|
3
|
-
export declare function parseRemoveCommand(ctx: ParserContext, identifierNode: IdentifierNode): import("../..").CommandNode;
|
|
4
|
-
export declare function parseToggleCommand(ctx: ParserContext, identifierNode: IdentifierNode): import("../..").CommandNode;
|
|
5
|
-
export declare function parseTakeCommand(ctx: ParserContext, identifierNode: IdentifierNode): import("../..").CommandNode;
|
|
6
|
-
export declare function parseProcessCommand(ctx: ParserContext, identifierNode: IdentifierNode): import("../..").CommandNode | null;
|
|
7
|
-
export declare function parseAddCommand(ctx: ParserContext, commandToken: Token): import("../..").CommandNode;
|
|
8
|
-
export declare function parsePutCommand(ctx: ParserContext, identifierNode: IdentifierNode): import("../..").CommandNode | null;
|
|
9
|
-
export declare function parseSwapCommand(ctx: ParserContext, identifierNode: IdentifierNode): import("../..").CommandNode;
|
|
10
|
-
export declare function parseShowHideCommand(ctx: ParserContext, identifierNode: IdentifierNode): import("../..").CommandNode;
|
|
11
|
-
//# sourceMappingURL=dom-commands.d.ts.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ParserContext, IdentifierNode } from '../parser-types';
|
|
2
|
-
import type { CommandNode } from '../../types/core';
|
|
3
|
-
export declare function parseTriggerCommand(ctx: ParserContext, identifierNode: IdentifierNode): CommandNode | null;
|
|
4
|
-
//# sourceMappingURL=event-commands.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ParserContext, IdentifierNode } from '../parser-types';
|
|
2
|
-
import type { CommandNode } from '../../types/core';
|
|
3
|
-
export declare function parseGoCommand(ctx: ParserContext, identifierNode: IdentifierNode): CommandNode | null;
|
|
4
|
-
export declare function parseScrollCommand(ctx: ParserContext, identifierNode: IdentifierNode): CommandNode | null;
|
|
5
|
-
export declare function parsePushCommand(ctx: ParserContext, identifierNode: IdentifierNode): CommandNode;
|
|
6
|
-
//# sourceMappingURL=navigation-commands.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ParserContext, IdentifierNode } from '../parser-types';
|
|
2
|
-
import type { ASTNode, Token, CommandNode } from '../../types/core';
|
|
3
|
-
type DedicatedCommandParser = (ctx: ParserContext, identifierNode: IdentifierNode) => CommandNode | null;
|
|
4
|
-
export declare const COMPOUND_COMMAND_PARSERS: ReadonlyMap<string, DedicatedCommandParser>;
|
|
5
|
-
export declare const COMPOUND_COMMAND_NAMES: ReadonlySet<string>;
|
|
6
|
-
export declare function parseCompoundCommand(ctx: ParserContext, identifierNode: IdentifierNode): CommandNode | null;
|
|
7
|
-
export declare function isNakedURLStart(ctx: ParserContext): boolean;
|
|
8
|
-
export declare function parseBareURLPath(ctx: ParserContext): ASTNode | null;
|
|
9
|
-
export declare function parseFetchCommand(ctx: ParserContext, commandToken: Token): CommandNode;
|
|
10
|
-
export declare function parseJsCommand(ctx: ParserContext, identifierNode: IdentifierNode): CommandNode;
|
|
11
|
-
export declare function parseTellCommand(ctx: ParserContext, identifierNode: IdentifierNode): CommandNode;
|
|
12
|
-
export declare function parsePickCommand(ctx: ParserContext, identifierNode: IdentifierNode): CommandNode;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=utility-commands.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ParserContext, IdentifierNode } from '../parser-types';
|
|
2
|
-
import type { ASTNode, Token } from '../../types/core';
|
|
3
|
-
export declare function parseColonVariable(ctx: ParserContext): IdentifierNode | null;
|
|
4
|
-
export declare function parseScopedVariable(ctx: ParserContext): IdentifierNode | null;
|
|
5
|
-
export declare function parsePropertyOfTarget(ctx: ParserContext, startPosition: number): ASTNode | null;
|
|
6
|
-
export declare function parseTargetFallback(ctx: ParserContext): {
|
|
7
|
-
expression: ASTNode | null;
|
|
8
|
-
tokens: ASTNode[];
|
|
9
|
-
};
|
|
10
|
-
export declare function parseSetCommand(ctx: ParserContext, identifierNode: IdentifierNode): import("../..").CommandNode;
|
|
11
|
-
export declare function parseIncrementDecrementCommand(ctx: ParserContext, commandToken: Token): import("../..").CommandNode;
|
|
12
|
-
//# sourceMappingURL=variable-commands.d.ts.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { Token, ParseError } from '../types/core';
|
|
2
|
-
export interface ErrorContext {
|
|
3
|
-
parsing: 'expression' | 'binary_op' | 'unary_op' | 'call' | 'member' | 'primary' | 'parentheses' | 'string' | 'command';
|
|
4
|
-
expected?: string[];
|
|
5
|
-
operators?: string[];
|
|
6
|
-
lastValidToken?: Token;
|
|
7
|
-
}
|
|
8
|
-
export interface EnhancedParseError extends ParseError {
|
|
9
|
-
context?: ErrorContext;
|
|
10
|
-
suggestion?: string;
|
|
11
|
-
recovery?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class ErrorHandler {
|
|
14
|
-
private errors;
|
|
15
|
-
private tokens;
|
|
16
|
-
private position;
|
|
17
|
-
constructor(tokens: Token[], position?: number);
|
|
18
|
-
addError(message: string, context: ErrorContext, token?: Token): EnhancedParseError;
|
|
19
|
-
getPrimaryError(): EnhancedParseError | undefined;
|
|
20
|
-
getAllErrors(): EnhancedParseError[];
|
|
21
|
-
private enhanceErrorMessage;
|
|
22
|
-
private generateSuggestion;
|
|
23
|
-
private generateRecoveryStrategy;
|
|
24
|
-
private checkTypos;
|
|
25
|
-
private isTypo;
|
|
26
|
-
private levenshteinDistance;
|
|
27
|
-
advance(): void;
|
|
28
|
-
setPosition(position: number): void;
|
|
29
|
-
getPosition(): number;
|
|
30
|
-
private getCurrentToken;
|
|
31
|
-
static detectErrorPatterns(tokens: Token[]): EnhancedParseError[];
|
|
32
|
-
}
|
|
33
|
-
export declare function createErrorHandler(tokens: Token[], position?: number): ErrorHandler;
|
|
34
|
-
//# sourceMappingURL=error-handler.d.ts.map
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { BindingPowerEntry, InfixHandler, PrefixHandler } from './pratt-parser';
|
|
2
|
-
import type { ASTNode, ExecutionContext } from '../types/base-types';
|
|
3
|
-
import type { Token } from '../types/core';
|
|
4
|
-
import type { ParserContext } from './parser-types';
|
|
5
|
-
export { setGlobal, notifyGlobalRead, notifyLocalWrite, notifyLocalRead, getGlobalWriteHooks, getLocalWriteHooks, type GlobalWriteHook, type GlobalReadHook, type LocalWriteHook, type LocalReadHook, } from '../core/scope-hooks';
|
|
6
|
-
import type { GlobalWriteHook, GlobalReadHook, LocalWriteHook, LocalReadHook } from '../core/scope-hooks';
|
|
7
|
-
export type FeatureParseFn = (ctx: ParserContext, token: Token) => ASTNode | null;
|
|
8
|
-
export type NodeEvaluatorFn = (node: ASTNode, context: ExecutionContext) => unknown | Promise<unknown>;
|
|
9
|
-
export type NodeWriterFn = (node: ASTNode, value: unknown, context: ExecutionContext) => void | Promise<void>;
|
|
10
|
-
export declare function getRegisteredFeature(name: string): FeatureParseFn | undefined;
|
|
11
|
-
export declare function getRegisteredNodeEvaluator(type: string): NodeEvaluatorFn | undefined;
|
|
12
|
-
export declare function getRegisteredNodeWriter(type: string): NodeWriterFn | undefined;
|
|
13
|
-
export interface ParserExtensionSnapshot {
|
|
14
|
-
commands: string[];
|
|
15
|
-
operators: string[];
|
|
16
|
-
prattEntries: Array<[string, BindingPowerEntry]>;
|
|
17
|
-
features: Array<[string, FeatureParseFn]>;
|
|
18
|
-
nodeEvaluators: Array<[string, NodeEvaluatorFn]>;
|
|
19
|
-
nodeWriters: Array<[string, NodeWriterFn]>;
|
|
20
|
-
globalWriteHooks: GlobalWriteHook[];
|
|
21
|
-
globalReadHooks: GlobalReadHook[];
|
|
22
|
-
localWriteHooks: LocalWriteHook[];
|
|
23
|
-
localReadHooks: LocalReadHook[];
|
|
24
|
-
}
|
|
25
|
-
export declare class ParserExtensionRegistry {
|
|
26
|
-
registerCommand(name: string): void;
|
|
27
|
-
registerCompoundOperator(token: string): void;
|
|
28
|
-
registerInfixOperator(token: string, leftBp: number, rightBp: number, handler: InfixHandler): void;
|
|
29
|
-
registerPrefixOperator(token: string, bp: number, handler: PrefixHandler): void;
|
|
30
|
-
hasCommand(name: string): boolean;
|
|
31
|
-
registerFeature(keyword: string, parseFn: FeatureParseFn): void;
|
|
32
|
-
hasFeature(name: string): boolean;
|
|
33
|
-
registerNodeEvaluator(nodeType: string, fn: NodeEvaluatorFn): void;
|
|
34
|
-
registerNodeWriter(nodeType: string, fn: NodeWriterFn): void;
|
|
35
|
-
registerGlobalWriteHook(hook: GlobalWriteHook): () => void;
|
|
36
|
-
registerGlobalReadHook(hook: GlobalReadHook): () => void;
|
|
37
|
-
registerLocalWriteHook(hook: LocalWriteHook): () => void;
|
|
38
|
-
registerLocalReadHook(hook: LocalReadHook): () => void;
|
|
39
|
-
snapshot(): ParserExtensionSnapshot;
|
|
40
|
-
restore(snapshot: ParserExtensionSnapshot): void;
|
|
41
|
-
}
|
|
42
|
-
export declare function getParserExtensionRegistry(): ParserExtensionRegistry;
|
|
43
|
-
//# sourceMappingURL=extensions.d.ts.map
|