@algorandfoundation/puya-ts 1.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/awst/index.d.ts +4 -0
- package/awst/intrinsic-factory.d.ts +35 -0
- package/awst/json-serialize-awst.d.ts +17 -0
- package/awst/models.d.ts +85 -0
- package/awst/node-factory.d.ts +90 -0
- package/awst/nodes.d.ts +841 -0
- package/awst/source-location.d.ts +21 -0
- package/awst/to-code-visitor.d.ts +87 -0
- package/awst/txn-fields.d.ts +84 -0
- package/awst/util.d.ts +2 -0
- package/awst/wtypes.d.ts +136 -0
- package/awst_build/base-visitor.d.ts +87 -0
- package/awst_build/constructor-visitor.d.ts +18 -0
- package/awst_build/context/awst-build-context.d.ts +72 -0
- package/awst_build/context/evaluation-context.d.ts +11 -0
- package/awst_build/context/switch-loop-context.d.ts +31 -0
- package/awst_build/context/unique-name-resolver.d.ts +14 -0
- package/awst_build/contract-data.d.ts +24 -0
- package/awst_build/contract-method-visitor.d.ts +20 -0
- package/awst_build/contract-visitor.d.ts +33 -0
- package/awst_build/decorator-visitor.d.ts +34 -0
- package/awst_build/eb/arc4/arrays.d.ts +31 -0
- package/awst_build/eb/arc4/uint-n-constructor-builder.d.ts +14 -0
- package/awst_build/eb/arc4-bare-method-decorator-builder.d.ts +19 -0
- package/awst_build/eb/assert-function-builder.d.ts +10 -0
- package/awst_build/eb/assert-match-function-builder.d.ts +8 -0
- package/awst_build/eb/biguint-expression-builder.d.ts +21 -0
- package/awst_build/eb/boolean-expression-builder.d.ts +15 -0
- package/awst_build/eb/bytes-expression-builder.d.ts +44 -0
- package/awst_build/eb/contract-builder.d.ts +19 -0
- package/awst_build/eb/ensure-budget.d.ts +8 -0
- package/awst_build/eb/folding.d.ts +5 -0
- package/awst_build/eb/free-subroutine-expression-builder.d.ts +22 -0
- package/awst_build/eb/index.d.ts +90 -0
- package/awst_build/eb/intrinsic-enum-builder.d.ts +9 -0
- package/awst_build/eb/iterable-iterator-expression-builder.d.ts +10 -0
- package/awst_build/eb/literal/array-literal-expression-builder.d.ts +18 -0
- package/awst_build/eb/literal/big-int-literal-expression-builder.d.ts +17 -0
- package/awst_build/eb/literal/conditional-expression-builder.d.ts +22 -0
- package/awst_build/eb/literal/object-expression-builder.d.ts +13 -0
- package/awst_build/eb/literal/object-literal-expression-builder.d.ts +28 -0
- package/awst_build/eb/literal-expression-builder.d.ts +27 -0
- package/awst_build/eb/log-function-builder.d.ts +7 -0
- package/awst_build/eb/namespace-builder.d.ts +9 -0
- package/awst_build/eb/native-array-expression-builder.d.ts +8 -0
- package/awst_build/eb/omitted-expression-builder.d.ts +9 -0
- package/awst_build/eb/op-module-builder.d.ts +25 -0
- package/awst_build/eb/reference/account.d.ts +15 -0
- package/awst_build/eb/reference/application.d.ts +12 -0
- package/awst_build/eb/reference/asset.d.ts +13 -0
- package/awst_build/eb/reference/base.d.ts +37 -0
- package/awst_build/eb/storage/box.d.ts +50 -0
- package/awst_build/eb/storage/global-state.d.ts +29 -0
- package/awst_build/eb/storage/local-state.d.ts +32 -0
- package/awst_build/eb/storage/util.d.ts +5 -0
- package/awst_build/eb/storage/value-proxy.d.ts +22 -0
- package/awst_build/eb/string-expression-builder.d.ts +27 -0
- package/awst_build/eb/transactions/group-transactions.d.ts +15 -0
- package/awst_build/eb/transactions/inner-transaction-params.d.ts +19 -0
- package/awst_build/eb/transactions/inner-transactions.d.ts +10 -0
- package/awst_build/eb/transactions/txn-fields.d.ts +1317 -0
- package/awst_build/eb/transactions/util.d.ts +5 -0
- package/awst_build/eb/tuple-expression-builder.d.ts +12 -0
- package/awst_build/eb/uint64-enum-type-builder.d.ts +13 -0
- package/awst_build/eb/uint64-expression-builder.d.ts +21 -0
- package/awst_build/eb/urange-function.d.ts +7 -0
- package/awst_build/eb/util/arg-parsing.d.ts +106 -0
- package/awst_build/eb/util/compare-bytes.d.ts +5 -0
- package/awst_build/eb/util/compare-uint64.d.ts +5 -0
- package/awst_build/eb/util/index.d.ts +19 -0
- package/awst_build/eb/util/require-constant-value.d.ts +4 -0
- package/awst_build/eb/void-expression-builder.d.ts +7 -0
- package/awst_build/function-visitor.d.ts +45 -0
- package/awst_build/index.d.ts +5 -0
- package/awst_build/lib/index.d.ts +2 -0
- package/awst_build/op-metadata.d.ts +27 -0
- package/awst_build/ptypes/arc4-types.d.ts +56 -0
- package/awst_build/ptypes/base.d.ts +31 -0
- package/awst_build/ptypes/index.d.ts +464 -0
- package/awst_build/ptypes/intrinsic-enum-type.d.ts +14 -0
- package/awst_build/ptypes/op-ptypes.d.ts +6 -0
- package/awst_build/ptypes/register.d.ts +2 -0
- package/awst_build/ptypes/transient-type-errors.d.ts +14 -0
- package/awst_build/source-file-visitor.d.ts +21 -0
- package/awst_build/subroutine-visitor.d.ts +10 -0
- package/awst_build/symbol-name.d.ts +10 -0
- package/awst_build/text-visitor.d.ts +20 -0
- package/awst_build/type-registry.d.ts +61 -0
- package/awst_build/type-resolver.d.ts +18 -0
- package/bin/run-cli.d.ts +2 -0
- package/bin/run-cli.mjs +21 -0
- package/bin/run-cli.mjs.map +1 -0
- package/cli.d.ts +1 -0
- package/cli.mjs +161 -0
- package/cli.mjs.map +1 -0
- package/compile-options.d.ts +23 -0
- package/constants.d.ts +20 -0
- package/errors.d.ts +46 -0
- package/index-GbFBpbmB.js +16444 -0
- package/index-GbFBpbmB.js.map +1 -0
- package/index.d.ts +31 -0
- package/index.mjs +16 -0
- package/index.mjs.map +1 -0
- package/logger.d.ts +39 -0
- package/node_modules/typescript/LICENSE.txt +55 -0
- package/node_modules/typescript/README.md +50 -0
- package/node_modules/typescript/SECURITY.md +41 -0
- package/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
- package/node_modules/typescript/bin/tsc +2 -0
- package/node_modules/typescript/bin/tsserver +2 -0
- package/node_modules/typescript/lib/cancellationToken.js +90 -0
- package/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/lib.d.ts +22 -0
- package/node_modules/typescript/lib/lib.decorators.d.ts +386 -0
- package/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
- package/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
- package/node_modules/typescript/lib/lib.dom.d.ts +28087 -0
- package/node_modules/typescript/lib/lib.dom.iterable.d.ts +491 -0
- package/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
- package/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
- package/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
- package/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
- package/node_modules/typescript/lib/lib.es2015.iterable.d.ts +527 -0
- package/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
- package/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
- package/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
- package/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
- package/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
- package/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
- package/node_modules/typescript/lib/lib.es2017.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
- package/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
- package/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
- package/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
- package/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
- package/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
- package/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- package/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
- package/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
- package/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
- package/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
- package/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
- package/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
- package/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
- package/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2020.bigint.d.ts +727 -0
- package/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
- package/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
- package/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
- package/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
- package/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
- package/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +97 -0
- package/node_modules/typescript/lib/lib.es2020.string.d.ts +42 -0
- package/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
- package/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
- package/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
- package/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
- package/node_modules/typescript/lib/lib.es2021.weakref.d.ts +76 -0
- package/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
- package/node_modules/typescript/lib/lib.es2022.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2022.error.d.ts +73 -0
- package/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2022.intl.d.ts +121 -0
- package/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
- package/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
- package/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts +39 -0
- package/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
- package/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
- package/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
- package/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
- package/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
- package/node_modules/typescript/lib/lib.es5.d.ts +4585 -0
- package/node_modules/typescript/lib/lib.es6.d.ts +23 -0
- package/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
- package/node_modules/typescript/lib/lib.esnext.collection.d.ts +106 -0
- package/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
- package/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- package/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
- package/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
- package/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
- package/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
- package/node_modules/typescript/lib/lib.esnext.object.d.ts +29 -0
- package/node_modules/typescript/lib/lib.esnext.promise.d.ts +35 -0
- package/node_modules/typescript/lib/lib.esnext.regexp.d.ts +25 -0
- package/node_modules/typescript/lib/lib.esnext.string.d.ts +29 -0
- package/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
- package/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
- package/node_modules/typescript/lib/lib.webworker.d.ts +9410 -0
- package/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
- package/node_modules/typescript/lib/lib.webworker.iterable.d.ts +288 -0
- package/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/tsc.js +130769 -0
- package/node_modules/typescript/lib/tsserver.js +623 -0
- package/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
- package/node_modules/typescript/lib/tsserverlibrary.js +21 -0
- package/node_modules/typescript/lib/typesMap.json +497 -0
- package/node_modules/typescript/lib/typescript.d.ts +11329 -0
- package/node_modules/typescript/lib/typescript.js +196072 -0
- package/node_modules/typescript/lib/typingsInstaller.js +236 -0
- package/node_modules/typescript/lib/watchGuard.js +53 -0
- package/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2087 -0
- package/node_modules/typescript/package.json +121 -0
- package/package.json +43 -0
- package/parser/index.d.ts +13 -0
- package/parser/json-serialize-source-files.d.ts +2 -0
- package/parser/resolve-module-name-literals.d.ts +2 -0
- package/puya/build-compilation-set-mapping.d.ts +9 -0
- package/puya/index.d.ts +13 -0
- package/puya/options.d.ts +29 -0
- package/puya/run-child-proc.d.ts +5 -0
- package/util/base-32.d.ts +2 -0
- package/util/base-85.d.ts +10 -0
- package/util/default-map.d.ts +1 -0
- package/util/generate-temp-file.d.ts +9 -0
- package/util/index.d.ts +47 -0
- package/visitor/syntax-names.d.ts +441 -0
- package/visitor/visitor.d.ts +26 -0
- package/write-artifact.d.ts +12 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type ts from 'typescript';
|
|
2
|
+
import type { ARC4CreateOption, OnCompletionAction } from '../awst/models';
|
|
3
|
+
import type { SourceLocation } from '../awst/source-location';
|
|
4
|
+
import type { Constants } from '../constants';
|
|
5
|
+
import { BaseVisitor } from './base-visitor';
|
|
6
|
+
import type { AwstBuildContext } from './context/awst-build-context';
|
|
7
|
+
export type Arc4AbiDecoratorData = {
|
|
8
|
+
type: typeof Constants.arc4AbiDecoratorName;
|
|
9
|
+
create: ARC4CreateOption;
|
|
10
|
+
ocas: OnCompletionAction[];
|
|
11
|
+
sourceLocation: SourceLocation;
|
|
12
|
+
readonly: boolean;
|
|
13
|
+
nameOverride: string | undefined;
|
|
14
|
+
defaultArguments: Record<string, {
|
|
15
|
+
type: 'constant';
|
|
16
|
+
value: string | boolean | bigint | Uint8Array;
|
|
17
|
+
} | {
|
|
18
|
+
type: 'member';
|
|
19
|
+
name: string;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
export type Arc4BareDecoratorData = {
|
|
23
|
+
type: typeof Constants.arc4BareDecoratorName;
|
|
24
|
+
create: ARC4CreateOption;
|
|
25
|
+
ocas: OnCompletionAction[];
|
|
26
|
+
sourceLocation: SourceLocation;
|
|
27
|
+
};
|
|
28
|
+
export type DecoratorData = Arc4BareDecoratorData | Arc4AbiDecoratorData;
|
|
29
|
+
export declare class DecoratorVisitor extends BaseVisitor {
|
|
30
|
+
private accept;
|
|
31
|
+
readonly result: DecoratorData;
|
|
32
|
+
constructor(context: AwstBuildContext, node: ts.Decorator);
|
|
33
|
+
static buildDecoratorData(context: AwstBuildContext, node: ts.Decorator): DecoratorData;
|
|
34
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Expression } from '../../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../../awst/source-location';
|
|
3
|
+
import type { PType } from '../../ptypes';
|
|
4
|
+
import { DynamicArrayType, StaticArrayType } from '../../ptypes/arc4-types';
|
|
5
|
+
import type { InstanceBuilder } from '../index';
|
|
6
|
+
import { FunctionBuilder, InstanceExpressionBuilder, NodeBuilder } from '../index';
|
|
7
|
+
export declare class DynamicArrayConstructorBuilder extends NodeBuilder {
|
|
8
|
+
readonly ptype: import("../../ptypes").LibFunctionType;
|
|
9
|
+
newCall(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
10
|
+
}
|
|
11
|
+
export declare class StaticArrayConstructorBuilder extends NodeBuilder {
|
|
12
|
+
readonly ptype: import("../../ptypes").LibFunctionType;
|
|
13
|
+
newCall(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
14
|
+
}
|
|
15
|
+
export declare abstract class ArrayExpressionBuilder<TArrayType extends DynamicArrayType | StaticArrayType> extends InstanceExpressionBuilder<TArrayType> {
|
|
16
|
+
iterate(sourceLocation: SourceLocation): Expression;
|
|
17
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
18
|
+
}
|
|
19
|
+
export declare class DynamicArrayExpressionBuilder extends ArrayExpressionBuilder<DynamicArrayType> {
|
|
20
|
+
constructor(expr: Expression, ptype: PType);
|
|
21
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
22
|
+
}
|
|
23
|
+
export declare class StaticArrayExpressionBuilder extends ArrayExpressionBuilder<StaticArrayType> {
|
|
24
|
+
constructor(expr: Expression, ptype: PType);
|
|
25
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
26
|
+
}
|
|
27
|
+
export declare class ArrayAtFunctionBuilder extends FunctionBuilder {
|
|
28
|
+
private arrayBuilder;
|
|
29
|
+
constructor(arrayBuilder: ArrayExpressionBuilder<StaticArrayType | DynamicArrayType>);
|
|
30
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
31
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Expression } from '../../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../../awst/source-location';
|
|
3
|
+
import type { PType } from '../../ptypes';
|
|
4
|
+
import { UintNType } from '../../ptypes/arc4-types';
|
|
5
|
+
import type { InstanceBuilder } from '../index';
|
|
6
|
+
import { InstanceExpressionBuilder, NodeBuilder } from '../index';
|
|
7
|
+
export declare class UintNConstructorBuilder extends NodeBuilder {
|
|
8
|
+
get ptype(): undefined;
|
|
9
|
+
newCall(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
10
|
+
}
|
|
11
|
+
export declare class UintNExpressionBuilder extends InstanceExpressionBuilder<UintNType> {
|
|
12
|
+
constructor(expr: Expression, ptype: PType);
|
|
13
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
2
|
+
import type { DecoratorData } from '../decorator-visitor';
|
|
3
|
+
import type { PType } from '../ptypes';
|
|
4
|
+
import type { InstanceBuilder } from './index';
|
|
5
|
+
import { NodeBuilder } from './index';
|
|
6
|
+
export declare class Arc4BareMethodDecoratorBuilder extends NodeBuilder {
|
|
7
|
+
get ptype(): PType;
|
|
8
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
9
|
+
}
|
|
10
|
+
export declare class Arc4AbiMethodDecoratorBuilder extends NodeBuilder {
|
|
11
|
+
get ptype(): PType;
|
|
12
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
13
|
+
}
|
|
14
|
+
export declare class DecoratorDataBuilder extends NodeBuilder {
|
|
15
|
+
private readonly data;
|
|
16
|
+
get ptype(): PType | undefined;
|
|
17
|
+
constructor(sourceLocation: SourceLocation, data: DecoratorData);
|
|
18
|
+
resolveDecoratorData(): DecoratorData;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
2
|
+
import type { PType } from '../ptypes';
|
|
3
|
+
import type { InstanceBuilder } from './index';
|
|
4
|
+
import { FunctionBuilder } from './index';
|
|
5
|
+
export declare class AssertFunctionBuilder extends FunctionBuilder {
|
|
6
|
+
call(args: Array<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
7
|
+
}
|
|
8
|
+
export declare class ErrFunctionBuilder extends FunctionBuilder {
|
|
9
|
+
call(args: Array<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
2
|
+
import type { PType } from '../ptypes';
|
|
3
|
+
import type { InstanceBuilder } from './index';
|
|
4
|
+
import { NodeBuilder } from './index';
|
|
5
|
+
export declare class AssertMatchFunctionBuilder extends NodeBuilder {
|
|
6
|
+
readonly ptype: import("../ptypes").LibFunctionType;
|
|
7
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
8
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { awst } from '../../awst';
|
|
2
|
+
import type { Expression } from '../../awst/nodes';
|
|
3
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
4
|
+
import type { InstanceType, PType } from '../ptypes';
|
|
5
|
+
import type { InstanceBuilder } from './index';
|
|
6
|
+
import { BuilderBinaryOp, BuilderComparisonOp, BuilderUnaryOp, FunctionBuilder, InstanceExpressionBuilder } from './index';
|
|
7
|
+
export declare class BigUintFunctionBuilder extends FunctionBuilder {
|
|
8
|
+
readonly ptype: import("../ptypes").LibFunctionType;
|
|
9
|
+
call(args: Array<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
10
|
+
}
|
|
11
|
+
export declare class BigUintExpressionBuilder extends InstanceExpressionBuilder<InstanceType> {
|
|
12
|
+
constructor(expr: Expression);
|
|
13
|
+
compare(other: InstanceBuilder, op: BuilderComparisonOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
14
|
+
boolEval(sourceLocation: SourceLocation, negate?: boolean): Expression;
|
|
15
|
+
prefixUnaryOp(op: BuilderUnaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
16
|
+
postfixUnaryOp(op: BuilderUnaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
17
|
+
binaryOp(other: InstanceBuilder, op: BuilderBinaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
18
|
+
augmentedAssignment(other: InstanceBuilder, op: BuilderBinaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
19
|
+
assign(other: InstanceBuilder, sourceLocation: SourceLocation): InstanceBuilder;
|
|
20
|
+
toBytes(sourceLocation: SourceLocation): awst.Expression;
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { awst } from '../../awst';
|
|
2
|
+
import type { Expression } from '../../awst/nodes';
|
|
3
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
4
|
+
import type { InstanceType, PType } from '../ptypes';
|
|
5
|
+
import type { InstanceBuilder, NodeBuilder } from './index';
|
|
6
|
+
import { BuilderComparisonOp, FunctionBuilder, InstanceExpressionBuilder } from './index';
|
|
7
|
+
export declare class BooleanFunctionBuilder extends FunctionBuilder {
|
|
8
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
9
|
+
}
|
|
10
|
+
export declare class BooleanExpressionBuilder extends InstanceExpressionBuilder<InstanceType> {
|
|
11
|
+
constructor(expr: Expression);
|
|
12
|
+
boolEval(sourceLocation: SourceLocation, negate: boolean): awst.Expression;
|
|
13
|
+
toBytes(sourceLocation: SourceLocation): Expression;
|
|
14
|
+
compare(other: InstanceBuilder, op: BuilderComparisonOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
15
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { awst } from '../../awst';
|
|
2
|
+
import type { Expression } from '../../awst/nodes';
|
|
3
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
4
|
+
import type { InstanceType, PType } from '../ptypes';
|
|
5
|
+
import type { BuilderComparisonOp, InstanceBuilder, NodeBuilder } from './index';
|
|
6
|
+
import { BuilderUnaryOp, FunctionBuilder, InstanceExpressionBuilder, ParameterlessFunctionBuilder } from './index';
|
|
7
|
+
export declare class BytesFunctionBuilder extends FunctionBuilder {
|
|
8
|
+
readonly ptype: import("../ptypes").LibFunctionType;
|
|
9
|
+
taggedTemplate(head: string, spans: ReadonlyArray<readonly [InstanceBuilder, string]>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
10
|
+
call(args: Array<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
11
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
12
|
+
}
|
|
13
|
+
export declare class BytesExpressionBuilder extends InstanceExpressionBuilder<InstanceType> {
|
|
14
|
+
constructor(expr: Expression);
|
|
15
|
+
prefixUnaryOp(op: BuilderUnaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
16
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
17
|
+
compare(other: InstanceBuilder, op: BuilderComparisonOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
18
|
+
boolEval(sourceLocation: SourceLocation, negate: boolean): awst.Expression;
|
|
19
|
+
toBytes(): awst.Expression;
|
|
20
|
+
toString(sourceLocation: SourceLocation): Expression;
|
|
21
|
+
}
|
|
22
|
+
export declare class ConcatExpressionBuilder extends FunctionBuilder {
|
|
23
|
+
private expr;
|
|
24
|
+
constructor(expr: awst.Expression);
|
|
25
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): BytesExpressionBuilder;
|
|
26
|
+
}
|
|
27
|
+
export declare class BytesInvertBuilder extends ParameterlessFunctionBuilder {
|
|
28
|
+
private expr;
|
|
29
|
+
constructor(expr: awst.Expression);
|
|
30
|
+
}
|
|
31
|
+
export declare class BytesSliceBuilder extends FunctionBuilder {
|
|
32
|
+
private expr;
|
|
33
|
+
constructor(expr: awst.Expression);
|
|
34
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): BytesExpressionBuilder;
|
|
35
|
+
}
|
|
36
|
+
export declare class ToStringBuilder extends ParameterlessFunctionBuilder {
|
|
37
|
+
private expr;
|
|
38
|
+
constructor(expr: awst.Expression);
|
|
39
|
+
}
|
|
40
|
+
export declare class BytesAtBuilder extends FunctionBuilder {
|
|
41
|
+
private expr;
|
|
42
|
+
constructor(expr: awst.Expression);
|
|
43
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder<PType>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Expression, LValue } from '../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
3
|
+
import type { AwstBuildContext } from '../context/awst-build-context';
|
|
4
|
+
import type { ContractClassPType, PType } from '../ptypes';
|
|
5
|
+
import type { NodeBuilder } from './index';
|
|
6
|
+
import { InstanceBuilder } from './index';
|
|
7
|
+
export declare class ContractThisBuilder extends InstanceBuilder<ContractClassPType> {
|
|
8
|
+
#private;
|
|
9
|
+
private context;
|
|
10
|
+
resolve(): Expression;
|
|
11
|
+
resolveLValue(): LValue;
|
|
12
|
+
constructor(ptype: ContractClassPType, sourceLocation: SourceLocation, context: AwstBuildContext);
|
|
13
|
+
get ptype(): ContractClassPType;
|
|
14
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
15
|
+
}
|
|
16
|
+
export declare class ContractSuperBuilder extends ContractThisBuilder {
|
|
17
|
+
constructor(ptype: ContractClassPType, sourceLocation: SourceLocation, context: AwstBuildContext);
|
|
18
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
2
|
+
import type { PType } from '../ptypes';
|
|
3
|
+
import type { InstanceBuilder, NodeBuilder } from './index';
|
|
4
|
+
import { FunctionBuilder } from './index';
|
|
5
|
+
export declare class EnsureBudgetFunctionBuilder extends FunctionBuilder {
|
|
6
|
+
readonly ptype: import("../ptypes").LibFunctionType;
|
|
7
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
8
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Expression } from '../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
3
|
+
import { BuilderBinaryOp, BuilderComparisonOp } from './index';
|
|
4
|
+
export declare function foldBinaryOp(left: bigint, right: bigint, op: BuilderBinaryOp, sourceLocation: SourceLocation): bigint;
|
|
5
|
+
export declare function foldComparisonOp(left: bigint, right: bigint, op: BuilderComparisonOp, sourceLocation: SourceLocation): Expression;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { InstanceMethodTarget, InstanceSuperMethodTarget, SubroutineID } from '../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
3
|
+
import type { ContractClassPType, PType } from '../ptypes';
|
|
4
|
+
import { FunctionPType } from '../ptypes';
|
|
5
|
+
import type { InstanceBuilder } from './index';
|
|
6
|
+
import { FunctionBuilder } from './index';
|
|
7
|
+
declare abstract class SubroutineExpressionBuilder extends FunctionBuilder {
|
|
8
|
+
readonly ptype: FunctionPType;
|
|
9
|
+
protected readonly target: SubroutineID | InstanceMethodTarget | InstanceSuperMethodTarget;
|
|
10
|
+
protected constructor(sourceLocation: SourceLocation, ptype: FunctionPType, target: SubroutineID | InstanceMethodTarget | InstanceSuperMethodTarget);
|
|
11
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
12
|
+
}
|
|
13
|
+
export declare class ContractMethodExpressionBuilder extends SubroutineExpressionBuilder {
|
|
14
|
+
constructor(sourceLocation: SourceLocation, ptype: FunctionPType);
|
|
15
|
+
}
|
|
16
|
+
export declare class BaseContractMethodExpressionBuilder extends SubroutineExpressionBuilder {
|
|
17
|
+
constructor(sourceLocation: SourceLocation, ptype: FunctionPType, baseContractPType: ContractClassPType);
|
|
18
|
+
}
|
|
19
|
+
export declare class FreeSubroutineExpressionBuilder extends SubroutineExpressionBuilder {
|
|
20
|
+
constructor(sourceLocation: SourceLocation, ptype: PType);
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { awst } from '../../awst';
|
|
2
|
+
import type { Expression } from '../../awst/nodes';
|
|
3
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
4
|
+
import type { PType, PTypeOrClass } from '../ptypes';
|
|
5
|
+
export declare enum BuilderComparisonOp {
|
|
6
|
+
eq = "===",
|
|
7
|
+
ne = "!==",
|
|
8
|
+
lt = "<",
|
|
9
|
+
lte = "<=",
|
|
10
|
+
gt = ">",
|
|
11
|
+
gte = ">="
|
|
12
|
+
}
|
|
13
|
+
export declare enum BuilderUnaryOp {
|
|
14
|
+
inc = "++",
|
|
15
|
+
dec = "--",
|
|
16
|
+
bit_inv = "~",
|
|
17
|
+
neg = "-",
|
|
18
|
+
pos = "+"
|
|
19
|
+
}
|
|
20
|
+
export declare enum BuilderBinaryOp {
|
|
21
|
+
add = "+",
|
|
22
|
+
sub = "-",
|
|
23
|
+
mult = "*",
|
|
24
|
+
div = "/",
|
|
25
|
+
mod = "%",
|
|
26
|
+
pow = "**",
|
|
27
|
+
matMult = "@",
|
|
28
|
+
lshift = "<<",
|
|
29
|
+
rshift = ">>",
|
|
30
|
+
bitOr = "|",
|
|
31
|
+
bitXor = "^",
|
|
32
|
+
bitAnd = "&",
|
|
33
|
+
/**
|
|
34
|
+
* Eval left, return right
|
|
35
|
+
* let y = 2
|
|
36
|
+
* // x == 4
|
|
37
|
+
* const x = (y * 3, y - 2)
|
|
38
|
+
*/
|
|
39
|
+
comma = ","
|
|
40
|
+
}
|
|
41
|
+
export declare abstract class NodeBuilder {
|
|
42
|
+
readonly sourceLocation: SourceLocation;
|
|
43
|
+
constructor(sourceLocation: SourceLocation);
|
|
44
|
+
abstract readonly ptype: PType | undefined;
|
|
45
|
+
get typeDescription(): string;
|
|
46
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
47
|
+
newCall(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
48
|
+
taggedTemplate(head: string, spans: ReadonlyArray<readonly [InstanceBuilder, string]>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
49
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
50
|
+
indexAccess(index: InstanceBuilder, sourceLocation: SourceLocation): NodeBuilder;
|
|
51
|
+
boolEval(sourceLocation: SourceLocation, negate?: boolean): awst.Expression;
|
|
52
|
+
}
|
|
53
|
+
export declare abstract class InstanceBuilder<TPType extends PType = PType> extends NodeBuilder {
|
|
54
|
+
constructor(sourceLocation: SourceLocation);
|
|
55
|
+
abstract get ptype(): TPType;
|
|
56
|
+
abstract resolve(): awst.Expression;
|
|
57
|
+
abstract resolveLValue(): awst.LValue;
|
|
58
|
+
resolvableToPType(ptype: PTypeOrClass): boolean;
|
|
59
|
+
resolveToPType(ptype: PTypeOrClass): InstanceBuilder;
|
|
60
|
+
singleEvaluation(): InstanceBuilder;
|
|
61
|
+
toBytes(sourceLocation: SourceLocation): awst.Expression;
|
|
62
|
+
toString(sourceLocation: SourceLocation): awst.Expression;
|
|
63
|
+
prefixUnaryOp(op: BuilderUnaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
64
|
+
postfixUnaryOp(op: BuilderUnaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
65
|
+
compare(other: InstanceBuilder, op: BuilderComparisonOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
66
|
+
binaryOp(other: InstanceBuilder, op: BuilderBinaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
67
|
+
iterate(sourceLocation: SourceLocation): awst.Expression;
|
|
68
|
+
augmentedAssignment(other: InstanceBuilder, op: BuilderBinaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
69
|
+
hasProperty(_name: string): boolean;
|
|
70
|
+
}
|
|
71
|
+
export declare abstract class FunctionBuilder extends NodeBuilder {
|
|
72
|
+
readonly ptype: PType | undefined;
|
|
73
|
+
constructor(location: SourceLocation);
|
|
74
|
+
abstract call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
75
|
+
}
|
|
76
|
+
export declare abstract class ParameterlessFunctionBuilder extends FunctionBuilder {
|
|
77
|
+
private readonly expression;
|
|
78
|
+
private readonly definition;
|
|
79
|
+
constructor(expression: Expression, definition: (expr: Expression, sourceLocation: SourceLocation) => NodeBuilder);
|
|
80
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
81
|
+
}
|
|
82
|
+
export declare abstract class InstanceExpressionBuilder<TPType extends PType> extends InstanceBuilder<PType> {
|
|
83
|
+
#private;
|
|
84
|
+
protected _expr: awst.Expression;
|
|
85
|
+
get ptype(): TPType;
|
|
86
|
+
constructor(_expr: awst.Expression, ptype: TPType);
|
|
87
|
+
resolve(): awst.Expression;
|
|
88
|
+
resolveLValue(): awst.LValue;
|
|
89
|
+
}
|
|
90
|
+
export declare function requireLValue(expr: awst.Expression): awst.LValue;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
2
|
+
import type { PType } from '../ptypes';
|
|
3
|
+
import { IntrinsicEnumType } from '../ptypes';
|
|
4
|
+
import { NodeBuilder } from './index';
|
|
5
|
+
export declare class IntrinsicEnumBuilder extends NodeBuilder {
|
|
6
|
+
readonly ptype: IntrinsicEnumType;
|
|
7
|
+
constructor(sourceLocation: SourceLocation, ptype: PType);
|
|
8
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { awst } from '../../awst';
|
|
2
|
+
import type { Expression } from '../../awst/nodes';
|
|
3
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
4
|
+
import { IterableIteratorType, type PType } from '../ptypes';
|
|
5
|
+
import { InstanceExpressionBuilder } from './index';
|
|
6
|
+
export declare class IterableIteratorExpressionBuilder extends InstanceExpressionBuilder<IterableIteratorType> {
|
|
7
|
+
resolve(): awst.Expression;
|
|
8
|
+
constructor(expr: Expression, ptype: PType);
|
|
9
|
+
iterate(sourceLocation: SourceLocation): Expression;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Expression, LValue } from '../../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../../awst/source-location';
|
|
3
|
+
import type { PTypeOrClass } from '../../ptypes';
|
|
4
|
+
import { ArrayLiteralPType } from '../../ptypes';
|
|
5
|
+
import type { NodeBuilder } from '../index';
|
|
6
|
+
import { InstanceBuilder } from '../index';
|
|
7
|
+
export declare class ArrayLiteralExpressionBuilder extends InstanceBuilder {
|
|
8
|
+
private readonly items;
|
|
9
|
+
readonly ptype: ArrayLiteralPType;
|
|
10
|
+
constructor(sourceLocation: SourceLocation, items: InstanceBuilder[]);
|
|
11
|
+
resolve(): Expression;
|
|
12
|
+
resolveLValue(): LValue;
|
|
13
|
+
singleEvaluation(): InstanceBuilder;
|
|
14
|
+
indexAccess(index: InstanceBuilder, sourceLocation: SourceLocation): NodeBuilder;
|
|
15
|
+
resolveToPType(ptype: PTypeOrClass): InstanceBuilder;
|
|
16
|
+
resolvableToPType(ptype: PTypeOrClass): boolean;
|
|
17
|
+
getItemBuilders(): InstanceBuilder[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Expression } from '../../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../../awst/source-location';
|
|
3
|
+
import type { PTypeOrClass } from '../../ptypes';
|
|
4
|
+
import { TransientType } from '../../ptypes';
|
|
5
|
+
import type { BuilderBinaryOp, BuilderComparisonOp, InstanceBuilder } from '../index';
|
|
6
|
+
import { LiteralExpressionBuilder } from '../literal-expression-builder';
|
|
7
|
+
export declare class BigIntLiteralExpressionBuilder extends LiteralExpressionBuilder {
|
|
8
|
+
readonly value: bigint;
|
|
9
|
+
readonly ptype: TransientType;
|
|
10
|
+
singleEvaluation(): InstanceBuilder;
|
|
11
|
+
constructor(value: bigint, ptype: TransientType, location: SourceLocation);
|
|
12
|
+
resolvableToPType(ptype: PTypeOrClass): boolean;
|
|
13
|
+
boolEval(sourceLocation: SourceLocation, negate?: boolean): Expression;
|
|
14
|
+
resolveToPType(ptype: PTypeOrClass): InstanceBuilder;
|
|
15
|
+
binaryOp(other: InstanceBuilder, op: BuilderBinaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
16
|
+
compare(other: InstanceBuilder, op: BuilderComparisonOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Expression } from '../../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../../awst/source-location';
|
|
3
|
+
import type { PType, PTypeOrClass } from '../../ptypes';
|
|
4
|
+
import type { InstanceBuilder } from '../index';
|
|
5
|
+
import { LiteralExpressionBuilder } from '../literal-expression-builder';
|
|
6
|
+
export declare class ConditionalExpressionBuilder extends LiteralExpressionBuilder {
|
|
7
|
+
private readonly _ptype;
|
|
8
|
+
private readonly whenTrue;
|
|
9
|
+
private readonly whenFalse;
|
|
10
|
+
private readonly condition;
|
|
11
|
+
get ptype(): PType;
|
|
12
|
+
boolEval(sourceLocation: SourceLocation, negate?: boolean): Expression;
|
|
13
|
+
constructor({ condition, ptype, whenFalse, whenTrue, sourceLocation, }: {
|
|
14
|
+
ptype: PType;
|
|
15
|
+
condition: Expression;
|
|
16
|
+
whenTrue: InstanceBuilder;
|
|
17
|
+
whenFalse: InstanceBuilder;
|
|
18
|
+
sourceLocation: SourceLocation;
|
|
19
|
+
});
|
|
20
|
+
resolvableToPType(ptype: PTypeOrClass): boolean;
|
|
21
|
+
resolveToPType(ptype: PTypeOrClass): InstanceBuilder;
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Expression } from '../../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../../awst/source-location';
|
|
3
|
+
import type { PTypeOrClass } from '../../ptypes';
|
|
4
|
+
import { ObjectPType, type PType } from '../../ptypes';
|
|
5
|
+
import type { InstanceBuilder } from '../index';
|
|
6
|
+
import { InstanceExpressionBuilder, type NodeBuilder } from '../index';
|
|
7
|
+
export declare class ObjectExpressionBuilder extends InstanceExpressionBuilder<ObjectPType> {
|
|
8
|
+
constructor(expr: Expression, ptype: PType);
|
|
9
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
10
|
+
hasProperty(name: string): boolean;
|
|
11
|
+
resolvableToPType(ptype: PTypeOrClass): ptype is ObjectPType;
|
|
12
|
+
resolveToPType(ptype: PTypeOrClass): InstanceBuilder;
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Expression, LValue } from '../../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../../awst/source-location';
|
|
3
|
+
import type { PTypeOrClass } from '../../ptypes';
|
|
4
|
+
import { ObjectPType } from '../../ptypes';
|
|
5
|
+
import type { InstanceBuilder } from '../index';
|
|
6
|
+
import { LiteralExpressionBuilder } from '../literal-expression-builder';
|
|
7
|
+
export type ObjectLiteralParts = {
|
|
8
|
+
type: 'properties';
|
|
9
|
+
properties: Record<string, InstanceBuilder>;
|
|
10
|
+
} | {
|
|
11
|
+
type: 'spread-object';
|
|
12
|
+
obj: InstanceBuilder;
|
|
13
|
+
};
|
|
14
|
+
export declare class ObjectLiteralExpressionBuilder extends LiteralExpressionBuilder {
|
|
15
|
+
private readonly parts;
|
|
16
|
+
private readonly generateDiscardedVarName;
|
|
17
|
+
readonly _ptype: ObjectPType;
|
|
18
|
+
get ptype(): ObjectPType;
|
|
19
|
+
constructor(sourceLocation: SourceLocation, ptype: ObjectPType, parts: ObjectLiteralParts[], generateDiscardedVarName: () => string);
|
|
20
|
+
resolve(): Expression;
|
|
21
|
+
resolveLValue(): LValue;
|
|
22
|
+
memberAccess(name: string, sourceLocation: SourceLocation): InstanceBuilder;
|
|
23
|
+
hasProperty(name: string): boolean;
|
|
24
|
+
private toTuple;
|
|
25
|
+
resolvableToPType(ptype: PTypeOrClass): boolean;
|
|
26
|
+
resolveToPType(ptype: PTypeOrClass): InstanceBuilder;
|
|
27
|
+
assign(other: InstanceBuilder, sourceLocation: SourceLocation): InstanceBuilder;
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { awst } from '../../awst';
|
|
2
|
+
import type { Expression, LValue } from '../../awst/nodes';
|
|
3
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
4
|
+
import type { PType, PTypeOrClass } from '../ptypes';
|
|
5
|
+
import type { BuilderBinaryOp, BuilderComparisonOp, BuilderUnaryOp, NodeBuilder } from './index';
|
|
6
|
+
import { InstanceBuilder } from './index';
|
|
7
|
+
export declare abstract class LiteralExpressionBuilder extends InstanceBuilder {
|
|
8
|
+
resolve(): Expression;
|
|
9
|
+
resolveLValue(): LValue;
|
|
10
|
+
abstract resolvableToPType(ptype: PTypeOrClass): boolean;
|
|
11
|
+
abstract resolveToPType(ptype: PTypeOrClass): InstanceBuilder;
|
|
12
|
+
private throwInvalidExpression;
|
|
13
|
+
compare(other: InstanceBuilder, op: BuilderComparisonOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
14
|
+
assign(other: InstanceBuilder, sourceLocation: SourceLocation): InstanceBuilder;
|
|
15
|
+
binaryOp(other: InstanceBuilder, op: BuilderBinaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
16
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
17
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
18
|
+
taggedTemplate(head: string, spans: ReadonlyArray<readonly [InstanceBuilder, string]>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
19
|
+
indexAccess(index: InstanceBuilder, sourceLocation: SourceLocation): NodeBuilder;
|
|
20
|
+
singleEvaluation(): InstanceBuilder;
|
|
21
|
+
toBytes(sourceLocation: SourceLocation): awst.Expression;
|
|
22
|
+
prefixUnaryOp(op: BuilderUnaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
23
|
+
postfixUnaryOp(op: BuilderUnaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
24
|
+
iterate(sourceLocation: SourceLocation): awst.Expression;
|
|
25
|
+
augmentedAssignment(other: InstanceBuilder, op: BuilderBinaryOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
26
|
+
hasProperty(_name: string): boolean;
|
|
27
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
2
|
+
import type { PType } from '../ptypes';
|
|
3
|
+
import type { InstanceBuilder } from './index';
|
|
4
|
+
import { FunctionBuilder } from './index';
|
|
5
|
+
export declare class LogFunctionBuilder extends FunctionBuilder {
|
|
6
|
+
call(args: Array<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
2
|
+
import type { PType } from '../ptypes';
|
|
3
|
+
import { NodeBuilder } from './index';
|
|
4
|
+
export declare class NamespaceBuilder extends NodeBuilder {
|
|
5
|
+
private readonly _ptype;
|
|
6
|
+
constructor(sourceLocation: SourceLocation, ptype: PType);
|
|
7
|
+
get ptype(): PType;
|
|
8
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Expression, LValue } from '../../awst/nodes';
|
|
2
|
+
import type { PType } from '../ptypes';
|
|
3
|
+
import { ArrayPType } from '../ptypes';
|
|
4
|
+
import { InstanceExpressionBuilder } from './index';
|
|
5
|
+
export declare class NativeArrayExpressionBuilder extends InstanceExpressionBuilder<ArrayPType> {
|
|
6
|
+
resolveLValue(): LValue;
|
|
7
|
+
constructor(expr: Expression, ptype: PType);
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Expression, LValue } from '../../awst/nodes';
|
|
2
|
+
import type { PType, PTypeOrClass } from '../ptypes';
|
|
3
|
+
import { InstanceBuilder } from './index';
|
|
4
|
+
export declare class OmittedExpressionBuilder extends InstanceBuilder {
|
|
5
|
+
get ptype(): PType;
|
|
6
|
+
resolve(): Expression;
|
|
7
|
+
resolveLValue(): LValue;
|
|
8
|
+
resolvableToPType(ptype: PTypeOrClass): boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SourceLocation } from '../../awst/source-location';
|
|
2
|
+
import type { IntrinsicOpMapping } from '../op-metadata';
|
|
3
|
+
import type { PType } from '../ptypes';
|
|
4
|
+
import { IntrinsicFunctionGroupType, IntrinsicFunctionType } from '../ptypes';
|
|
5
|
+
import type { InstanceBuilder } from './index';
|
|
6
|
+
import { FunctionBuilder, NodeBuilder } from './index';
|
|
7
|
+
export declare class IntrinsicOpGroupBuilder extends NodeBuilder {
|
|
8
|
+
private opGrouping;
|
|
9
|
+
readonly ptype: IntrinsicFunctionGroupType;
|
|
10
|
+
constructor(sourceLocation: SourceLocation, ptype: PType);
|
|
11
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
12
|
+
}
|
|
13
|
+
declare abstract class IntrinsicOpBuilderBase extends FunctionBuilder {
|
|
14
|
+
private opMapping;
|
|
15
|
+
protected constructor(sourceLocation: SourceLocation, opMapping: IntrinsicOpMapping);
|
|
16
|
+
call(args: Array<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
17
|
+
}
|
|
18
|
+
export declare class FreeIntrinsicOpBuilder extends IntrinsicOpBuilderBase {
|
|
19
|
+
readonly ptype: IntrinsicFunctionType;
|
|
20
|
+
constructor(sourceLocation: SourceLocation, ptype: PType);
|
|
21
|
+
}
|
|
22
|
+
export declare class GroupedIntrinsicOpBuilder extends IntrinsicOpBuilderBase {
|
|
23
|
+
constructor(sourceLocation: SourceLocation, opMapping: IntrinsicOpMapping);
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Expression } from '../../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../../awst/source-location';
|
|
3
|
+
import type { PType } from '../../ptypes';
|
|
4
|
+
import type { BuilderComparisonOp, InstanceBuilder, NodeBuilder } from '../index';
|
|
5
|
+
import { FunctionBuilder } from '../index';
|
|
6
|
+
import { ReferenceTypeExpressionBuilder } from './base';
|
|
7
|
+
export declare class AccountFunctionBuilder extends FunctionBuilder {
|
|
8
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
9
|
+
}
|
|
10
|
+
export declare class AccountExpressionBuilder extends ReferenceTypeExpressionBuilder {
|
|
11
|
+
constructor(expr: Expression);
|
|
12
|
+
compare(other: InstanceBuilder, op: BuilderComparisonOp, sourceLocation: SourceLocation): InstanceBuilder;
|
|
13
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
14
|
+
toBytes(sourceLocation: SourceLocation): Expression;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Expression } from '../../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../../awst/source-location';
|
|
3
|
+
import type { PType } from '../../ptypes';
|
|
4
|
+
import type { InstanceBuilder, NodeBuilder } from '../index';
|
|
5
|
+
import { FunctionBuilder } from '../index';
|
|
6
|
+
import { Uint64BackedReferenceTypeExpressionBuilder } from './base';
|
|
7
|
+
export declare class ApplicationFunctionBuilder extends FunctionBuilder {
|
|
8
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): NodeBuilder;
|
|
9
|
+
}
|
|
10
|
+
export declare class ApplicationExpressionBuilder extends Uint64BackedReferenceTypeExpressionBuilder {
|
|
11
|
+
constructor(expr: Expression);
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Expression } from '../../../awst/nodes';
|
|
2
|
+
import type { SourceLocation } from '../../../awst/source-location';
|
|
3
|
+
import type { PType } from '../../ptypes';
|
|
4
|
+
import type { InstanceBuilder, NodeBuilder } from '../index';
|
|
5
|
+
import { FunctionBuilder } from '../index';
|
|
6
|
+
import { Uint64BackedReferenceTypeExpressionBuilder } from './base';
|
|
7
|
+
export declare class AssetFunctionBuilder extends FunctionBuilder {
|
|
8
|
+
call(args: ReadonlyArray<InstanceBuilder>, typeArgs: ReadonlyArray<PType>, sourceLocation: SourceLocation): InstanceBuilder;
|
|
9
|
+
}
|
|
10
|
+
export declare class AssetExpressionBuilder extends Uint64BackedReferenceTypeExpressionBuilder {
|
|
11
|
+
constructor(expr: Expression);
|
|
12
|
+
memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder;
|
|
13
|
+
}
|