@azx-pbc/axiom-compiler 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.md +415 -2
- package/dist/article.d.ts +12 -0
- package/dist/article.d.ts.map +1 -0
- package/dist/article.js +16 -0
- package/dist/article.js.map +1 -0
- package/dist/cli/args.d.ts +101 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +158 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/check.d.ts +2 -0
- package/dist/cli/check.d.ts.map +1 -0
- package/dist/cli/check.js +33 -0
- package/dist/cli/check.js.map +1 -0
- package/dist/cli/compile.d.ts +2 -0
- package/dist/cli/compile.d.ts.map +1 -0
- package/dist/cli/compile.js +43 -0
- package/dist/cli/compile.js.map +1 -0
- package/dist/cli/count.d.ts +15 -0
- package/dist/cli/count.d.ts.map +1 -0
- package/dist/cli/count.js +21 -0
- package/dist/cli/count.js.map +1 -0
- package/dist/cli/dataset.d.ts +28 -0
- package/dist/cli/dataset.d.ts.map +1 -0
- package/dist/cli/dataset.js +115 -0
- package/dist/cli/dataset.js.map +1 -0
- package/dist/cli/diff.d.ts +2 -0
- package/dist/cli/diff.d.ts.map +1 -0
- package/dist/cli/diff.js +297 -0
- package/dist/cli/diff.js.map +1 -0
- package/dist/cli/explain.d.ts +2 -0
- package/dist/cli/explain.d.ts.map +1 -0
- package/dist/cli/explain.js +95 -0
- package/dist/cli/explain.js.map +1 -0
- package/dist/cli/fields.d.ts +11 -0
- package/dist/cli/fields.d.ts.map +1 -0
- package/dist/cli/fields.js +13 -0
- package/dist/cli/fields.js.map +1 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +40 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/read.d.ts +56 -0
- package/dist/cli/read.d.ts.map +1 -0
- package/dist/cli/read.js +179 -0
- package/dist/cli/read.js.map +1 -0
- package/dist/cli/render.d.ts +58 -0
- package/dist/cli/render.d.ts.map +1 -0
- package/dist/cli/render.js +422 -0
- package/dist/cli/render.js.map +1 -0
- package/dist/cli/schema.d.ts +28 -0
- package/dist/cli/schema.d.ts.map +1 -0
- package/dist/cli/schema.js +46 -0
- package/dist/cli/schema.js.map +1 -0
- package/dist/cli/suite-report.d.ts +18 -0
- package/dist/cli/suite-report.d.ts.map +1 -0
- package/dist/cli/suite-report.js +58 -0
- package/dist/cli/suite-report.js.map +1 -0
- package/dist/cli/suites.d.ts +25 -0
- package/dist/cli/suites.d.ts.map +1 -0
- package/dist/cli/suites.js +67 -0
- package/dist/cli/suites.js.map +1 -0
- package/dist/cli/terminal.d.ts +45 -0
- package/dist/cli/terminal.d.ts.map +1 -0
- package/dist/cli/terminal.js +119 -0
- package/dist/cli/terminal.js.map +1 -0
- package/dist/cli/test.d.ts +12 -0
- package/dist/cli/test.d.ts.map +1 -0
- package/dist/cli/test.js +199 -0
- package/dist/cli/test.js.map +1 -0
- package/dist/cli/usage.d.ts +15 -0
- package/dist/cli/usage.d.ts.map +1 -0
- package/dist/cli/usage.js +95 -0
- package/dist/cli/usage.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +51 -0
- package/dist/cli.js.map +1 -0
- package/dist/compile/artifact-members.d.ts +57 -0
- package/dist/compile/artifact-members.d.ts.map +1 -0
- package/dist/compile/artifact-members.js +130 -0
- package/dist/compile/artifact-members.js.map +1 -0
- package/dist/compile/artifact.d.ts +20 -0
- package/dist/compile/artifact.d.ts.map +1 -0
- package/dist/compile/artifact.js +87 -0
- package/dist/compile/artifact.js.map +1 -0
- package/dist/compile/compilation.d.ts +46 -0
- package/dist/compile/compilation.d.ts.map +1 -0
- package/dist/compile/compilation.js +4 -0
- package/dist/compile/compilation.js.map +1 -0
- package/dist/compile/computed.d.ts +22 -0
- package/dist/compile/computed.d.ts.map +1 -0
- package/dist/compile/computed.js +245 -0
- package/dist/compile/computed.js.map +1 -0
- package/dist/compile/condition-warnings.d.ts +12 -0
- package/dist/compile/condition-warnings.d.ts.map +1 -0
- package/dist/compile/condition-warnings.js +26 -0
- package/dist/compile/condition-warnings.js.map +1 -0
- package/dist/compile/conditions.d.ts +18 -0
- package/dist/compile/conditions.d.ts.map +1 -0
- package/dist/compile/conditions.js +22 -0
- package/dist/compile/conditions.js.map +1 -0
- package/dist/compile/cross-checks.d.ts +67 -0
- package/dist/compile/cross-checks.d.ts.map +1 -0
- package/dist/compile/cross-checks.js +238 -0
- package/dist/compile/cross-checks.js.map +1 -0
- package/dist/compile/datasets.d.ts +52 -0
- package/dist/compile/datasets.d.ts.map +1 -0
- package/dist/compile/datasets.js +183 -0
- package/dist/compile/datasets.js.map +1 -0
- package/dist/compile/dead-weight.d.ts +26 -0
- package/dist/compile/dead-weight.d.ts.map +1 -0
- package/dist/compile/dead-weight.js +244 -0
- package/dist/compile/dead-weight.js.map +1 -0
- package/dist/compile/declaration-rules.d.ts +54 -0
- package/dist/compile/declaration-rules.d.ts.map +1 -0
- package/dist/compile/declaration-rules.js +510 -0
- package/dist/compile/declaration-rules.js.map +1 -0
- package/dist/compile/declarations.d.ts +44 -0
- package/dist/compile/declarations.d.ts.map +1 -0
- package/dist/compile/declarations.js +160 -0
- package/dist/compile/declarations.js.map +1 -0
- package/dist/compile/document.d.ts +4 -0
- package/dist/compile/document.d.ts.map +1 -0
- package/dist/compile/document.js +13 -0
- package/dist/compile/document.js.map +1 -0
- package/dist/compile/expression.d.ts +38 -0
- package/dist/compile/expression.d.ts.map +1 -0
- package/dist/compile/expression.js +288 -0
- package/dist/compile/expression.js.map +1 -0
- package/dist/compile/hashes.d.ts +26 -0
- package/dist/compile/hashes.d.ts.map +1 -0
- package/dist/compile/hashes.js +96 -0
- package/dist/compile/hashes.js.map +1 -0
- package/dist/compile/item-targets.d.ts +12 -0
- package/dist/compile/item-targets.d.ts.map +1 -0
- package/dist/compile/item-targets.js +287 -0
- package/dist/compile/item-targets.js.map +1 -0
- package/dist/compile/messages.d.ts +8 -0
- package/dist/compile/messages.d.ts.map +1 -0
- package/dist/compile/messages.js +62 -0
- package/dist/compile/messages.js.map +1 -0
- package/dist/compile/option-availability.d.ts +51 -0
- package/dist/compile/option-availability.d.ts.map +1 -0
- package/dist/compile/option-availability.js +171 -0
- package/dist/compile/option-availability.js.map +1 -0
- package/dist/compile/option-codes.d.ts +27 -0
- package/dist/compile/option-codes.d.ts.map +1 -0
- package/dist/compile/option-codes.js +212 -0
- package/dist/compile/option-codes.js.map +1 -0
- package/dist/compile/references.d.ts +14 -0
- package/dist/compile/references.d.ts.map +1 -0
- package/dist/compile/references.js +126 -0
- package/dist/compile/references.js.map +1 -0
- package/dist/compile/rows-from.d.ts +27 -0
- package/dist/compile/rows-from.d.ts.map +1 -0
- package/dist/compile/rows-from.js +164 -0
- package/dist/compile/rows-from.js.map +1 -0
- package/dist/compile/rules.d.ts +58 -0
- package/dist/compile/rules.d.ts.map +1 -0
- package/dist/compile/rules.js +327 -0
- package/dist/compile/rules.js.map +1 -0
- package/dist/compile/suggestions.d.ts +52 -0
- package/dist/compile/suggestions.d.ts.map +1 -0
- package/dist/compile/suggestions.js +633 -0
- package/dist/compile/suggestions.js.map +1 -0
- package/dist/compile/targets.d.ts +22 -0
- package/dist/compile/targets.d.ts.map +1 -0
- package/dist/compile/targets.js +125 -0
- package/dist/compile/targets.js.map +1 -0
- package/dist/compile/types.d.ts +84 -0
- package/dist/compile/types.d.ts.map +1 -0
- package/dist/compile/types.js +2 -0
- package/dist/compile/types.js.map +1 -0
- package/dist/compile/warning.d.ts +45 -0
- package/dist/compile/warning.d.ts.map +1 -0
- package/dist/compile/warning.js +2 -0
- package/dist/compile/warning.js.map +1 -0
- package/dist/compile-yaml.d.ts +23 -0
- package/dist/compile-yaml.d.ts.map +1 -0
- package/dist/compile-yaml.js +30 -0
- package/dist/compile-yaml.js.map +1 -0
- package/dist/compile.d.ts +78 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +372 -0
- package/dist/compile.js.map +1 -0
- package/dist/csv/limits.d.ts +43 -0
- package/dist/csv/limits.d.ts.map +1 -0
- package/dist/csv/limits.js +51 -0
- package/dist/csv/limits.js.map +1 -0
- package/dist/csv/scalar.d.ts +33 -0
- package/dist/csv/scalar.d.ts.map +1 -0
- package/dist/csv/scalar.js +77 -0
- package/dist/csv/scalar.js.map +1 -0
- package/dist/datasets/csv.d.ts +46 -0
- package/dist/datasets/csv.d.ts.map +1 -0
- package/dist/datasets/csv.js +293 -0
- package/dist/datasets/csv.js.map +1 -0
- package/dist/datasets/declaration.d.ts +16 -0
- package/dist/datasets/declaration.d.ts.map +1 -0
- package/dist/datasets/declaration.js +104 -0
- package/dist/datasets/declaration.js.map +1 -0
- package/dist/datasets/diagnostics.d.ts +65 -0
- package/dist/datasets/diagnostics.d.ts.map +1 -0
- package/dist/datasets/diagnostics.js +2 -0
- package/dist/datasets/diagnostics.js.map +1 -0
- package/dist/datasets/diff.d.ts +46 -0
- package/dist/datasets/diff.d.ts.map +1 -0
- package/dist/datasets/diff.js +84 -0
- package/dist/datasets/diff.js.map +1 -0
- package/dist/datasets/document.d.ts +12 -0
- package/dist/datasets/document.d.ts.map +1 -0
- package/dist/datasets/document.js +382 -0
- package/dist/datasets/document.js.map +1 -0
- package/dist/datasets/index.d.ts +43 -0
- package/dist/datasets/index.d.ts.map +1 -0
- package/dist/datasets/index.js +68 -0
- package/dist/datasets/index.js.map +1 -0
- package/dist/datasets/repair.d.ts +26 -0
- package/dist/datasets/repair.d.ts.map +1 -0
- package/dist/datasets/repair.js +60 -0
- package/dist/datasets/repair.js.map +1 -0
- package/dist/document-path.d.ts +62 -0
- package/dist/document-path.d.ts.map +1 -0
- package/dist/document-path.js +200 -0
- package/dist/document-path.js.map +1 -0
- package/dist/expr/boundary.d.ts +8 -0
- package/dist/expr/boundary.d.ts.map +1 -0
- package/dist/expr/boundary.js +243 -0
- package/dist/expr/boundary.js.map +1 -0
- package/dist/expr/compile-expr.d.ts +35 -0
- package/dist/expr/compile-expr.d.ts.map +1 -0
- package/dist/expr/compile-expr.js +66 -0
- package/dist/expr/compile-expr.js.map +1 -0
- package/dist/expr/deprecation.d.ts +23 -0
- package/dist/expr/deprecation.d.ts.map +1 -0
- package/dist/expr/deprecation.js +28 -0
- package/dist/expr/deprecation.js.map +1 -0
- package/dist/expr/diagnostics.d.ts +31 -0
- package/dist/expr/diagnostics.d.ts.map +1 -0
- package/dist/expr/diagnostics.js +34 -0
- package/dist/expr/diagnostics.js.map +1 -0
- package/dist/expr/lexer.d.ts +49 -0
- package/dist/expr/lexer.d.ts.map +1 -0
- package/dist/expr/lexer.js +277 -0
- package/dist/expr/lexer.js.map +1 -0
- package/dist/expr/lint-warnings.d.ts +11 -0
- package/dist/expr/lint-warnings.d.ts.map +1 -0
- package/dist/expr/lint-warnings.js +20 -0
- package/dist/expr/lint-warnings.js.map +1 -0
- package/dist/expr/lint.d.ts +41 -0
- package/dist/expr/lint.d.ts.map +1 -0
- package/dist/expr/lint.js +1034 -0
- package/dist/expr/lint.js.map +1 -0
- package/dist/expr/parse/aggregates.d.ts +13 -0
- package/dist/expr/parse/aggregates.d.ts.map +1 -0
- package/dist/expr/parse/aggregates.js +48 -0
- package/dist/expr/parse/aggregates.js.map +1 -0
- package/dist/expr/parse/budget.d.ts +11 -0
- package/dist/expr/parse/budget.d.ts.map +1 -0
- package/dist/expr/parse/budget.js +57 -0
- package/dist/expr/parse/budget.js.map +1 -0
- package/dist/expr/parse/grammar.d.ts +9 -0
- package/dist/expr/parse/grammar.d.ts.map +1 -0
- package/dist/expr/parse/grammar.js +699 -0
- package/dist/expr/parse/grammar.js.map +1 -0
- package/dist/expr/parse/literals.d.ts +20 -0
- package/dist/expr/parse/literals.d.ts.map +1 -0
- package/dist/expr/parse/literals.js +132 -0
- package/dist/expr/parse/literals.js.map +1 -0
- package/dist/expr/parse/stream.d.ts +60 -0
- package/dist/expr/parse/stream.d.ts.map +1 -0
- package/dist/expr/parse/stream.js +151 -0
- package/dist/expr/parse/stream.js.map +1 -0
- package/dist/expr/parser.d.ts +45 -0
- package/dist/expr/parser.d.ts.map +1 -0
- package/dist/expr/parser.js +110 -0
- package/dist/expr/parser.js.map +1 -0
- package/dist/expr/print/spell.d.ts +78 -0
- package/dist/expr/print/spell.d.ts.map +1 -0
- package/dist/expr/print/spell.js +592 -0
- package/dist/expr/print/spell.js.map +1 -0
- package/dist/expr/print.d.ts +20 -0
- package/dist/expr/print.d.ts.map +1 -0
- package/dist/expr/print.js +102 -0
- package/dist/expr/print.js.map +1 -0
- package/dist/expr/suggest.d.ts +26 -0
- package/dist/expr/suggest.d.ts.map +1 -0
- package/dist/expr/suggest.js +77 -0
- package/dist/expr/suggest.js.map +1 -0
- package/dist/expr/typecheck/aggregates.d.ts +8 -0
- package/dist/expr/typecheck/aggregates.d.ts.map +1 -0
- package/dist/expr/typecheck/aggregates.js +334 -0
- package/dist/expr/typecheck/aggregates.js.map +1 -0
- package/dist/expr/typecheck/arithmetic.d.ts +6 -0
- package/dist/expr/typecheck/arithmetic.d.ts.map +1 -0
- package/dist/expr/typecheck/arithmetic.js +258 -0
- package/dist/expr/typecheck/arithmetic.js.map +1 -0
- package/dist/expr/typecheck/arity.d.ts +38 -0
- package/dist/expr/typecheck/arity.d.ts.map +1 -0
- package/dist/expr/typecheck/arity.js +173 -0
- package/dist/expr/typecheck/arity.js.map +1 -0
- package/dist/expr/typecheck/calls.d.ts +6 -0
- package/dist/expr/typecheck/calls.d.ts.map +1 -0
- package/dist/expr/typecheck/calls.js +137 -0
- package/dist/expr/typecheck/calls.js.map +1 -0
- package/dist/expr/typecheck/comparison.d.ts +13 -0
- package/dist/expr/typecheck/comparison.d.ts.map +1 -0
- package/dist/expr/typecheck/comparison.js +200 -0
- package/dist/expr/typecheck/comparison.js.map +1 -0
- package/dist/expr/typecheck/compound.d.ts +24 -0
- package/dist/expr/typecheck/compound.d.ts.map +1 -0
- package/dist/expr/typecheck/compound.js +175 -0
- package/dist/expr/typecheck/compound.js.map +1 -0
- package/dist/expr/typecheck/context.d.ts +44 -0
- package/dist/expr/typecheck/context.d.ts.map +1 -0
- package/dist/expr/typecheck/context.js +2 -0
- package/dist/expr/typecheck/context.js.map +1 -0
- package/dist/expr/typecheck/datasets.d.ts +17 -0
- package/dist/expr/typecheck/datasets.d.ts.map +1 -0
- package/dist/expr/typecheck/datasets.js +136 -0
- package/dist/expr/typecheck/datasets.js.map +1 -0
- package/dist/expr/typecheck/digest.d.ts +7 -0
- package/dist/expr/typecheck/digest.d.ts.map +1 -0
- package/dist/expr/typecheck/digest.js +44 -0
- package/dist/expr/typecheck/digest.js.map +1 -0
- package/dist/expr/typecheck/fold.d.ts +41 -0
- package/dist/expr/typecheck/fold.d.ts.map +1 -0
- package/dist/expr/typecheck/fold.js +71 -0
- package/dist/expr/typecheck/fold.js.map +1 -0
- package/dist/expr/typecheck/gate-folds.d.ts +22 -0
- package/dist/expr/typecheck/gate-folds.d.ts.map +1 -0
- package/dist/expr/typecheck/gate-folds.js +40 -0
- package/dist/expr/typecheck/gate-folds.js.map +1 -0
- package/dist/expr/typecheck/guards.d.ts +6 -0
- package/dist/expr/typecheck/guards.d.ts.map +1 -0
- package/dist/expr/typecheck/guards.js +38 -0
- package/dist/expr/typecheck/guards.js.map +1 -0
- package/dist/expr/typecheck/member.d.ts +17 -0
- package/dist/expr/typecheck/member.d.ts.map +1 -0
- package/dist/expr/typecheck/member.js +46 -0
- package/dist/expr/typecheck/member.js.map +1 -0
- package/dist/expr/typecheck/money.d.ts +8 -0
- package/dist/expr/typecheck/money.d.ts.map +1 -0
- package/dist/expr/typecheck/money.js +49 -0
- package/dist/expr/typecheck/money.js.map +1 -0
- package/dist/expr/typecheck/numeric.d.ts +8 -0
- package/dist/expr/typecheck/numeric.d.ts.map +1 -0
- package/dist/expr/typecheck/numeric.js +84 -0
- package/dist/expr/typecheck/numeric.js.map +1 -0
- package/dist/expr/typecheck/operands.d.ts +27 -0
- package/dist/expr/typecheck/operands.d.ts.map +1 -0
- package/dist/expr/typecheck/operands.js +106 -0
- package/dist/expr/typecheck/operands.js.map +1 -0
- package/dist/expr/typecheck/paths.d.ts +21 -0
- package/dist/expr/typecheck/paths.d.ts.map +1 -0
- package/dist/expr/typecheck/paths.js +321 -0
- package/dist/expr/typecheck/paths.js.map +1 -0
- package/dist/expr/typecheck/records.d.ts +24 -0
- package/dist/expr/typecheck/records.d.ts.map +1 -0
- package/dist/expr/typecheck/records.js +53 -0
- package/dist/expr/typecheck/records.js.map +1 -0
- package/dist/expr/typecheck/sequences.d.ts +15 -0
- package/dist/expr/typecheck/sequences.d.ts.map +1 -0
- package/dist/expr/typecheck/sequences.js +55 -0
- package/dist/expr/typecheck/sequences.js.map +1 -0
- package/dist/expr/typecheck/strings.d.ts +8 -0
- package/dist/expr/typecheck/strings.d.ts.map +1 -0
- package/dist/expr/typecheck/strings.js +188 -0
- package/dist/expr/typecheck/strings.js.map +1 -0
- package/dist/expr/typecheck/temporal.d.ts +7 -0
- package/dist/expr/typecheck/temporal.d.ts.map +1 -0
- package/dist/expr/typecheck/temporal.js +80 -0
- package/dist/expr/typecheck/temporal.js.map +1 -0
- package/dist/expr/typecheck/types.d.ts +163 -0
- package/dist/expr/typecheck/types.d.ts.map +1 -0
- package/dist/expr/typecheck/types.js +404 -0
- package/dist/expr/typecheck/types.js.map +1 -0
- package/dist/expr/typecheck.d.ts +75 -0
- package/dist/expr/typecheck.d.ts.map +1 -0
- package/dist/expr/typecheck.js +242 -0
- package/dist/expr/typecheck.js.map +1 -0
- package/dist/expr/undecided.d.ts +13 -0
- package/dist/expr/undecided.d.ts.map +1 -0
- package/dist/expr/undecided.js +58 -0
- package/dist/expr/undecided.js.map +1 -0
- package/dist/expr/values/code-points.d.ts +13 -0
- package/dist/expr/values/code-points.d.ts.map +1 -0
- package/dist/expr/values/code-points.js +25 -0
- package/dist/expr/values/code-points.js.map +1 -0
- package/dist/expr/values/inline.d.ts +77 -0
- package/dist/expr/values/inline.d.ts.map +1 -0
- package/dist/expr/values/inline.js +404 -0
- package/dist/expr/values/inline.js.map +1 -0
- package/dist/expr/values/interval.d.ts +19 -0
- package/dist/expr/values/interval.d.ts.map +1 -0
- package/dist/expr/values/interval.js +1180 -0
- package/dist/expr/values/interval.js.map +1 -0
- package/dist/index.d.ts +163 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +128 -0
- package/dist/index.js.map +1 -0
- package/dist/ingest/document.d.ts +58 -0
- package/dist/ingest/document.d.ts.map +1 -0
- package/dist/ingest/document.js +83 -0
- package/dist/ingest/document.js.map +1 -0
- package/dist/ingest/yaml-document.d.ts +15 -0
- package/dist/ingest/yaml-document.d.ts.map +1 -0
- package/dist/ingest/yaml-document.js +42 -0
- package/dist/ingest/yaml-document.js.map +1 -0
- package/dist/ingest/yaml.d.ts +51 -0
- package/dist/ingest/yaml.d.ts.map +1 -0
- package/dist/ingest/yaml.js +340 -0
- package/dist/ingest/yaml.js.map +1 -0
- package/dist/layout/compile.d.ts +6 -0
- package/dist/layout/compile.d.ts.map +1 -0
- package/dist/layout/compile.js +224 -0
- package/dist/layout/compile.js.map +1 -0
- package/dist/layout/context.d.ts +12 -0
- package/dist/layout/context.d.ts.map +1 -0
- package/dist/layout/context.js +26 -0
- package/dist/layout/context.js.map +1 -0
- package/dist/layout/grammar.d.ts +34 -0
- package/dist/layout/grammar.d.ts.map +1 -0
- package/dist/layout/grammar.js +171 -0
- package/dist/layout/grammar.js.map +1 -0
- package/dist/layout/read.d.ts +54 -0
- package/dist/layout/read.d.ts.map +1 -0
- package/dist/layout/read.js +101 -0
- package/dist/layout/read.js.map +1 -0
- package/dist/layout/shape.d.ts +34 -0
- package/dist/layout/shape.d.ts.map +1 -0
- package/dist/layout/shape.js +149 -0
- package/dist/layout/shape.js.map +1 -0
- package/dist/messages/compile.d.ts +47 -0
- package/dist/messages/compile.d.ts.map +1 -0
- package/dist/messages/compile.js +202 -0
- package/dist/messages/compile.js.map +1 -0
- package/dist/messages/locale.d.ts +18 -0
- package/dist/messages/locale.d.ts.map +1 -0
- package/dist/messages/locale.js +33 -0
- package/dist/messages/locale.js.map +1 -0
- package/dist/messages/slots.d.ts +54 -0
- package/dist/messages/slots.d.ts.map +1 -0
- package/dist/messages/slots.js +137 -0
- package/dist/messages/slots.js.map +1 -0
- package/dist/overlay/compile-overlay.d.ts +29 -0
- package/dist/overlay/compile-overlay.d.ts.map +1 -0
- package/dist/overlay/compile-overlay.js +120 -0
- package/dist/overlay/compile-overlay.js.map +1 -0
- package/dist/overlay/compose.d.ts +26 -0
- package/dist/overlay/compose.d.ts.map +1 -0
- package/dist/overlay/compose.js +674 -0
- package/dist/overlay/compose.js.map +1 -0
- package/dist/overlay/types.d.ts +41 -0
- package/dist/overlay/types.d.ts.map +1 -0
- package/dist/overlay/types.js +2 -0
- package/dist/overlay/types.js.map +1 -0
- package/dist/publish/classify.d.ts +50 -0
- package/dist/publish/classify.d.ts.map +1 -0
- package/dist/publish/classify.js +85 -0
- package/dist/publish/classify.js.map +1 -0
- package/dist/publish/environment.d.ts +15 -0
- package/dist/publish/environment.d.ts.map +1 -0
- package/dist/publish/environment.js +2 -0
- package/dist/publish/environment.js.map +1 -0
- package/dist/publish/migrations.d.ts +108 -0
- package/dist/publish/migrations.d.ts.map +1 -0
- package/dist/publish/migrations.js +166 -0
- package/dist/publish/migrations.js.map +1 -0
- package/dist/publish/observation.d.ts +29 -0
- package/dist/publish/observation.d.ts.map +1 -0
- package/dist/publish/observation.js +43 -0
- package/dist/publish/observation.js.map +1 -0
- package/dist/publish/readiness.d.ts +197 -0
- package/dist/publish/readiness.d.ts.map +1 -0
- package/dist/publish/readiness.js +239 -0
- package/dist/publish/readiness.js.map +1 -0
- package/dist/publish/vectors.d.ts +50 -0
- package/dist/publish/vectors.d.ts.map +1 -0
- package/dist/publish/vectors.js +306 -0
- package/dist/publish/vectors.js.map +1 -0
- package/dist/publish/verify.d.ts +146 -0
- package/dist/publish/verify.d.ts.map +1 -0
- package/dist/publish/verify.js +548 -0
- package/dist/publish/verify.js.map +1 -0
- package/dist/scenarios/branch.d.ts +36 -0
- package/dist/scenarios/branch.d.ts.map +1 -0
- package/dist/scenarios/branch.js +30 -0
- package/dist/scenarios/branch.js.map +1 -0
- package/dist/scenarios/capture.d.ts +89 -0
- package/dist/scenarios/capture.d.ts.map +1 -0
- package/dist/scenarios/capture.js +443 -0
- package/dist/scenarios/capture.js.map +1 -0
- package/dist/scenarios/classifier.d.ts +20 -0
- package/dist/scenarios/classifier.d.ts.map +1 -0
- package/dist/scenarios/classifier.js +88 -0
- package/dist/scenarios/classifier.js.map +1 -0
- package/dist/scenarios/credit.d.ts +33 -0
- package/dist/scenarios/credit.d.ts.map +1 -0
- package/dist/scenarios/credit.js +330 -0
- package/dist/scenarios/credit.js.map +1 -0
- package/dist/scenarios/csv.d.ts +34 -0
- package/dist/scenarios/csv.d.ts.map +1 -0
- package/dist/scenarios/csv.js +1047 -0
- package/dist/scenarios/csv.js.map +1 -0
- package/dist/scenarios/data-identity.d.ts +39 -0
- package/dist/scenarios/data-identity.d.ts.map +1 -0
- package/dist/scenarios/data-identity.js +28 -0
- package/dist/scenarios/data-identity.js.map +1 -0
- package/dist/scenarios/document.d.ts +148 -0
- package/dist/scenarios/document.d.ts.map +1 -0
- package/dist/scenarios/document.js +513 -0
- package/dist/scenarios/document.js.map +1 -0
- package/dist/scenarios/environment.d.ts +64 -0
- package/dist/scenarios/environment.d.ts.map +1 -0
- package/dist/scenarios/environment.js +106 -0
- package/dist/scenarios/environment.js.map +1 -0
- package/dist/scenarios/evidence.d.ts +128 -0
- package/dist/scenarios/evidence.d.ts.map +1 -0
- package/dist/scenarios/evidence.js +179 -0
- package/dist/scenarios/evidence.js.map +1 -0
- package/dist/scenarios/expectations.d.ts +63 -0
- package/dist/scenarios/expectations.d.ts.map +1 -0
- package/dist/scenarios/expectations.js +490 -0
- package/dist/scenarios/expectations.js.map +1 -0
- package/dist/scenarios/references.d.ts +15 -0
- package/dist/scenarios/references.d.ts.map +1 -0
- package/dist/scenarios/references.js +239 -0
- package/dist/scenarios/references.js.map +1 -0
- package/dist/scenarios/report.d.ts +216 -0
- package/dist/scenarios/report.d.ts.map +1 -0
- package/dist/scenarios/report.js +54 -0
- package/dist/scenarios/report.js.map +1 -0
- package/dist/scenarios/runner.d.ts +55 -0
- package/dist/scenarios/runner.d.ts.map +1 -0
- package/dist/scenarios/runner.js +205 -0
- package/dist/scenarios/runner.js.map +1 -0
- package/dist/scenarios/vocabulary.d.ts +19 -0
- package/dist/scenarios/vocabulary.d.ts.map +1 -0
- package/dist/scenarios/vocabulary.js +56 -0
- package/dist/scenarios/vocabulary.js.map +1 -0
- package/dist/schema/catalogue.d.ts +54 -0
- package/dist/schema/catalogue.d.ts.map +1 -0
- package/dist/schema/catalogue.js +221 -0
- package/dist/schema/catalogue.js.map +1 -0
- package/dist/schema/check.d.ts +22 -0
- package/dist/schema/check.d.ts.map +1 -0
- package/dist/schema/check.js +30 -0
- package/dist/schema/check.js.map +1 -0
- package/dist/schema/closed.d.ts +19 -0
- package/dist/schema/closed.d.ts.map +1 -0
- package/dist/schema/closed.js +33 -0
- package/dist/schema/closed.js.map +1 -0
- package/dist/schema/collapse.d.ts +27 -0
- package/dist/schema/collapse.d.ts.map +1 -0
- package/dist/schema/collapse.js +143 -0
- package/dist/schema/collapse.js.map +1 -0
- package/dist/schema/controls.d.ts +46 -0
- package/dist/schema/controls.d.ts.map +1 -0
- package/dist/schema/controls.js +75 -0
- package/dist/schema/controls.js.map +1 -0
- package/dist/schema/dataset-declaration.d.ts +11 -0
- package/dist/schema/dataset-declaration.d.ts.map +1 -0
- package/dist/schema/dataset-declaration.js +11 -0
- package/dist/schema/dataset-declaration.js.map +1 -0
- package/dist/schema/declaration-warnings.d.ts +14 -0
- package/dist/schema/declaration-warnings.d.ts.map +1 -0
- package/dist/schema/declaration-warnings.js +77 -0
- package/dist/schema/declaration-warnings.js.map +1 -0
- package/dist/schema/declarations.d.ts +41 -0
- package/dist/schema/declarations.d.ts.map +1 -0
- package/dist/schema/declarations.js +1299 -0
- package/dist/schema/declarations.js.map +1 -0
- package/dist/schema/diagnostic.d.ts +118 -0
- package/dist/schema/diagnostic.d.ts.map +1 -0
- package/dist/schema/diagnostic.js +39 -0
- package/dist/schema/diagnostic.js.map +1 -0
- package/dist/schema/document.d.ts +93 -0
- package/dist/schema/document.d.ts.map +1 -0
- package/dist/schema/document.js +507 -0
- package/dist/schema/document.js.map +1 -0
- package/dist/schema/fields.d.ts +11 -0
- package/dist/schema/fields.d.ts.map +1 -0
- package/dist/schema/fields.js +265 -0
- package/dist/schema/fields.js.map +1 -0
- package/dist/schema/gates.d.ts +4 -0
- package/dist/schema/gates.d.ts.map +1 -0
- package/dist/schema/gates.js +68 -0
- package/dist/schema/gates.js.map +1 -0
- package/dist/schema/located.d.ts +27 -0
- package/dist/schema/located.d.ts.map +1 -0
- package/dist/schema/located.js +56 -0
- package/dist/schema/located.js.map +1 -0
- package/dist/schema/measurement.d.ts +9 -0
- package/dist/schema/measurement.d.ts.map +1 -0
- package/dist/schema/measurement.js +38 -0
- package/dist/schema/measurement.js.map +1 -0
- package/dist/schema/member-wording.d.ts +35 -0
- package/dist/schema/member-wording.d.ts.map +1 -0
- package/dist/schema/member-wording.js +286 -0
- package/dist/schema/member-wording.js.map +1 -0
- package/dist/schema/metaschema.d.ts +20 -0
- package/dist/schema/metaschema.d.ts.map +1 -0
- package/dist/schema/metaschema.js +476 -0
- package/dist/schema/metaschema.js.map +1 -0
- package/dist/schema/pointer.d.ts +31 -0
- package/dist/schema/pointer.d.ts.map +1 -0
- package/dist/schema/pointer.js +73 -0
- package/dist/schema/pointer.js.map +1 -0
- package/dist/schema/primary.d.ts +29 -0
- package/dist/schema/primary.d.ts.map +1 -0
- package/dist/schema/primary.js +48 -0
- package/dist/schema/primary.js.map +1 -0
- package/dist/schema/publish-vector.d.ts +17 -0
- package/dist/schema/publish-vector.d.ts.map +1 -0
- package/dist/schema/publish-vector.js +34 -0
- package/dist/schema/publish-vector.js.map +1 -0
- package/dist/schema/repair.d.ts +34 -0
- package/dist/schema/repair.d.ts.map +1 -0
- package/dist/schema/repair.js +163 -0
- package/dist/schema/repair.js.map +1 -0
- package/dist/schema/schema-v1.generated.d.ts +14 -0
- package/dist/schema/schema-v1.generated.d.ts.map +1 -0
- package/dist/schema/schema-v1.generated.js +7089 -0
- package/dist/schema/schema-v1.generated.js.map +1 -0
- package/dist/schema/screens.d.ts +4 -0
- package/dist/schema/screens.d.ts.map +1 -0
- package/dist/schema/screens.js +28 -0
- package/dist/schema/screens.js.map +1 -0
- package/dist/schema/test-values.d.ts +12 -0
- package/dist/schema/test-values.d.ts.map +1 -0
- package/dist/schema/test-values.js +97 -0
- package/dist/schema/test-values.js.map +1 -0
- package/dist/schema/unions.d.ts +46 -0
- package/dist/schema/unions.d.ts.map +1 -0
- package/dist/schema/unions.js +131 -0
- package/dist/schema/unions.js.map +1 -0
- package/dist/schema/validate-yaml.d.ts +14 -0
- package/dist/schema/validate-yaml.d.ts.map +1 -0
- package/dist/schema/validate-yaml.js +17 -0
- package/dist/schema/validate-yaml.js.map +1 -0
- package/dist/schema/validate.d.ts +46 -0
- package/dist/schema/validate.d.ts.map +1 -0
- package/dist/schema/validate.js +186 -0
- package/dist/schema/validate.js.map +1 -0
- package/dist/testing.d.ts +21 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +28 -0
- package/dist/testing.js.map +1 -0
- package/dist/vocabulary.d.ts +6 -0
- package/dist/vocabulary.d.ts.map +1 -0
- package/dist/vocabulary.js +26 -0
- package/dist/vocabulary.js.map +1 -0
- package/package.json +66 -3
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { asDecimalString, parseDecimal } from '@azx-pbc/axiom-runtime';
|
|
2
|
+
import { ExpressionCompileError } from './diagnostics.js';
|
|
3
|
+
/** The reserved words. `UNKNOWN`/`DEFERRED` are deliberately absent. */
|
|
4
|
+
const KEYWORDS = [
|
|
5
|
+
'and',
|
|
6
|
+
'or',
|
|
7
|
+
'not',
|
|
8
|
+
'if',
|
|
9
|
+
'in',
|
|
10
|
+
'null',
|
|
11
|
+
'None',
|
|
12
|
+
'nil',
|
|
13
|
+
'true',
|
|
14
|
+
'false',
|
|
15
|
+
'decimal',
|
|
16
|
+
'date',
|
|
17
|
+
'instant',
|
|
18
|
+
'money',
|
|
19
|
+
];
|
|
20
|
+
/**
|
|
21
|
+
* The reserved words as a membership test. A path segment drawn from this set has no source
|
|
22
|
+
* spelling: the lexer reads the word as the keyword it is, so an emitter refuses it rather than
|
|
23
|
+
* write text that parses as a different expression.
|
|
24
|
+
*/
|
|
25
|
+
export const EXPR_RESERVED_WORDS = new Set(KEYWORDS);
|
|
26
|
+
function isKeyword(text) {
|
|
27
|
+
return EXPR_RESERVED_WORDS.has(text);
|
|
28
|
+
}
|
|
29
|
+
/** Source token budget. */
|
|
30
|
+
export const MAX_SOURCE_TOKENS = 4000;
|
|
31
|
+
function isIdentifierStart(character) {
|
|
32
|
+
return /[A-Za-z_]/.test(character);
|
|
33
|
+
}
|
|
34
|
+
function isIdentifierPart(character) {
|
|
35
|
+
return /[A-Za-z0-9_]/.test(character);
|
|
36
|
+
}
|
|
37
|
+
function isDigit(character) {
|
|
38
|
+
return /[0-9]/.test(character);
|
|
39
|
+
}
|
|
40
|
+
function isWhitespace(character) {
|
|
41
|
+
return character === ' ' || character === '\t' || character === '\r' || character === '\n';
|
|
42
|
+
}
|
|
43
|
+
/** One hexadecimal digit's value, or `undefined` when the character is not one. */
|
|
44
|
+
function hexValue(character) {
|
|
45
|
+
if (/[0-9]/.test(character))
|
|
46
|
+
return Number(character);
|
|
47
|
+
if (/[a-fA-F]/.test(character))
|
|
48
|
+
return character.toLowerCase().charCodeAt(0) - 87;
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
class Lexer {
|
|
52
|
+
source;
|
|
53
|
+
index = 0;
|
|
54
|
+
tokens = [];
|
|
55
|
+
constructor(source) {
|
|
56
|
+
this.source = source;
|
|
57
|
+
}
|
|
58
|
+
tokenize() {
|
|
59
|
+
for (;;) {
|
|
60
|
+
this.skipTrivia();
|
|
61
|
+
if (this.index >= this.source.length)
|
|
62
|
+
break;
|
|
63
|
+
const token = this.readToken();
|
|
64
|
+
this.tokens.push(token);
|
|
65
|
+
if (this.tokens.length > MAX_SOURCE_TOKENS) {
|
|
66
|
+
throw new ExpressionCompileError('COST_BUDGET_EXCEEDED', token.offset, `the expression exceeds the ${String(MAX_SOURCE_TOKENS)}-token source budget; split it into named intermediate rules`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
this.tokens.push({ kind: 'eof', text: '', offset: this.source.length });
|
|
70
|
+
return this.tokens;
|
|
71
|
+
}
|
|
72
|
+
peek(offset = 0) {
|
|
73
|
+
return this.source[this.index + offset] ?? '';
|
|
74
|
+
}
|
|
75
|
+
skipTrivia() {
|
|
76
|
+
for (;;) {
|
|
77
|
+
const character = this.peek();
|
|
78
|
+
if (isWhitespace(character)) {
|
|
79
|
+
this.index += 1;
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
// An expression has one normal form, the AST, and the AST carries no comment: a note in
|
|
83
|
+
// the source would survive only until the first structural edit and then disappear.
|
|
84
|
+
// The refusal names where a note does survive, so the author is not left to guess.
|
|
85
|
+
if (character === '#' || (character === '/' && this.peek(1) === '*')) {
|
|
86
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', this.index, "a comment is not part of an expression; an expression is stored as an AST, so put the note in the field's or rule's `descriptionKey`, in a message in the catalogue, or as a `#` comment in the YAML authoring file");
|
|
87
|
+
}
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
readToken() {
|
|
92
|
+
const character = this.peek();
|
|
93
|
+
if (isDigit(character))
|
|
94
|
+
return this.readNumber();
|
|
95
|
+
if (isIdentifierStart(character))
|
|
96
|
+
return this.readWord();
|
|
97
|
+
if (character === '"' || character === "'")
|
|
98
|
+
return this.readString();
|
|
99
|
+
return this.readPunctuation();
|
|
100
|
+
}
|
|
101
|
+
readNumber() {
|
|
102
|
+
const offset = this.index;
|
|
103
|
+
const start = this.index;
|
|
104
|
+
while (isDigit(this.peek()))
|
|
105
|
+
this.index += 1;
|
|
106
|
+
const whole = this.source.slice(start, this.index);
|
|
107
|
+
if (whole.length > 1 && whole.startsWith('0')) {
|
|
108
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', offset, `\`${whole}\` has a leading zero; a numeric literal is written without one`);
|
|
109
|
+
}
|
|
110
|
+
if (this.peek() === 'e' || this.peek() === 'E') {
|
|
111
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', offset, 'Expr v1 has no exponent form; write the number in full, as `1000` rather than `1e3`');
|
|
112
|
+
}
|
|
113
|
+
// A dot followed by an identifier start (such as `1.length`) is member/method syntax rather
|
|
114
|
+
// than a decimal fraction; leaving `.` for the parser lets it refuse the member read instead
|
|
115
|
+
// of misreporting a malformed decimal literal.
|
|
116
|
+
if (this.peek() !== '.' || isIdentifierStart(this.peek(1))) {
|
|
117
|
+
const value = Number(whole);
|
|
118
|
+
if (!Number.isSafeInteger(value)) {
|
|
119
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', offset, `integer \`${whole}\` is outside the range Expr v1 stores, -(2^53 - 1)..(2^53 - 1); write a smaller integer or a \`decimal\` literal`);
|
|
120
|
+
}
|
|
121
|
+
return { kind: 'integer', text: whole, value, offset };
|
|
122
|
+
}
|
|
123
|
+
this.index += 1;
|
|
124
|
+
const fractionStart = this.index;
|
|
125
|
+
while (isDigit(this.peek()))
|
|
126
|
+
this.index += 1;
|
|
127
|
+
const fraction = this.source.slice(fractionStart, this.index);
|
|
128
|
+
if (fraction === '') {
|
|
129
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', offset, 'a decimal literal needs at least one digit after the point; write `1.0`, not `1.`');
|
|
130
|
+
}
|
|
131
|
+
if (this.peek() === '.' && !isIdentifierStart(this.peek(1))) {
|
|
132
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', this.index, 'a number has one decimal point at most; write `12.5`, not `1.2.5`');
|
|
133
|
+
}
|
|
134
|
+
// canonical decimal text drops trailing fractional zeros, so `1.50`
|
|
135
|
+
// and `1.5` are one value and the compiled literal is the canonical one.
|
|
136
|
+
const trimmed = fraction.replace(/0+$/, '');
|
|
137
|
+
const text = trimmed === '' ? whole : `${whole}.${trimmed}`;
|
|
138
|
+
try {
|
|
139
|
+
const canonical = asDecimalString(text);
|
|
140
|
+
parseDecimal(canonical);
|
|
141
|
+
return { kind: 'decimal', text, value: canonical, offset };
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', offset, error instanceof Error ? error.message : 'decimal literal is outside the numeric budget');
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
readWord() {
|
|
148
|
+
const offset = this.index;
|
|
149
|
+
const start = this.index;
|
|
150
|
+
while (isIdentifierPart(this.peek()))
|
|
151
|
+
this.index += 1;
|
|
152
|
+
const text = this.source.slice(start, this.index);
|
|
153
|
+
if (isKeyword(text))
|
|
154
|
+
return { kind: 'keyword', text, offset };
|
|
155
|
+
return { kind: 'identifier', text, offset };
|
|
156
|
+
}
|
|
157
|
+
readString() {
|
|
158
|
+
const offset = this.index;
|
|
159
|
+
const quote = this.peek();
|
|
160
|
+
this.index += 1;
|
|
161
|
+
let value = '';
|
|
162
|
+
for (;;) {
|
|
163
|
+
if (this.index >= this.source.length) {
|
|
164
|
+
// Name the delimiter the author opened: `'a` and `"a` are different mistakes, and a
|
|
165
|
+
// reader who typed the wrong one needs to see which closing quote is missing.
|
|
166
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', offset, `a string literal is unterminated; expected a closing \`${quote}\``);
|
|
167
|
+
}
|
|
168
|
+
const character = this.peek();
|
|
169
|
+
this.index += 1;
|
|
170
|
+
if (character === quote)
|
|
171
|
+
break;
|
|
172
|
+
if (character !== '\\') {
|
|
173
|
+
value += character;
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
value += this.readEscape();
|
|
177
|
+
}
|
|
178
|
+
return { kind: 'string', text: this.source.slice(offset, this.index), value, offset };
|
|
179
|
+
}
|
|
180
|
+
readEscape() {
|
|
181
|
+
// The backslash is one character behind the cursor once `peek` has read the escape
|
|
182
|
+
// letter, so the caret lands on the escape rather than the string's opening quote.
|
|
183
|
+
const escapeOffset = this.index - 1;
|
|
184
|
+
const escape = this.peek();
|
|
185
|
+
this.index += 1;
|
|
186
|
+
switch (escape) {
|
|
187
|
+
case '\\':
|
|
188
|
+
return '\\';
|
|
189
|
+
case "'":
|
|
190
|
+
return "'";
|
|
191
|
+
case '"':
|
|
192
|
+
return '"';
|
|
193
|
+
case 'n':
|
|
194
|
+
return '\n';
|
|
195
|
+
case 'r':
|
|
196
|
+
return '\r';
|
|
197
|
+
case 't':
|
|
198
|
+
return '\t';
|
|
199
|
+
case 'u': {
|
|
200
|
+
if (this.peek() !== '{') {
|
|
201
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', escapeOffset, 'a unicode escape is written `\\u{XXXX}`');
|
|
202
|
+
}
|
|
203
|
+
this.index += 1;
|
|
204
|
+
const start = this.index;
|
|
205
|
+
let scalar = 0;
|
|
206
|
+
while (this.peek() !== '}') {
|
|
207
|
+
const digit = hexValue(this.peek());
|
|
208
|
+
if (digit === undefined) {
|
|
209
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', escapeOffset, 'a unicode escape carries one to six hexadecimal digits');
|
|
210
|
+
}
|
|
211
|
+
scalar = scalar * 16 + digit;
|
|
212
|
+
this.index += 1;
|
|
213
|
+
if (this.index - start > 6) {
|
|
214
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', escapeOffset, 'a unicode escape carries one to six hexadecimal digits');
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
if (this.index === start) {
|
|
218
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', escapeOffset, 'a unicode escape carries one to six hexadecimal digits');
|
|
219
|
+
}
|
|
220
|
+
this.index += 1;
|
|
221
|
+
// A lone surrogate is not a Unicode scalar value, so it cannot be spelled.
|
|
222
|
+
if (scalar > 0x10ffff || (scalar >= 0xd800 && scalar <= 0xdfff)) {
|
|
223
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', escapeOffset, 'a unicode escape must denote a Unicode scalar value');
|
|
224
|
+
}
|
|
225
|
+
return String.fromCodePoint(scalar);
|
|
226
|
+
}
|
|
227
|
+
default:
|
|
228
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', escapeOffset, `\`\\${escape}\` is not a supported escape`);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
readPunctuation() {
|
|
232
|
+
const offset = this.index;
|
|
233
|
+
const three = this.source.slice(this.index, this.index + 3);
|
|
234
|
+
// The strict forms are the language's own equality: there is no coercion, so the extra
|
|
235
|
+
// `=` distinguishes nothing. They are read as the canonical token so the AST never holds
|
|
236
|
+
// a spelling the printer would not emit.
|
|
237
|
+
if (three === '===' || three === '!==') {
|
|
238
|
+
this.index += 3;
|
|
239
|
+
return { kind: 'punctuation', text: three === '===' ? '==' : '!=', offset };
|
|
240
|
+
}
|
|
241
|
+
const two = this.source.slice(this.index, this.index + 2);
|
|
242
|
+
switch (two) {
|
|
243
|
+
case '??':
|
|
244
|
+
case '==':
|
|
245
|
+
case '!=':
|
|
246
|
+
case '<=':
|
|
247
|
+
case '>=':
|
|
248
|
+
case '<>':
|
|
249
|
+
case '&&':
|
|
250
|
+
case '||':
|
|
251
|
+
case '//':
|
|
252
|
+
case '**':
|
|
253
|
+
this.index += 2;
|
|
254
|
+
return { kind: 'punctuation', text: two, offset };
|
|
255
|
+
case ':=':
|
|
256
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', offset, '`:=` is not an Expr v1 operator; equality is written `f_a = 2`, or `f_a == 2`', ['=='], '==');
|
|
257
|
+
case '=>':
|
|
258
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', offset, '`=>` is not an Expr v1 operator; write `>=` to compare or `==` for equality', ['==', '>=']);
|
|
259
|
+
default:
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
const character = this.peek();
|
|
263
|
+
if (character === '\\') {
|
|
264
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', offset, '`\\` is not an Expr v1 operator; integer division is written `a // b`', ['//']);
|
|
265
|
+
}
|
|
266
|
+
if ('<>+-*/%^&,:=.?(){}[]!$'.includes(character) && character !== '') {
|
|
267
|
+
this.index += 1;
|
|
268
|
+
return { kind: 'punctuation', text: character, offset };
|
|
269
|
+
}
|
|
270
|
+
throw new ExpressionCompileError('EXPR_PARSE_ERROR', offset, `\`${character === '' ? 'end of input' : character}\` is not a token in Expr v1; check for a stray character before this point`);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/** Tokenizes Expr v1 source, refusing an unterminated literal, an unknown escape or an over-budget source. */
|
|
274
|
+
export function tokenize(source) {
|
|
275
|
+
return new Lexer(source).tokenize();
|
|
276
|
+
}
|
|
277
|
+
//# sourceMappingURL=lexer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lexer.js","sourceRoot":"","sources":["../../src/expr/lexer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,wEAAwE;AACxE,MAAM,QAAQ,GAAG;IACf,KAAK;IACL,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,OAAO;IACP,SAAS;IACT,MAAM;IACN,SAAS;IACT,OAAO;CACC,CAAC;AAIX;;;;GAIG;AACH,MAAM,CAAC,M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KAAK,IAAI;gBACP,MAAM,IAAI,sBAAsB,CAC9B,kBAAkB,EAClB,MAAM,EACN,6EAA6E,EAC7E,CAAC,IAAI,EAAE,IAAI,CAAC,CACb,CAAC;YACJ;gBACE,MAAM;QACV,CAAC;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC9B,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;YACvB,MAAM,IAAI,sBAAsB,CAC9B,kBAAkB,EAClB,MAAM,EACN,uEAAuE,EACvE,CAAC,IAAI,CAAC,CACP,CAAC;QACJ,CAAC;QACD,IAAI,wBAAwB,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,KAAK,EAAE,EAAE,CAAC;YACrE,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;YAChB,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAwB,EAAE,MAAM,EAAE,CAAC;QACzE,CAAC;QACD,MAAM,IAAI,sBAAsB,CAC9B,kBAAkB,EAClB,MAAM,EACN,KAAK,SAAS,KAAK,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,6EAA6E,CAChI,CAAC;IACJ,CAAC;CACF;AAED,8GAA8G;AAC9G,MAAM,UAAU,QAAQ,CAAC,MAAc;IACrC,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC;AACtC,CAAC","sourcesContent":["import { asDecimalString, parseDecimal } from '@azx-pbc/axiom-runtime';\nimport { ExpressionCompileError } from './diagnostics.js';\n\n/** The reserved words. `UNKNOWN`/`DEFERRED` are deliberately absent. */\nconst KEYWORDS = [\n 'and',\n 'or',\n 'not',\n 'if',\n 'in',\n 'null',\n 'None',\n 'nil',\n 'true',\n 'false',\n 'decimal',\n 'date',\n 'instant',\n 'money',\n] as const;\n\ntype Keyword = (typeof KEYWORDS)[number];\n\n/**\n * The reserved words as a membership test. A path segment drawn from this set has no source\n * spelling: the lexer reads the word as the keyword it is, so an emitter refuses it rather than\n * write text that parses as a different expression.\n */\nexport const EXPR_RESERVED_WORDS: ReadonlySet<string> = new Set<string>(KEYWORDS);\n\nfunction isKeyword(text: string): text is Keyword {\n return EXPR_RESERVED_WORDS.has(text);\n}\n\nexport type Punctuation =\n | '??'\n | '=='\n | '!='\n | '<='\n | '>='\n | '<>'\n | '<'\n | '>'\n | '='\n | '!'\n | '+'\n | '-'\n | '*'\n | '**'\n | '/'\n | '%'\n | '//'\n | '^'\n | '?'\n | '&'\n | '&&'\n | '||'\n | '('\n | ')'\n | ','\n | ':'\n | '.'\n | '['\n | ']'\n | '{'\n | '}'\n | '$';\n\nexport type Token =\n | {\n readonly kind: 'integer';\n readonly text: string;\n readonly value: number;\n readonly offset: number;\n }\n | {\n readonly kind: 'decimal';\n readonly text: string;\n /** Canonical decimal text. */\n readonly value: string;\n readonly offset: number;\n }\n | {\n readonly kind: 'string';\n readonly text: string;\n readonly value: string;\n readonly offset: number;\n }\n | { readonly kind: 'identifier'; readonly text: string; readonly offset: number }\n | { readonly kind: 'keyword'; readonly text: Keyword; readonly offset: number }\n | { readonly kind: 'punctuation'; readonly text: Punctuation; readonly offset: number }\n | { readonly kind: 'eof'; readonly text: ''; readonly offset: number };\n\n/** Source token budget. */\nexport const MAX_SOURCE_TOKENS: number = 4000;\n\nfunction isIdentifierStart(character: string): boolean {\n return /[A-Za-z_]/.test(character);\n}\n\nfunction isIdentifierPart(character: string): boolean {\n return /[A-Za-z0-9_]/.test(character);\n}\n\nfunction isDigit(character: string): boolean {\n return /[0-9]/.test(character);\n}\n\nfunction isWhitespace(character: string): boolean {\n return character === ' ' || character === '\\t' || character === '\\r' || character === '\\n';\n}\n\n/** One hexadecimal digit's value, or `undefined` when the character is not one. */\nfunction hexValue(character: string): number | undefined {\n if (/[0-9]/.test(character)) return Number(character);\n if (/[a-fA-F]/.test(character)) return character.toLowerCase().charCodeAt(0) - 87;\n return undefined;\n}\n\nclass Lexer {\n private readonly source: string;\n private index = 0;\n private readonly tokens: Token[] = [];\n\n constructor(source: string) {\n this.source = source;\n }\n\n tokenize(): readonly Token[] {\n for (;;) {\n this.skipTrivia();\n if (this.index >= this.source.length) break;\n const token = this.readToken();\n this.tokens.push(token);\n if (this.tokens.length > MAX_SOURCE_TOKENS) {\n throw new ExpressionCompileError(\n 'COST_BUDGET_EXCEEDED',\n token.offset,\n `the expression exceeds the ${String(MAX_SOURCE_TOKENS)}-token source budget; split it into named intermediate rules`,\n );\n }\n }\n this.tokens.push({ kind: 'eof', text: '', offset: this.source.length });\n return this.tokens;\n }\n\n private peek(offset = 0): string {\n return this.source[this.index + offset] ?? '';\n }\n\n private skipTrivia(): void {\n for (;;) {\n const character = this.peek();\n if (isWhitespace(character)) {\n this.index += 1;\n continue;\n }\n // An expression has one normal form, the AST, and the AST carries no comment: a note in\n // the source would survive only until the first structural edit and then disappear.\n // The refusal names where a note does survive, so the author is not left to guess.\n if (character === '#' || (character === '/' && this.peek(1) === '*')) {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n this.index,\n \"a comment is not part of an expression; an expression is stored as an AST, so put the note in the field's or rule's `descriptionKey`, in a message in the catalogue, or as a `#` comment in the YAML authoring file\",\n );\n }\n return;\n }\n }\n\n private readToken(): Token {\n const character = this.peek();\n if (isDigit(character)) return this.readNumber();\n if (isIdentifierStart(character)) return this.readWord();\n if (character === '\"' || character === \"'\") return this.readString();\n return this.readPunctuation();\n }\n\n private readNumber(): Token {\n const offset = this.index;\n const start = this.index;\n while (isDigit(this.peek())) this.index += 1;\n const whole = this.source.slice(start, this.index);\n if (whole.length > 1 && whole.startsWith('0')) {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n offset,\n `\\`${whole}\\` has a leading zero; a numeric literal is written without one`,\n );\n }\n if (this.peek() === 'e' || this.peek() === 'E') {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n offset,\n 'Expr v1 has no exponent form; write the number in full, as `1000` rather than `1e3`',\n );\n }\n // A dot followed by an identifier start (such as `1.length`) is member/method syntax rather\n // than a decimal fraction; leaving `.` for the parser lets it refuse the member read instead\n // of misreporting a malformed decimal literal.\n if (this.peek() !== '.' || isIdentifierStart(this.peek(1))) {\n const value = Number(whole);\n if (!Number.isSafeInteger(value)) {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n offset,\n `integer \\`${whole}\\` is outside the range Expr v1 stores, -(2^53 - 1)..(2^53 - 1); write a smaller integer or a \\`decimal\\` literal`,\n );\n }\n return { kind: 'integer', text: whole, value, offset };\n }\n this.index += 1;\n const fractionStart = this.index;\n while (isDigit(this.peek())) this.index += 1;\n const fraction = this.source.slice(fractionStart, this.index);\n if (fraction === '') {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n offset,\n 'a decimal literal needs at least one digit after the point; write `1.0`, not `1.`',\n );\n }\n if (this.peek() === '.' && !isIdentifierStart(this.peek(1))) {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n this.index,\n 'a number has one decimal point at most; write `12.5`, not `1.2.5`',\n );\n }\n // canonical decimal text drops trailing fractional zeros, so `1.50`\n // and `1.5` are one value and the compiled literal is the canonical one.\n const trimmed = fraction.replace(/0+$/, '');\n const text = trimmed === '' ? whole : `${whole}.${trimmed}`;\n try {\n const canonical = asDecimalString(text);\n parseDecimal(canonical);\n return { kind: 'decimal', text, value: canonical, offset };\n } catch (error) {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n offset,\n error instanceof Error ? error.message : 'decimal literal is outside the numeric budget',\n );\n }\n }\n\n private readWord(): Token {\n const offset = this.index;\n const start = this.index;\n while (isIdentifierPart(this.peek())) this.index += 1;\n const text = this.source.slice(start, this.index);\n if (isKeyword(text)) return { kind: 'keyword', text, offset };\n return { kind: 'identifier', text, offset };\n }\n\n private readString(): Token {\n const offset = this.index;\n const quote = this.peek();\n this.index += 1;\n let value = '';\n for (;;) {\n if (this.index >= this.source.length) {\n // Name the delimiter the author opened: `'a` and `\"a` are different mistakes, and a\n // reader who typed the wrong one needs to see which closing quote is missing.\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n offset,\n `a string literal is unterminated; expected a closing \\`${quote}\\``,\n );\n }\n const character = this.peek();\n this.index += 1;\n if (character === quote) break;\n if (character !== '\\\\') {\n value += character;\n continue;\n }\n value += this.readEscape();\n }\n return { kind: 'string', text: this.source.slice(offset, this.index), value, offset };\n }\n\n private readEscape(): string {\n // The backslash is one character behind the cursor once `peek` has read the escape\n // letter, so the caret lands on the escape rather than the string's opening quote.\n const escapeOffset = this.index - 1;\n const escape = this.peek();\n this.index += 1;\n switch (escape) {\n case '\\\\':\n return '\\\\';\n case \"'\":\n return \"'\";\n case '\"':\n return '\"';\n case 'n':\n return '\\n';\n case 'r':\n return '\\r';\n case 't':\n return '\\t';\n case 'u': {\n if (this.peek() !== '{') {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n escapeOffset,\n 'a unicode escape is written `\\\\u{XXXX}`',\n );\n }\n this.index += 1;\n const start = this.index;\n let scalar = 0;\n while (this.peek() !== '}') {\n const digit = hexValue(this.peek());\n if (digit === undefined) {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n escapeOffset,\n 'a unicode escape carries one to six hexadecimal digits',\n );\n }\n scalar = scalar * 16 + digit;\n this.index += 1;\n if (this.index - start > 6) {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n escapeOffset,\n 'a unicode escape carries one to six hexadecimal digits',\n );\n }\n }\n if (this.index === start) {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n escapeOffset,\n 'a unicode escape carries one to six hexadecimal digits',\n );\n }\n this.index += 1;\n // A lone surrogate is not a Unicode scalar value, so it cannot be spelled.\n if (scalar > 0x10ffff || (scalar >= 0xd800 && scalar <= 0xdfff)) {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n escapeOffset,\n 'a unicode escape must denote a Unicode scalar value',\n );\n }\n return String.fromCodePoint(scalar);\n }\n default:\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n escapeOffset,\n `\\`\\\\${escape}\\` is not a supported escape`,\n );\n }\n }\n\n private readPunctuation(): Token {\n const offset = this.index;\n const three = this.source.slice(this.index, this.index + 3);\n // The strict forms are the language's own equality: there is no coercion, so the extra\n // `=` distinguishes nothing. They are read as the canonical token so the AST never holds\n // a spelling the printer would not emit.\n if (three === '===' || three === '!==') {\n this.index += 3;\n return { kind: 'punctuation', text: three === '===' ? '==' : '!=', offset };\n }\n const two = this.source.slice(this.index, this.index + 2);\n switch (two) {\n case '??':\n case '==':\n case '!=':\n case '<=':\n case '>=':\n case '<>':\n case '&&':\n case '||':\n case '//':\n case '**':\n this.index += 2;\n return { kind: 'punctuation', text: two as Punctuation, offset };\n case ':=':\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n offset,\n '`:=` is not an Expr v1 operator; equality is written `f_a = 2`, or `f_a == 2`',\n ['=='],\n '==',\n );\n case '=>':\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n offset,\n '`=>` is not an Expr v1 operator; write `>=` to compare or `==` for equality',\n ['==', '>='],\n );\n default:\n break;\n }\n const character = this.peek();\n if (character === '\\\\') {\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n offset,\n '`\\\\` is not an Expr v1 operator; integer division is written `a // b`',\n ['//'],\n );\n }\n if ('<>+-*/%^&,:=.?(){}[]!$'.includes(character) && character !== '') {\n this.index += 1;\n return { kind: 'punctuation', text: character as Punctuation, offset };\n }\n throw new ExpressionCompileError(\n 'EXPR_PARSE_ERROR',\n offset,\n `\\`${character === '' ? 'end of input' : character}\\` is not a token in Expr v1; check for a stray character before this point`,\n );\n }\n}\n\n/** Tokenizes Expr v1 source, refusing an unterminated literal, an unknown escape or an over-budget source. */\nexport function tokenize(source: string): readonly Token[] {\n return new Lexer(source).tokenize();\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CompileWarning } from '../compile/warning.js';
|
|
2
|
+
import type { LintFinding } from './lint.js';
|
|
3
|
+
/**
|
|
4
|
+
* The warnings one expression's static analysis adds to a compile.
|
|
5
|
+
*
|
|
6
|
+
* The document still compiles: each finding is advice about source the author can rewrite. The
|
|
7
|
+
* offset is the operand's place in that source, never a document line, so a reporter branches on
|
|
8
|
+
* `offsetSource` exactly as it does for a deprecation or an undecided fold.
|
|
9
|
+
*/
|
|
10
|
+
export declare function lintWarnings(findings: readonly LintFinding[], path: string): readonly CompileWarning[];
|
|
11
|
+
//# sourceMappingURL=lint-warnings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lint-warnings.d.ts","sourceRoot":"","sources":["../../src/expr/lint-warnings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,SAAS,WAAW,EAAE,EAChC,IAAI,EAAE,MAAM,GACX,SAAS,cAAc,EAAE,CAU3B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { diagnosticDoc } from '@azx-pbc/axiom-runtime';
|
|
2
|
+
/**
|
|
3
|
+
* The warnings one expression's static analysis adds to a compile.
|
|
4
|
+
*
|
|
5
|
+
* The document still compiles: each finding is advice about source the author can rewrite. The
|
|
6
|
+
* offset is the operand's place in that source, never a document line, so a reporter branches on
|
|
7
|
+
* `offsetSource` exactly as it does for a deprecation or an undecided fold.
|
|
8
|
+
*/
|
|
9
|
+
export function lintWarnings(findings, path) {
|
|
10
|
+
return findings.map((finding) => ({
|
|
11
|
+
code: finding.code,
|
|
12
|
+
path,
|
|
13
|
+
detail: finding.detail,
|
|
14
|
+
messageKey: diagnosticDoc(finding.code).messageKey,
|
|
15
|
+
suggestions: [],
|
|
16
|
+
offset: finding.offset,
|
|
17
|
+
offsetSource: 'expression',
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=lint-warnings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lint-warnings.js","sourceRoot":"","sources":["../../src/expr/lint-warnings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIvD;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,QAAgC,EAChC,IAAY;IAEZ,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAChC,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,IAAI;QACJ,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,UAAU;QAClD,WAAW,EAAE,EAAE;QACf,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,YAAY,EAAE,YAAY;KAC3B,CAAC,CAAC,CAAC;AACN,CAAC","sourcesContent":["import { diagnosticDoc } from '@azx-pbc/axiom-runtime';\nimport type { CompileWarning } from '../compile/warning.js';\nimport type { LintFinding } from './lint.js';\n\n/**\n * The warnings one expression's static analysis adds to a compile.\n *\n * The document still compiles: each finding is advice about source the author can rewrite. The\n * offset is the operand's place in that source, never a document line, so a reporter branches on\n * `offsetSource` exactly as it does for a deprecation or an undecided fold.\n */\nexport function lintWarnings(\n findings: readonly LintFinding[],\n path: string,\n): readonly CompileWarning[] {\n return findings.map((finding) => ({\n code: finding.code,\n path,\n detail: finding.detail,\n messageKey: diagnosticDoc(finding.code).messageKey,\n suggestions: [],\n offset: finding.offset,\n offsetSource: 'expression',\n }));\n}\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ExprNode, ExpressionDeclarations, LiteralDomain, WireValue } from '@azx-pbc/axiom-runtime';
|
|
2
|
+
import type { CheckContext } from './typecheck/context.js';
|
|
3
|
+
/**
|
|
4
|
+
* The static analysis that pays for itself: literal constant folding, a small range algebra and
|
|
5
|
+
* the contradictions those two can prove.
|
|
6
|
+
*
|
|
7
|
+
* No solver and no fixpoint engine. The folder evaluates a closed expression over literals; the
|
|
8
|
+
* range table states the bounds of a handful of built-ins whose result cannot leave them; the
|
|
9
|
+
* contradiction walk reads conjunction and disjunction atoms over one path. Everything else is
|
|
10
|
+
* deliberately left to the type checker or to evaluation.
|
|
11
|
+
*/
|
|
12
|
+
/** One literal value and the domain its node or operator states. */
|
|
13
|
+
export interface Constant {
|
|
14
|
+
readonly domain: LiteralDomain;
|
|
15
|
+
readonly value: WireValue;
|
|
16
|
+
}
|
|
17
|
+
/** The warnings this pass can add beside a compiled slot. */
|
|
18
|
+
type LintWarningCode = 'CONSTANT_COMPARISON' | 'UNSATISFIABLE_CONDITION' | 'REDUNDANT_CONDITION';
|
|
19
|
+
export interface LintFinding {
|
|
20
|
+
readonly code: LintWarningCode;
|
|
21
|
+
readonly offset: number;
|
|
22
|
+
readonly detail: string;
|
|
23
|
+
}
|
|
24
|
+
/** The declared field a path names, resolved through the same index the type checker uses. */
|
|
25
|
+
export type LintContext = Pick<CheckContext, 'offsetOf' | 'fields' | 'isInlinedNode'>;
|
|
26
|
+
/**
|
|
27
|
+
* Folds an expression whose every leaf is a literal, or answers `undefined` when any leaf is not
|
|
28
|
+
* a literal or an operation is outside the folder's small vocabulary.
|
|
29
|
+
*/
|
|
30
|
+
export declare function constantOf(node: ExprNode): Constant | undefined;
|
|
31
|
+
/** The literal-free reason a boolean expression can never fire, when one is provable. */
|
|
32
|
+
export declare function conditionNeverFires(node: ExprNode, declarations?: ExpressionDeclarations): string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* The findings one expression earns, errors included.
|
|
35
|
+
*
|
|
36
|
+
* A literal error throws the same `ExpressionCompileError` the type checker throws, so a caller
|
|
37
|
+
* sees one diagnostic shape. Warnings are returned because the document still compiles.
|
|
38
|
+
*/
|
|
39
|
+
export declare function analyseExpression(ctx: LintContext, node: ExprNode): readonly LintFinding[];
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=lint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/expr/lint.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAGV,QAAQ,EACR,sBAAsB,EACtB,aAAa,EACb,SAAS,EACV,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI3D;;;;;;;;GAQG;AAEH,oEAAoE;AACpE,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;CAC3B;AAED,6DAA6D;AAC7D,KAAK,eAAe,GAAG,qBAAqB,GAAG,yBAAyB,GAAG,qBAAqB,CAAC;AAEjG,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,8FAA8F;AAC9F,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,QAAQ,GAAG,eAAe,CAAC,CAAC;AA+ItF;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAQ/D;AAkyBD,yFAAyF;AACzF,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,QAAQ,EACd,YAAY,CAAC,EAAE,sBAAsB,GACpC,MAAM,GAAG,SAAS,CAapB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,WAAW,EAAE,CAI1F"}
|