@elaraai/east 0.0.1-beta.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +15 -666
- package/README.md +113 -88
- package/dist/src/analyze.d.ts +3 -0
- package/dist/src/analyze.d.ts.map +1 -1
- package/dist/src/analyze.js +223 -111
- package/dist/src/analyze.js.map +1 -1
- package/dist/src/analyze.spec.d.ts +2 -0
- package/dist/src/analyze.spec.d.ts.map +1 -0
- package/dist/src/analyze.spec.js +445 -0
- package/dist/src/analyze.spec.js.map +1 -0
- package/dist/src/ast.d.ts +54 -35
- package/dist/src/ast.d.ts.map +1 -1
- package/dist/src/ast_to_ir.coerce_to.spec.d.ts +15 -0
- package/dist/src/ast_to_ir.coerce_to.spec.d.ts.map +1 -0
- package/dist/src/ast_to_ir.coerce_to.spec.js +420 -0
- package/dist/src/ast_to_ir.coerce_to.spec.js.map +1 -0
- package/dist/src/ast_to_ir.d.ts +18 -4
- package/dist/src/ast_to_ir.d.ts.map +1 -1
- package/dist/src/ast_to_ir.js +233 -178
- package/dist/src/ast_to_ir.js.map +1 -1
- package/dist/src/builtins.d.ts +1 -1
- package/dist/src/builtins.d.ts.map +1 -1
- package/dist/src/builtins.js +194 -2
- package/dist/src/builtins.js.map +1 -1
- package/dist/src/comparison.d.ts +2 -2
- package/dist/src/comparison.d.ts.map +1 -1
- package/dist/src/comparison.js +115 -40
- package/dist/src/comparison.js.map +1 -1
- package/dist/src/comparison.spec.d.ts +2 -0
- package/dist/src/comparison.spec.d.ts.map +1 -0
- package/dist/src/comparison.spec.js +1200 -0
- package/dist/src/comparison.spec.js.map +1 -0
- package/dist/src/compile.d.ts +31 -9
- package/dist/src/compile.d.ts.map +1 -1
- package/dist/src/compile.js +1048 -548
- package/dist/src/compile.js.map +1 -1
- package/dist/src/containers/matrix.d.ts +15 -0
- package/dist/src/containers/matrix.d.ts.map +1 -0
- package/dist/src/containers/matrix.js +15 -0
- package/dist/src/containers/matrix.js.map +1 -0
- package/dist/src/containers/ref.d.ts.map +1 -1
- package/dist/src/containers/ref.js +1 -1
- package/dist/src/containers/ref.js.map +1 -1
- package/dist/src/containers/sortedmap.spec.d.ts +2 -0
- package/dist/src/containers/sortedmap.spec.d.ts.map +1 -0
- package/dist/src/containers/sortedmap.spec.js +180 -0
- package/dist/src/containers/sortedmap.spec.js.map +1 -0
- package/dist/src/containers/sortedset.spec.d.ts +2 -0
- package/dist/src/containers/sortedset.spec.d.ts.map +1 -0
- package/dist/src/containers/sortedset.spec.js +228 -0
- package/dist/src/containers/sortedset.spec.js.map +1 -0
- package/dist/src/containers/variant.d.ts.map +1 -1
- package/dist/src/containers/variant.js +1 -1
- package/dist/src/containers/variant.js.map +1 -1
- package/dist/src/containers/variant.spec.d.ts +2 -0
- package/dist/src/containers/variant.spec.d.ts.map +1 -0
- package/dist/src/containers/variant.spec.js +217 -0
- package/dist/src/containers/variant.spec.js.map +1 -0
- package/dist/src/datetime_format/parse.spec.d.ts +6 -0
- package/dist/src/datetime_format/parse.spec.d.ts.map +1 -0
- package/dist/src/datetime_format/parse.spec.js +379 -0
- package/dist/src/datetime_format/parse.spec.js.map +1 -0
- package/dist/src/datetime_format/print.spec.d.ts +6 -0
- package/dist/src/datetime_format/print.spec.d.ts.map +1 -0
- package/dist/src/datetime_format/print.spec.js +257 -0
- package/dist/src/datetime_format/print.spec.js.map +1 -0
- package/dist/src/datetime_format/tokenize.spec.d.ts +2 -0
- package/dist/src/datetime_format/tokenize.spec.d.ts.map +1 -0
- package/dist/src/datetime_format/tokenize.spec.js +508 -0
- package/dist/src/datetime_format/tokenize.spec.js.map +1 -0
- package/dist/src/datetime_format/types.d.ts +23 -23
- package/dist/src/default.d.ts.map +1 -1
- package/dist/src/default.js +33 -0
- package/dist/src/default.js.map +1 -1
- package/dist/src/default.spec.d.ts +2 -0
- package/dist/src/default.spec.d.ts.map +1 -0
- package/dist/src/default.spec.js +178 -0
- package/dist/src/default.spec.js.map +1 -0
- package/dist/src/eastir.d.ts +7 -0
- package/dist/src/eastir.d.ts.map +1 -1
- package/dist/src/eastir.js +55 -7
- package/dist/src/eastir.js.map +1 -1
- package/dist/src/error.d.ts +14 -4
- package/dist/src/error.d.ts.map +1 -1
- package/dist/src/error.js +28 -3
- package/dist/src/error.js.map +1 -1
- package/dist/src/example.d.ts +87 -0
- package/dist/src/example.d.ts.map +1 -0
- package/dist/src/example.js +18 -0
- package/dist/src/example.js.map +1 -0
- package/dist/src/expr/array.d.ts +43 -1
- package/dist/src/expr/array.d.ts.map +1 -1
- package/dist/src/expr/array.js +103 -53
- package/dist/src/expr/array.js.map +1 -1
- package/dist/src/expr/ast.d.ts +1 -1
- package/dist/src/expr/ast.d.ts.map +1 -1
- package/dist/src/expr/ast.js +112 -54
- package/dist/src/expr/ast.js.map +1 -1
- package/dist/src/expr/asyncfunction.d.ts.map +1 -1
- package/dist/src/expr/asyncfunction.js +6 -4
- package/dist/src/expr/asyncfunction.js.map +1 -1
- package/dist/src/expr/blob.d.ts +48 -0
- package/dist/src/expr/blob.d.ts.map +1 -1
- package/dist/src/expr/blob.js +63 -8
- package/dist/src/expr/blob.js.map +1 -1
- package/dist/src/expr/block.d.ts +213 -12
- package/dist/src/expr/block.d.ts.map +1 -1
- package/dist/src/expr/block.js +796 -293
- package/dist/src/expr/block.js.map +1 -1
- package/dist/src/expr/boolean.d.ts +44 -0
- package/dist/src/expr/boolean.d.ts.map +1 -1
- package/dist/src/expr/boolean.js +58 -6
- package/dist/src/expr/boolean.js.map +1 -1
- package/dist/src/expr/datetime.d.ts +135 -0
- package/dist/src/expr/datetime.d.ts.map +1 -1
- package/dist/src/expr/datetime.js +184 -34
- package/dist/src/expr/datetime.js.map +1 -1
- package/dist/src/expr/dict.d.ts +47 -2
- package/dist/src/expr/dict.d.ts.map +1 -1
- package/dist/src/expr/dict.js +122 -61
- package/dist/src/expr/dict.js.map +1 -1
- package/dist/src/expr/expr.d.ts +3 -1
- package/dist/src/expr/expr.d.ts.map +1 -1
- package/dist/src/expr/expr.js +4 -3
- package/dist/src/expr/expr.js.map +1 -1
- package/dist/src/expr/float.d.ts +153 -0
- package/dist/src/expr/float.d.ts.map +1 -1
- package/dist/src/expr/float.js +191 -17
- package/dist/src/expr/float.js.map +1 -1
- package/dist/src/expr/function.d.ts +7 -2
- package/dist/src/expr/function.d.ts.map +1 -1
- package/dist/src/expr/function.js +6 -4
- package/dist/src/expr/function.js.map +1 -1
- package/dist/src/expr/index.d.ts +186 -2
- package/dist/src/expr/index.d.ts.map +1 -1
- package/dist/src/expr/index.js +183 -2
- package/dist/src/expr/index.js.map +1 -1
- package/dist/src/expr/integer.d.ts +180 -0
- package/dist/src/expr/integer.d.ts.map +1 -1
- package/dist/src/expr/integer.js +189 -18
- package/dist/src/expr/integer.js.map +1 -1
- package/dist/src/expr/libs/array.js +3 -3
- package/dist/src/expr/libs/array.js.map +1 -1
- package/dist/src/expr/libs/blob.js +3 -3
- package/dist/src/expr/libs/blob.js.map +1 -1
- package/dist/src/expr/libs/dict.js +1 -1
- package/dist/src/expr/libs/dict.js.map +1 -1
- package/dist/src/expr/libs/matrix.d.ts +17 -0
- package/dist/src/expr/libs/matrix.d.ts.map +1 -0
- package/dist/src/expr/libs/matrix.js +60 -0
- package/dist/src/expr/libs/matrix.js.map +1 -0
- package/dist/src/expr/libs/set.js +1 -1
- package/dist/src/expr/libs/set.js.map +1 -1
- package/dist/src/expr/libs/string.d.ts.map +1 -1
- package/dist/src/expr/libs/string.js +2 -1
- package/dist/src/expr/libs/string.js.map +1 -1
- package/dist/src/expr/libs/vector.d.ts +16 -0
- package/dist/src/expr/libs/vector.d.ts.map +1 -0
- package/dist/src/expr/libs/vector.js +44 -0
- package/dist/src/expr/libs/vector.js.map +1 -0
- package/dist/src/expr/matrix.d.ts +109 -0
- package/dist/src/expr/matrix.d.ts.map +1 -0
- package/dist/src/expr/matrix.js +224 -0
- package/dist/src/expr/matrix.js.map +1 -0
- package/dist/src/expr/recursive.d.ts +83 -0
- package/dist/src/expr/recursive.d.ts.map +1 -0
- package/dist/src/expr/recursive.js +99 -0
- package/dist/src/expr/recursive.js.map +1 -0
- package/dist/src/expr/ref.js +5 -5
- package/dist/src/expr/ref.js.map +1 -1
- package/dist/src/expr/set.d.ts +44 -2
- package/dist/src/expr/set.d.ts.map +1 -1
- package/dist/src/expr/set.js +102 -52
- package/dist/src/expr/set.js.map +1 -1
- package/dist/src/expr/string.d.ts +134 -0
- package/dist/src/expr/string.d.ts.map +1 -1
- package/dist/src/expr/string.js +173 -23
- package/dist/src/expr/string.js.map +1 -1
- package/dist/src/expr/struct.d.ts +1 -1
- package/dist/src/expr/struct.d.ts.map +1 -1
- package/dist/src/expr/struct.js +2 -2
- package/dist/src/expr/struct.js.map +1 -1
- package/dist/src/expr/types.d.ts +12 -9
- package/dist/src/expr/types.d.ts.map +1 -1
- package/dist/src/expr/variant.d.ts +108 -11
- package/dist/src/expr/variant.d.ts.map +1 -1
- package/dist/src/expr/variant.js +76 -38
- package/dist/src/expr/variant.js.map +1 -1
- package/dist/src/expr/vector.d.ts +102 -0
- package/dist/src/expr/vector.d.ts.map +1 -0
- package/dist/src/expr/vector.js +202 -0
- package/dist/src/expr/vector.js.map +1 -0
- package/dist/src/fuzz.d.ts +36 -2
- package/dist/src/fuzz.d.ts.map +1 -1
- package/dist/src/fuzz.js +409 -77
- package/dist/src/fuzz.js.map +1 -1
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +12 -2
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +13 -2
- package/dist/src/internal.js.map +1 -1
- package/dist/src/ir.d.ts +1754 -1484
- package/dist/src/ir.d.ts.map +1 -1
- package/dist/src/ir.js +51 -34
- package/dist/src/ir.js.map +1 -1
- package/dist/src/ir.spec.d.ts +2 -0
- package/dist/src/ir.spec.d.ts.map +1 -0
- package/dist/src/ir.spec.js +35 -0
- package/dist/src/ir.spec.js.map +1 -0
- package/dist/src/location.d.ts +56 -17
- package/dist/src/location.d.ts.map +1 -1
- package/dist/src/location.js +226 -29
- package/dist/src/location.js.map +1 -1
- package/dist/src/location.spec.d.ts +2 -0
- package/dist/src/location.spec.d.ts.map +1 -0
- package/dist/src/location.spec.js +102 -0
- package/dist/src/location.spec.js.map +1 -0
- package/dist/src/patch/apply.d.ts +15 -0
- package/dist/src/patch/apply.d.ts.map +1 -0
- package/dist/src/patch/apply.js +352 -0
- package/dist/src/patch/apply.js.map +1 -0
- package/dist/src/patch/compose.d.ts +15 -0
- package/dist/src/patch/compose.d.ts.map +1 -0
- package/dist/src/patch/compose.js +448 -0
- package/dist/src/patch/compose.js.map +1 -0
- package/dist/src/patch/diff.d.ts +15 -0
- package/dist/src/patch/diff.d.ts.map +1 -0
- package/dist/src/patch/diff.js +347 -0
- package/dist/src/patch/diff.js.map +1 -0
- package/dist/src/patch/fuzz.d.ts +73 -0
- package/dist/src/patch/fuzz.d.ts.map +1 -0
- package/dist/src/patch/fuzz.js +159 -0
- package/dist/src/patch/fuzz.js.map +1 -0
- package/dist/src/patch/index.d.ts +32 -0
- package/dist/src/patch/index.d.ts.map +1 -0
- package/dist/src/patch/index.js +48 -0
- package/dist/src/patch/index.js.map +1 -0
- package/dist/src/patch/invert.d.ts +15 -0
- package/dist/src/patch/invert.d.ts.map +1 -0
- package/dist/src/patch/invert.js +284 -0
- package/dist/src/patch/invert.js.map +1 -0
- package/dist/src/patch/merge.d.ts +56 -0
- package/dist/src/patch/merge.d.ts.map +1 -0
- package/dist/src/patch/merge.js +586 -0
- package/dist/src/patch/merge.js.map +1 -0
- package/dist/src/patch/merge.spec.d.ts +2 -0
- package/dist/src/patch/merge.spec.d.ts.map +1 -0
- package/dist/src/patch/merge.spec.js +1139 -0
- package/dist/src/patch/merge.spec.js.map +1 -0
- package/dist/src/patch/patch.spec.d.ts +2 -0
- package/dist/src/patch/patch.spec.d.ts.map +1 -0
- package/dist/src/patch/patch.spec.js +452 -0
- package/dist/src/patch/patch.spec.js.map +1 -0
- package/dist/src/patch/path.d.ts +115 -0
- package/dist/src/patch/path.d.ts.map +1 -0
- package/dist/src/patch/path.js +192 -0
- package/dist/src/patch/path.js.map +1 -0
- package/dist/src/patch/path.spec.d.ts +6 -0
- package/dist/src/patch/path.spec.d.ts.map +1 -0
- package/dist/src/patch/path.spec.js +322 -0
- package/dist/src/patch/path.spec.js.map +1 -0
- package/dist/src/patch/prune.d.ts +77 -0
- package/dist/src/patch/prune.d.ts.map +1 -0
- package/dist/src/patch/prune.js +115 -0
- package/dist/src/patch/prune.js.map +1 -0
- package/dist/src/patch/prune.spec.d.ts +6 -0
- package/dist/src/patch/prune.spec.d.ts.map +1 -0
- package/dist/src/patch/prune.spec.js +473 -0
- package/dist/src/patch/prune.spec.js.map +1 -0
- package/dist/src/patch/type_of_patch.d.ts +25 -0
- package/dist/src/patch/type_of_patch.d.ts.map +1 -0
- package/dist/src/patch/type_of_patch.js +144 -0
- package/dist/src/patch/type_of_patch.js.map +1 -0
- package/dist/src/patch/types.d.ts +220 -0
- package/dist/src/patch/types.d.ts.map +1 -0
- package/dist/src/patch/types.js +62 -0
- package/dist/src/patch/types.js.map +1 -0
- package/dist/src/patch/validate.d.ts +44 -0
- package/dist/src/patch/validate.d.ts.map +1 -0
- package/dist/src/patch/validate.js +190 -0
- package/dist/src/patch/validate.js.map +1 -0
- package/dist/src/patch/validate.spec.d.ts +6 -0
- package/dist/src/patch/validate.spec.d.ts.map +1 -0
- package/dist/src/patch/validate.spec.js +225 -0
- package/dist/src/patch/validate.spec.js.map +1 -0
- package/dist/src/patch/walk.d.ts +121 -0
- package/dist/src/patch/walk.d.ts.map +1 -0
- package/dist/src/patch/walk.js +385 -0
- package/dist/src/patch/walk.js.map +1 -0
- package/dist/src/patch/walk.spec.d.ts +6 -0
- package/dist/src/patch/walk.spec.d.ts.map +1 -0
- package/dist/src/patch/walk.spec.js +621 -0
- package/dist/src/patch/walk.spec.js.map +1 -0
- package/dist/src/platform.d.ts +6 -0
- package/dist/src/platform.d.ts.map +1 -1
- package/dist/src/platform.spec.d.ts +2 -0
- package/dist/src/platform.spec.d.ts.map +1 -0
- package/dist/src/platform.spec.js +330 -0
- package/dist/src/platform.spec.js.map +1 -0
- package/dist/src/serialization/beast.d.ts.map +1 -1
- package/dist/src/serialization/beast.js +12 -0
- package/dist/src/serialization/beast.js.map +1 -1
- package/dist/src/serialization/beast.spec.d.ts +6 -0
- package/dist/src/serialization/beast.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast.spec.js +406 -0
- package/dist/src/serialization/beast.spec.js.map +1 -0
- package/dist/src/serialization/beast2/index.d.ts +50 -0
- package/dist/src/serialization/beast2/index.d.ts.map +1 -0
- package/dist/src/serialization/beast2/index.js +756 -0
- package/dist/src/serialization/beast2/index.js.map +1 -0
- package/dist/src/serialization/beast2/index.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/index.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/index.spec.js +528 -0
- package/dist/src/serialization/beast2/index.spec.js.map +1 -0
- package/dist/src/serialization/beast2/sourcemap-table.d.ts +29 -0
- package/dist/src/serialization/beast2/sourcemap-table.d.ts.map +1 -0
- package/dist/src/serialization/beast2/sourcemap-table.js +82 -0
- package/dist/src/serialization/beast2/sourcemap-table.js.map +1 -0
- package/dist/src/serialization/beast2/string-table.d.ts +16 -0
- package/dist/src/serialization/beast2/string-table.d.ts.map +1 -0
- package/dist/src/serialization/beast2/string-table.js +38 -0
- package/dist/src/serialization/beast2/string-table.js.map +1 -0
- package/dist/src/serialization/beast2/type-table.d.ts +86 -0
- package/dist/src/serialization/beast2/type-table.d.ts.map +1 -0
- package/dist/src/serialization/beast2/type-table.js +618 -0
- package/dist/src/serialization/beast2/type-table.js.map +1 -0
- package/dist/src/serialization/beast2/value-table.d.ts +40 -0
- package/dist/src/serialization/beast2/value-table.d.ts.map +1 -0
- package/dist/src/serialization/beast2/value-table.js +157 -0
- package/dist/src/serialization/beast2/value-table.js.map +1 -0
- package/dist/src/serialization/binary-utils.d.ts +33 -0
- package/dist/src/serialization/binary-utils.d.ts.map +1 -1
- package/dist/src/serialization/binary-utils.js +157 -0
- package/dist/src/serialization/binary-utils.js.map +1 -1
- package/dist/src/serialization/csv.d.ts +17 -17
- package/dist/src/serialization/csv.d.ts.map +1 -1
- package/dist/src/serialization/csv.js +10 -8
- package/dist/src/serialization/csv.js.map +1 -1
- package/dist/src/serialization/csv.spec.d.ts +2 -0
- package/dist/src/serialization/csv.spec.d.ts.map +1 -0
- package/dist/src/serialization/csv.spec.js +556 -0
- package/dist/src/serialization/csv.spec.js.map +1 -0
- package/dist/src/serialization/east-inferred.spec.d.ts +2 -0
- package/dist/src/serialization/east-inferred.spec.d.ts.map +1 -0
- package/dist/src/serialization/east-inferred.spec.js +322 -0
- package/dist/src/serialization/east-inferred.spec.js.map +1 -0
- package/dist/src/serialization/east.d.ts +1 -1
- package/dist/src/serialization/east.d.ts.map +1 -1
- package/dist/src/serialization/east.js +178 -26
- package/dist/src/serialization/east.js.map +1 -1
- package/dist/src/serialization/east.spec.d.ts +2 -0
- package/dist/src/serialization/east.spec.d.ts.map +1 -0
- package/dist/src/serialization/east.spec.js +1548 -0
- package/dist/src/serialization/east.spec.js.map +1 -0
- package/dist/src/serialization/index.d.ts +1 -2
- package/dist/src/serialization/index.d.ts.map +1 -1
- package/dist/src/serialization/index.js +1 -2
- package/dist/src/serialization/index.js.map +1 -1
- package/dist/src/serialization/json.d.ts +1 -1
- package/dist/src/serialization/json.d.ts.map +1 -1
- package/dist/src/serialization/json.js +123 -24
- package/dist/src/serialization/json.js.map +1 -1
- package/dist/src/serialization/json.spec.d.ts +2 -0
- package/dist/src/serialization/json.spec.d.ts.map +1 -0
- package/dist/src/serialization/json.spec.js +1297 -0
- package/dist/src/serialization/json.spec.js.map +1 -0
- package/dist/src/type_of_type.d.ts +72 -35
- package/dist/src/type_of_type.d.ts.map +1 -1
- package/dist/src/type_of_type.is_data.spec.d.ts +6 -0
- package/dist/src/type_of_type.is_data.spec.d.ts.map +1 -0
- package/dist/src/type_of_type.is_data.spec.js +221 -0
- package/dist/src/type_of_type.is_data.spec.js.map +1 -0
- package/dist/src/type_of_type.js +355 -80
- package/dist/src/type_of_type.js.map +1 -1
- package/dist/src/type_of_type.to_etv.spec.d.ts +6 -0
- package/dist/src/type_of_type.to_etv.spec.d.ts.map +1 -0
- package/dist/src/type_of_type.to_etv.spec.js +263 -0
- package/dist/src/type_of_type.to_etv.spec.js.map +1 -0
- package/dist/src/types.d.ts +82 -12
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.error.spec.d.ts +2 -0
- package/dist/src/types.error.spec.d.ts.map +1 -0
- package/dist/src/types.error.spec.js +665 -0
- package/dist/src/types.error.spec.js.map +1 -0
- package/dist/src/types.js +663 -156
- package/dist/src/types.js.map +1 -1
- package/dist/src/types.spec.d.ts +2 -0
- package/dist/src/types.spec.d.ts.map +1 -0
- package/dist/src/types.spec.js +946 -0
- package/dist/src/types.spec.js.map +1 -0
- package/dist/src/walker.d.ts +65 -0
- package/dist/src/walker.d.ts.map +1 -0
- package/dist/src/walker.js +165 -0
- package/dist/src/walker.js.map +1 -0
- package/dist/src/walker.spec.d.ts +6 -0
- package/dist/src/walker.spec.d.ts.map +1 -0
- package/dist/src/walker.spec.js +109 -0
- package/dist/src/walker.spec.js.map +1 -0
- package/package.json +16 -38
- package/dist/src/serialization/beast2-stream.d.ts +0 -38
- package/dist/src/serialization/beast2-stream.d.ts.map +0 -1
- package/dist/src/serialization/beast2-stream.js +0 -670
- package/dist/src/serialization/beast2-stream.js.map +0 -1
- package/dist/src/serialization/beast2.d.ts +0 -41
- package/dist/src/serialization/beast2.d.ts.map +0 -1
- package/dist/src/serialization/beast2.js +0 -495
- package/dist/src/serialization/beast2.js.map +0 -1
|
@@ -6,6 +6,7 @@ import type { AST } from "../ast.js";
|
|
|
6
6
|
import { FloatType, IntegerType } from "../types.js";
|
|
7
7
|
import { Expr, type ToExpr } from "./expr.js";
|
|
8
8
|
import type { FloatExpr } from "./float.js";
|
|
9
|
+
import type { BooleanExpr } from "./boolean.js";
|
|
9
10
|
/**
|
|
10
11
|
* Expression representing integer values and operations.
|
|
11
12
|
*
|
|
@@ -252,5 +253,184 @@ export declare class IntegerExpr extends Expr<IntegerType> {
|
|
|
252
253
|
* ```
|
|
253
254
|
*/
|
|
254
255
|
toFloat(): FloatExpr;
|
|
256
|
+
/**
|
|
257
|
+
* Checks if this integer equals another value.
|
|
258
|
+
*
|
|
259
|
+
* @param other - The value to compare against
|
|
260
|
+
* @returns A BooleanExpr that is true if the values are equal
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* ```ts
|
|
264
|
+
* const isEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
265
|
+
* $.return(a.equals(b));
|
|
266
|
+
* });
|
|
267
|
+
* const compiled = East.compile(isEqual.toIR(), []);
|
|
268
|
+
* compiled(5n, 5n); // true
|
|
269
|
+
* compiled(5n, 3n); // false
|
|
270
|
+
* ```
|
|
271
|
+
*/
|
|
272
|
+
equals(other: IntegerExpr | bigint): BooleanExpr;
|
|
273
|
+
/**
|
|
274
|
+
* Checks if this integer does not equal another value.
|
|
275
|
+
*
|
|
276
|
+
* @param other - The value to compare against
|
|
277
|
+
* @returns A BooleanExpr that is true if the values are not equal
|
|
278
|
+
*
|
|
279
|
+
* @example
|
|
280
|
+
* ```ts
|
|
281
|
+
* const isNotEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
282
|
+
* $.return(a.notEquals(b));
|
|
283
|
+
* });
|
|
284
|
+
* const compiled = East.compile(isNotEqual.toIR(), []);
|
|
285
|
+
* compiled(5n, 3n); // true
|
|
286
|
+
* compiled(5n, 5n); // false
|
|
287
|
+
* ```
|
|
288
|
+
*/
|
|
289
|
+
notEquals(other: IntegerExpr | bigint): BooleanExpr;
|
|
290
|
+
/**
|
|
291
|
+
* Checks if this integer is greater than another value.
|
|
292
|
+
*
|
|
293
|
+
* @param other - The value to compare against
|
|
294
|
+
* @returns A BooleanExpr that is true if this value is greater
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* ```ts
|
|
298
|
+
* const isGreater = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
299
|
+
* $.return(a.greaterThan(b));
|
|
300
|
+
* });
|
|
301
|
+
* const compiled = East.compile(isGreater.toIR(), []);
|
|
302
|
+
* compiled(5n, 3n); // true
|
|
303
|
+
* compiled(3n, 5n); // false
|
|
304
|
+
* compiled(5n, 5n); // false
|
|
305
|
+
* ```
|
|
306
|
+
*/
|
|
307
|
+
greaterThan(other: IntegerExpr | bigint): BooleanExpr;
|
|
308
|
+
/**
|
|
309
|
+
* Checks if this integer is less than another value.
|
|
310
|
+
*
|
|
311
|
+
* @param other - The value to compare against
|
|
312
|
+
* @returns A BooleanExpr that is true if this value is less
|
|
313
|
+
*
|
|
314
|
+
* @example
|
|
315
|
+
* ```ts
|
|
316
|
+
* const isLess = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
317
|
+
* $.return(a.lessThan(b));
|
|
318
|
+
* });
|
|
319
|
+
* const compiled = East.compile(isLess.toIR(), []);
|
|
320
|
+
* compiled(3n, 5n); // true
|
|
321
|
+
* compiled(5n, 3n); // false
|
|
322
|
+
* compiled(5n, 5n); // false
|
|
323
|
+
* ```
|
|
324
|
+
*/
|
|
325
|
+
lessThan(other: IntegerExpr | bigint): BooleanExpr;
|
|
326
|
+
/**
|
|
327
|
+
* Checks if this integer is greater than or equal to another value.
|
|
328
|
+
*
|
|
329
|
+
* @param other - The value to compare against
|
|
330
|
+
* @returns A BooleanExpr that is true if this value is greater than or equal
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* ```ts
|
|
334
|
+
* const isGreaterOrEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
335
|
+
* $.return(a.greaterThanOrEqual(b));
|
|
336
|
+
* });
|
|
337
|
+
* const compiled = East.compile(isGreaterOrEqual.toIR(), []);
|
|
338
|
+
* compiled(5n, 3n); // true
|
|
339
|
+
* compiled(5n, 5n); // true
|
|
340
|
+
* compiled(3n, 5n); // false
|
|
341
|
+
* ```
|
|
342
|
+
*/
|
|
343
|
+
greaterThanOrEqual(other: IntegerExpr | bigint): BooleanExpr;
|
|
344
|
+
/**
|
|
345
|
+
* Checks if this integer is less than or equal to another value.
|
|
346
|
+
*
|
|
347
|
+
* @param other - The value to compare against
|
|
348
|
+
* @returns A BooleanExpr that is true if this value is less than or equal
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* ```ts
|
|
352
|
+
* const isLessOrEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
353
|
+
* $.return(a.lessThanOrEqual(b));
|
|
354
|
+
* });
|
|
355
|
+
* const compiled = East.compile(isLessOrEqual.toIR(), []);
|
|
356
|
+
* compiled(3n, 5n); // true
|
|
357
|
+
* compiled(5n, 5n); // true
|
|
358
|
+
* compiled(5n, 3n); // false
|
|
359
|
+
* ```
|
|
360
|
+
*/
|
|
361
|
+
lessThanOrEqual(other: IntegerExpr | bigint): BooleanExpr;
|
|
362
|
+
/** Alias for {@link equals} */
|
|
363
|
+
eq: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
364
|
+
/** Alias for {@link equals} */
|
|
365
|
+
equal: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
366
|
+
/** Alias for {@link notEquals} */
|
|
367
|
+
ne: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
368
|
+
/** Alias for {@link notEquals} */
|
|
369
|
+
notEqual: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
370
|
+
/** Alias for {@link greaterThan} */
|
|
371
|
+
gt: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
372
|
+
/** Alias for {@link greaterThan} */
|
|
373
|
+
greater: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
374
|
+
/** Alias for {@link lessThan} */
|
|
375
|
+
lt: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
376
|
+
/** Alias for {@link lessThan} */
|
|
377
|
+
less: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
378
|
+
/** Alias for {@link greaterThanOrEqual} */
|
|
379
|
+
gte: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
380
|
+
/** Alias for {@link greaterThanOrEqual} */
|
|
381
|
+
ge: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
382
|
+
/** Alias for {@link greaterThanOrEqual} */
|
|
383
|
+
greaterEqual: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
384
|
+
/** Alias for {@link lessThanOrEqual} */
|
|
385
|
+
lte: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
386
|
+
/** Alias for {@link lessThanOrEqual} */
|
|
387
|
+
le: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
388
|
+
/** Alias for {@link lessThanOrEqual} */
|
|
389
|
+
lessEqual: (other: IntegerExpr | bigint) => BooleanExpr;
|
|
390
|
+
/** Alias for {@link add} */
|
|
391
|
+
plus: {
|
|
392
|
+
(y: Expr<IntegerType> | bigint): IntegerExpr;
|
|
393
|
+
(y: Expr<FloatType> | number): FloatExpr;
|
|
394
|
+
};
|
|
395
|
+
/** Alias for {@link subtract} */
|
|
396
|
+
sub: {
|
|
397
|
+
(y: Expr<IntegerType> | bigint): IntegerExpr;
|
|
398
|
+
(y: Expr<FloatType> | number): FloatExpr;
|
|
399
|
+
};
|
|
400
|
+
/** Alias for {@link subtract} */
|
|
401
|
+
minus: {
|
|
402
|
+
(y: Expr<IntegerType> | bigint): IntegerExpr;
|
|
403
|
+
(y: Expr<FloatType> | number): FloatExpr;
|
|
404
|
+
};
|
|
405
|
+
/** Alias for {@link multiply} */
|
|
406
|
+
mul: {
|
|
407
|
+
(y: Expr<IntegerType> | bigint): IntegerExpr;
|
|
408
|
+
(y: Expr<FloatType> | number): FloatExpr;
|
|
409
|
+
};
|
|
410
|
+
/** Alias for {@link multiply} */
|
|
411
|
+
times: {
|
|
412
|
+
(y: Expr<IntegerType> | bigint): IntegerExpr;
|
|
413
|
+
(y: Expr<FloatType> | number): FloatExpr;
|
|
414
|
+
};
|
|
415
|
+
/** Alias for {@link divide} */
|
|
416
|
+
div: {
|
|
417
|
+
(y: Expr<IntegerType> | bigint): IntegerExpr;
|
|
418
|
+
(y: Expr<FloatType> | number): FloatExpr;
|
|
419
|
+
};
|
|
420
|
+
/** Alias for {@link remainder} */
|
|
421
|
+
mod: {
|
|
422
|
+
(y: Expr<IntegerType> | bigint): IntegerExpr;
|
|
423
|
+
(y: Expr<FloatType> | number): FloatExpr;
|
|
424
|
+
};
|
|
425
|
+
/** Alias for {@link remainder} */
|
|
426
|
+
rem: {
|
|
427
|
+
(y: Expr<IntegerType> | bigint): IntegerExpr;
|
|
428
|
+
(y: Expr<FloatType> | number): FloatExpr;
|
|
429
|
+
};
|
|
430
|
+
/** Alias for {@link remainder} */
|
|
431
|
+
modulo: {
|
|
432
|
+
(y: Expr<IntegerType> | bigint): IntegerExpr;
|
|
433
|
+
(y: Expr<FloatType> | number): FloatExpr;
|
|
434
|
+
};
|
|
255
435
|
}
|
|
256
436
|
//# sourceMappingURL=integer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["../../../src/expr/integer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAe,MAAM,aAAa,CAAC;AAClE,OAAO,EAAa,IAAI,EAAiB,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAExE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["../../../src/expr/integer.ts"],"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js";
|
|
2
2
|
import { FloatType, IntegerType, isTypeEqual } from "../types.js";
|
|
3
3
|
import { AstSymbol, Expr, FactorySymbol } from "./expr.js";
|
|
4
4
|
import { valueOrExprToAst } from "./ast.js";
|
|
5
|
+
import { equal, notEqual, less, lessEqual, greater, greaterEqual } from "./block.js";
|
|
5
6
|
/**
|
|
6
7
|
* Expression representing integer values and operations.
|
|
7
8
|
*
|
|
@@ -52,7 +53,7 @@ export class IntegerExpr extends Expr {
|
|
|
52
53
|
return this[FactorySymbol]({
|
|
53
54
|
ast_type: "Builtin",
|
|
54
55
|
type: IntegerType,
|
|
55
|
-
|
|
56
|
+
loc_id: get_location_id(),
|
|
56
57
|
builtin: "IntegerNegate",
|
|
57
58
|
type_parameters: [],
|
|
58
59
|
arguments: [this[AstSymbol]],
|
|
@@ -64,7 +65,7 @@ export class IntegerExpr extends Expr {
|
|
|
64
65
|
return this[FactorySymbol]({
|
|
65
66
|
ast_type: "Builtin",
|
|
66
67
|
type: FloatType,
|
|
67
|
-
|
|
68
|
+
loc_id: get_location_id(),
|
|
68
69
|
builtin: "FloatAdd",
|
|
69
70
|
type_parameters: [],
|
|
70
71
|
arguments: [this.toFloat()[AstSymbol], rightAst],
|
|
@@ -74,7 +75,7 @@ export class IntegerExpr extends Expr {
|
|
|
74
75
|
return this[FactorySymbol]({
|
|
75
76
|
ast_type: "Builtin",
|
|
76
77
|
type: IntegerType,
|
|
77
|
-
|
|
78
|
+
loc_id: get_location_id(),
|
|
78
79
|
builtin: "IntegerAdd",
|
|
79
80
|
type_parameters: [],
|
|
80
81
|
arguments: [this[AstSymbol], rightAst],
|
|
@@ -87,7 +88,7 @@ export class IntegerExpr extends Expr {
|
|
|
87
88
|
return this[FactorySymbol]({
|
|
88
89
|
ast_type: "Builtin",
|
|
89
90
|
type: FloatType,
|
|
90
|
-
|
|
91
|
+
loc_id: get_location_id(),
|
|
91
92
|
builtin: "FloatSubtract",
|
|
92
93
|
type_parameters: [],
|
|
93
94
|
arguments: [this.toFloat()[AstSymbol], rightAst],
|
|
@@ -97,7 +98,7 @@ export class IntegerExpr extends Expr {
|
|
|
97
98
|
return this[FactorySymbol]({
|
|
98
99
|
ast_type: "Builtin",
|
|
99
100
|
type: IntegerType,
|
|
100
|
-
|
|
101
|
+
loc_id: get_location_id(),
|
|
101
102
|
builtin: "IntegerSubtract",
|
|
102
103
|
type_parameters: [],
|
|
103
104
|
arguments: [this[AstSymbol], rightAst],
|
|
@@ -110,7 +111,7 @@ export class IntegerExpr extends Expr {
|
|
|
110
111
|
return this[FactorySymbol]({
|
|
111
112
|
ast_type: "Builtin",
|
|
112
113
|
type: FloatType,
|
|
113
|
-
|
|
114
|
+
loc_id: get_location_id(),
|
|
114
115
|
builtin: "FloatMultiply",
|
|
115
116
|
type_parameters: [],
|
|
116
117
|
arguments: [this.toFloat()[AstSymbol], rightAst],
|
|
@@ -120,7 +121,7 @@ export class IntegerExpr extends Expr {
|
|
|
120
121
|
return this[FactorySymbol]({
|
|
121
122
|
ast_type: "Builtin",
|
|
122
123
|
type: IntegerType,
|
|
123
|
-
|
|
124
|
+
loc_id: get_location_id(),
|
|
124
125
|
builtin: "IntegerMultiply",
|
|
125
126
|
type_parameters: [],
|
|
126
127
|
arguments: [this[AstSymbol], rightAst],
|
|
@@ -133,7 +134,7 @@ export class IntegerExpr extends Expr {
|
|
|
133
134
|
return this[FactorySymbol]({
|
|
134
135
|
ast_type: "Builtin",
|
|
135
136
|
type: FloatType,
|
|
136
|
-
|
|
137
|
+
loc_id: get_location_id(),
|
|
137
138
|
builtin: "FloatDivide",
|
|
138
139
|
type_parameters: [],
|
|
139
140
|
arguments: [this.toFloat()[AstSymbol], rightAst],
|
|
@@ -143,7 +144,7 @@ export class IntegerExpr extends Expr {
|
|
|
143
144
|
return this[FactorySymbol]({
|
|
144
145
|
ast_type: "Builtin",
|
|
145
146
|
type: IntegerType,
|
|
146
|
-
|
|
147
|
+
loc_id: get_location_id(),
|
|
147
148
|
builtin: "IntegerDivide",
|
|
148
149
|
type_parameters: [],
|
|
149
150
|
arguments: [this[AstSymbol], rightAst],
|
|
@@ -156,7 +157,7 @@ export class IntegerExpr extends Expr {
|
|
|
156
157
|
return this[FactorySymbol]({
|
|
157
158
|
ast_type: "Builtin",
|
|
158
159
|
type: FloatType,
|
|
159
|
-
|
|
160
|
+
loc_id: get_location_id(),
|
|
160
161
|
builtin: "FloatRemainder",
|
|
161
162
|
type_parameters: [],
|
|
162
163
|
arguments: [this.toFloat()[AstSymbol], rightAst],
|
|
@@ -166,7 +167,7 @@ export class IntegerExpr extends Expr {
|
|
|
166
167
|
return this[FactorySymbol]({
|
|
167
168
|
ast_type: "Builtin",
|
|
168
169
|
type: IntegerType,
|
|
169
|
-
|
|
170
|
+
loc_id: get_location_id(),
|
|
170
171
|
builtin: "IntegerRemainder",
|
|
171
172
|
type_parameters: [],
|
|
172
173
|
arguments: [this[AstSymbol], rightAst],
|
|
@@ -179,7 +180,7 @@ export class IntegerExpr extends Expr {
|
|
|
179
180
|
return this[FactorySymbol]({
|
|
180
181
|
ast_type: "Builtin",
|
|
181
182
|
type: FloatType,
|
|
182
|
-
|
|
183
|
+
loc_id: get_location_id(),
|
|
183
184
|
builtin: "FloatPow",
|
|
184
185
|
type_parameters: [],
|
|
185
186
|
arguments: [this.toFloat()[AstSymbol], rightAst],
|
|
@@ -189,7 +190,7 @@ export class IntegerExpr extends Expr {
|
|
|
189
190
|
return this[FactorySymbol]({
|
|
190
191
|
ast_type: "Builtin",
|
|
191
192
|
type: IntegerType,
|
|
192
|
-
|
|
193
|
+
loc_id: get_location_id(),
|
|
193
194
|
builtin: "IntegerPow",
|
|
194
195
|
type_parameters: [],
|
|
195
196
|
arguments: [this[AstSymbol], rightAst],
|
|
@@ -216,7 +217,7 @@ export class IntegerExpr extends Expr {
|
|
|
216
217
|
return this[FactorySymbol]({
|
|
217
218
|
ast_type: "Builtin",
|
|
218
219
|
type: IntegerType,
|
|
219
|
-
|
|
220
|
+
loc_id: get_location_id(),
|
|
220
221
|
builtin: "IntegerAbs",
|
|
221
222
|
type_parameters: [],
|
|
222
223
|
arguments: [this[AstSymbol]],
|
|
@@ -242,7 +243,7 @@ export class IntegerExpr extends Expr {
|
|
|
242
243
|
return this[FactorySymbol]({
|
|
243
244
|
ast_type: "Builtin",
|
|
244
245
|
type: IntegerType,
|
|
245
|
-
|
|
246
|
+
loc_id: get_location_id(),
|
|
246
247
|
builtin: "IntegerSign",
|
|
247
248
|
type_parameters: [],
|
|
248
249
|
arguments: [this[AstSymbol]],
|
|
@@ -273,7 +274,7 @@ export class IntegerExpr extends Expr {
|
|
|
273
274
|
return this[FactorySymbol]({
|
|
274
275
|
ast_type: "Builtin",
|
|
275
276
|
type: IntegerType,
|
|
276
|
-
|
|
277
|
+
loc_id: get_location_id(),
|
|
277
278
|
builtin: "IntegerLog",
|
|
278
279
|
type_parameters: [],
|
|
279
280
|
arguments: [this[AstSymbol], baseAst],
|
|
@@ -301,11 +302,181 @@ export class IntegerExpr extends Expr {
|
|
|
301
302
|
return this[FactorySymbol]({
|
|
302
303
|
ast_type: "Builtin",
|
|
303
304
|
type: FloatType,
|
|
304
|
-
|
|
305
|
+
loc_id: get_location_id(),
|
|
305
306
|
builtin: "IntegerToFloat",
|
|
306
307
|
type_parameters: [],
|
|
307
308
|
arguments: [this[AstSymbol]],
|
|
308
309
|
});
|
|
309
310
|
}
|
|
311
|
+
/**
|
|
312
|
+
* Checks if this integer equals another value.
|
|
313
|
+
*
|
|
314
|
+
* @param other - The value to compare against
|
|
315
|
+
* @returns A BooleanExpr that is true if the values are equal
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* ```ts
|
|
319
|
+
* const isEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
320
|
+
* $.return(a.equals(b));
|
|
321
|
+
* });
|
|
322
|
+
* const compiled = East.compile(isEqual.toIR(), []);
|
|
323
|
+
* compiled(5n, 5n); // true
|
|
324
|
+
* compiled(5n, 3n); // false
|
|
325
|
+
* ```
|
|
326
|
+
*/
|
|
327
|
+
equals(other) {
|
|
328
|
+
return equal(this, other);
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Checks if this integer does not equal another value.
|
|
332
|
+
*
|
|
333
|
+
* @param other - The value to compare against
|
|
334
|
+
* @returns A BooleanExpr that is true if the values are not equal
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* ```ts
|
|
338
|
+
* const isNotEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
339
|
+
* $.return(a.notEquals(b));
|
|
340
|
+
* });
|
|
341
|
+
* const compiled = East.compile(isNotEqual.toIR(), []);
|
|
342
|
+
* compiled(5n, 3n); // true
|
|
343
|
+
* compiled(5n, 5n); // false
|
|
344
|
+
* ```
|
|
345
|
+
*/
|
|
346
|
+
notEquals(other) {
|
|
347
|
+
return notEqual(this, other);
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Checks if this integer is greater than another value.
|
|
351
|
+
*
|
|
352
|
+
* @param other - The value to compare against
|
|
353
|
+
* @returns A BooleanExpr that is true if this value is greater
|
|
354
|
+
*
|
|
355
|
+
* @example
|
|
356
|
+
* ```ts
|
|
357
|
+
* const isGreater = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
358
|
+
* $.return(a.greaterThan(b));
|
|
359
|
+
* });
|
|
360
|
+
* const compiled = East.compile(isGreater.toIR(), []);
|
|
361
|
+
* compiled(5n, 3n); // true
|
|
362
|
+
* compiled(3n, 5n); // false
|
|
363
|
+
* compiled(5n, 5n); // false
|
|
364
|
+
* ```
|
|
365
|
+
*/
|
|
366
|
+
greaterThan(other) {
|
|
367
|
+
return greater(this, other);
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Checks if this integer is less than another value.
|
|
371
|
+
*
|
|
372
|
+
* @param other - The value to compare against
|
|
373
|
+
* @returns A BooleanExpr that is true if this value is less
|
|
374
|
+
*
|
|
375
|
+
* @example
|
|
376
|
+
* ```ts
|
|
377
|
+
* const isLess = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
378
|
+
* $.return(a.lessThan(b));
|
|
379
|
+
* });
|
|
380
|
+
* const compiled = East.compile(isLess.toIR(), []);
|
|
381
|
+
* compiled(3n, 5n); // true
|
|
382
|
+
* compiled(5n, 3n); // false
|
|
383
|
+
* compiled(5n, 5n); // false
|
|
384
|
+
* ```
|
|
385
|
+
*/
|
|
386
|
+
lessThan(other) {
|
|
387
|
+
return less(this, other);
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Checks if this integer is greater than or equal to another value.
|
|
391
|
+
*
|
|
392
|
+
* @param other - The value to compare against
|
|
393
|
+
* @returns A BooleanExpr that is true if this value is greater than or equal
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
* ```ts
|
|
397
|
+
* const isGreaterOrEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
398
|
+
* $.return(a.greaterThanOrEqual(b));
|
|
399
|
+
* });
|
|
400
|
+
* const compiled = East.compile(isGreaterOrEqual.toIR(), []);
|
|
401
|
+
* compiled(5n, 3n); // true
|
|
402
|
+
* compiled(5n, 5n); // true
|
|
403
|
+
* compiled(3n, 5n); // false
|
|
404
|
+
* ```
|
|
405
|
+
*/
|
|
406
|
+
greaterThanOrEqual(other) {
|
|
407
|
+
return greaterEqual(this, other);
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Checks if this integer is less than or equal to another value.
|
|
411
|
+
*
|
|
412
|
+
* @param other - The value to compare against
|
|
413
|
+
* @returns A BooleanExpr that is true if this value is less than or equal
|
|
414
|
+
*
|
|
415
|
+
* @example
|
|
416
|
+
* ```ts
|
|
417
|
+
* const isLessOrEqual = East.function([IntegerType, IntegerType], BooleanType, ($, a, b) => {
|
|
418
|
+
* $.return(a.lessThanOrEqual(b));
|
|
419
|
+
* });
|
|
420
|
+
* const compiled = East.compile(isLessOrEqual.toIR(), []);
|
|
421
|
+
* compiled(3n, 5n); // true
|
|
422
|
+
* compiled(5n, 5n); // true
|
|
423
|
+
* compiled(5n, 3n); // false
|
|
424
|
+
* ```
|
|
425
|
+
*/
|
|
426
|
+
lessThanOrEqual(other) {
|
|
427
|
+
return lessEqual(this, other);
|
|
428
|
+
}
|
|
429
|
+
// ============================================================================
|
|
430
|
+
// Aliases for comparison operations
|
|
431
|
+
// ============================================================================
|
|
432
|
+
/** Alias for {@link equals} */
|
|
433
|
+
eq = this.equals;
|
|
434
|
+
/** Alias for {@link equals} */
|
|
435
|
+
equal = this.equals;
|
|
436
|
+
/** Alias for {@link notEquals} */
|
|
437
|
+
ne = this.notEquals;
|
|
438
|
+
/** Alias for {@link notEquals} */
|
|
439
|
+
notEqual = this.notEquals;
|
|
440
|
+
/** Alias for {@link greaterThan} */
|
|
441
|
+
gt = this.greaterThan;
|
|
442
|
+
/** Alias for {@link greaterThan} */
|
|
443
|
+
greater = this.greaterThan;
|
|
444
|
+
/** Alias for {@link lessThan} */
|
|
445
|
+
lt = this.lessThan;
|
|
446
|
+
/** Alias for {@link lessThan} */
|
|
447
|
+
less = this.lessThan;
|
|
448
|
+
/** Alias for {@link greaterThanOrEqual} */
|
|
449
|
+
gte = this.greaterThanOrEqual;
|
|
450
|
+
/** Alias for {@link greaterThanOrEqual} */
|
|
451
|
+
ge = this.greaterThanOrEqual;
|
|
452
|
+
/** Alias for {@link greaterThanOrEqual} */
|
|
453
|
+
greaterEqual = this.greaterThanOrEqual;
|
|
454
|
+
/** Alias for {@link lessThanOrEqual} */
|
|
455
|
+
lte = this.lessThanOrEqual;
|
|
456
|
+
/** Alias for {@link lessThanOrEqual} */
|
|
457
|
+
le = this.lessThanOrEqual;
|
|
458
|
+
/** Alias for {@link lessThanOrEqual} */
|
|
459
|
+
lessEqual = this.lessThanOrEqual;
|
|
460
|
+
// ============================================================================
|
|
461
|
+
// Aliases for arithmetic operations
|
|
462
|
+
// ============================================================================
|
|
463
|
+
/** Alias for {@link add} */
|
|
464
|
+
plus = this.add;
|
|
465
|
+
/** Alias for {@link subtract} */
|
|
466
|
+
sub = this.subtract;
|
|
467
|
+
/** Alias for {@link subtract} */
|
|
468
|
+
minus = this.subtract;
|
|
469
|
+
/** Alias for {@link multiply} */
|
|
470
|
+
mul = this.multiply;
|
|
471
|
+
/** Alias for {@link multiply} */
|
|
472
|
+
times = this.multiply;
|
|
473
|
+
/** Alias for {@link divide} */
|
|
474
|
+
div = this.divide;
|
|
475
|
+
/** Alias for {@link remainder} */
|
|
476
|
+
mod = this.remainder;
|
|
477
|
+
/** Alias for {@link remainder} */
|
|
478
|
+
rem = this.remainder;
|
|
479
|
+
/** Alias for {@link remainder} */
|
|
480
|
+
modulo = this.remainder;
|
|
310
481
|
}
|
|
311
482
|
//# sourceMappingURL=integer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integer.js","sourceRoot":"","sources":["../../../src/expr/integer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"integer.js","sourceRoot":"","sources":["../../../src/expr/integer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAe,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,OAAO,WAAY,SAAQ,IAAiB;IAChD,YAAY,GAAQ,EAAE,UAAkB;QACtC,KAAK,CAAC,WAAW,EAAE,GAAG,EAAE,UAAU,CAAC,CAA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,CAAC,kBAAkB,CAAC;IAC7B,2CAA2C;IAC3C,YAAY,GAAG,IAAI,CAAC,kBAAkB,CAAC;IAEvC,wCAAwC;IACxC,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC;IAC3B,wCAAwC;IACxC,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC;IAC1B,wCAAwC;IACxC,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC;IAEjC,+EAA+E;IAC/E,oCAAoC;IACpC,+EAA+E;IAE/E,4BAA4B;IAC5B,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;IAEhB,iCAAiC;IACjC,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC;IACpB,iCAAiC;IACjC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC;IAEtB,iCAAiC;IACjC,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC;IACpB,iCAAiC;IACjC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC;IAEtB,+BAA+B;IAC/B,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;IAElB,kCAAkC;IAClC,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC;IACrB,kCAAkC;IAClC,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC;IACrB,kCAAkC;IAClC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC;CACzB"}
|
|
@@ -47,7 +47,7 @@ export default {
|
|
|
47
47
|
builtin: "ArrayRange",
|
|
48
48
|
type_parameters: [],
|
|
49
49
|
arguments: [start_val[AstSymbol], end_val[AstSymbol], step_val[AstSymbol]],
|
|
50
|
-
|
|
50
|
+
loc_id: start_val[AstSymbol].loc_id,
|
|
51
51
|
});
|
|
52
52
|
},
|
|
53
53
|
/**
|
|
@@ -91,7 +91,7 @@ export default {
|
|
|
91
91
|
builtin: "ArrayLinspace",
|
|
92
92
|
type_parameters: [],
|
|
93
93
|
arguments: [start_val[AstSymbol], stop_val[AstSymbol], count_val[AstSymbol]],
|
|
94
|
-
|
|
94
|
+
loc_id: start_val[AstSymbol].loc_id,
|
|
95
95
|
});
|
|
96
96
|
},
|
|
97
97
|
/**
|
|
@@ -133,7 +133,7 @@ export default {
|
|
|
133
133
|
builtin: "ArrayGenerate",
|
|
134
134
|
type_parameters: [value_type_deduced],
|
|
135
135
|
arguments: [length_expr[AstSymbol], generator_expr[AstSymbol]],
|
|
136
|
-
|
|
136
|
+
loc_id: length_expr[AstSymbol].loc_id,
|
|
137
137
|
});
|
|
138
138
|
},
|
|
139
139
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../../src/expr/libs/array.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAiB,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGzD,4CAA4C;AAC5C,eAAe;IACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,KAAK,CAAC,KAAiC,EAAE,GAA+B,EAAE,OAAmC,EAAE;QAC7G,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;QAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC;YAClB,QAAQ,EAAE,SAAS;YACnB,IAAI,EAAE,SAAS,CAAC,WAAW,CAAC;YAC5B,OAAO,EAAE,YAAY;YACrB,eAAe,EAAE,EAAE;YACnB,SAAS,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;YA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3
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { get_location_id } from "../../location.js";
|
|
6
6
|
import { BlobType } from "../../types.js";
|
|
7
7
|
import { Expr } from "../expr.js";
|
|
8
8
|
/** Standard library for blobs */
|
|
@@ -46,7 +46,7 @@ export default {
|
|
|
46
46
|
return Expr.fromAst({
|
|
47
47
|
ast_type: "Builtin",
|
|
48
48
|
type: BlobType,
|
|
49
|
-
|
|
49
|
+
loc_id: get_location_id(),
|
|
50
50
|
builtin: "BlobEncodeBeast",
|
|
51
51
|
type_parameters: [Expr.type(value)],
|
|
52
52
|
arguments: [Expr.ast(value)],
|
|
@@ -56,7 +56,7 @@ export default {
|
|
|
56
56
|
return Expr.fromAst({
|
|
57
57
|
ast_type: "Builtin",
|
|
58
58
|
type: BlobType,
|
|
59
|
-
|
|
59
|
+
loc_id: get_location_id(),
|
|
60
60
|
builtin: "BlobEncodeBeast2",
|
|
61
61
|
type_parameters: [Expr.type(value)],
|
|
62
62
|
arguments: [Expr.ast(value)],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blob.js","sourceRoot":"","sources":["../../../../src/expr/libs/blob.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"blob.js","sourceRoot":"","sources":["../../../../src/expr/libs/blob.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,iCAAiC;AACjC,eAAe;IACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,WAAW,CAAC,KAAW,EAAE,UAAuB,IAAI;QAClD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACrB,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,eAAe,EAAE;gBACzB,OAAO,EAAE,iBAAiB;gBAC1B,eAAe,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACnC,SAAS,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aAC7B,CAAa,CAAC;QACjB,CAAC;aAAM,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,eAAe,EAAE;gBACzB,OAAO,EAAE,kBAAkB;gBAC3B,eAAe,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACnC,SAAS,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aAC7B,CAAa,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,EAAE,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;CACF,CAAA"}
|
|
@@ -70,7 +70,7 @@ export default {
|
|
|
70
70
|
builtin: "DictGenerate",
|
|
71
71
|
type_parameters: [keyType, valueType],
|
|
72
72
|
arguments: [length_expr[AstSymbol], key_expr[AstSymbol], value_expr[AstSymbol], on_conflict_expr[AstSymbol]],
|
|
73
|
-
|
|
73
|
+
loc_id: length_expr[AstSymbol].loc_id,
|
|
74
74
|
});
|
|
75
75
|
},
|
|
76
76
|
};
|