MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / ExpressionBuilder

Function ExpressionBuilder

packages/language/src/factory/expression.ts:28–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26} from './primitives';
27
28export const ExpressionBuilder = () =>
29 ({
30 get ArrayExpr() {
31 return new ArrayExprFactory();
32 },
33 get BinaryExpr() {
34 return new BinaryExprFactory();
35 },
36 get BooleanLiteral() {
37 return new BooleanLiteralFactory();
38 },
39 get InvocationExpr() {
40 return new InvocationExprFactory();
41 },
42 get MemberAccessExpr() {
43 return new MemberAccessExprFactory();
44 },
45 get NullExpr() {
46 return new NullExprFactory();
47 },
48 get NumberLiteral() {
49 return new NumberLiteralFactory();
50 },
51 get ObjectExpr() {
52 return new ObjectExprFactory();
53 },
54 get ReferenceExpr() {
55 return new ReferenceExprFactory();
56 },
57 get StringLiteral() {
58 return new StringLiteralFactory();
59 },
60 get ThisExpr() {
61 return new ThisExprFactory();
62 },
63 get UnaryExpr() {
64 return new UnaryExprFactory();
65 },
66 }) satisfies ExpressionBuilderType;
67type ExpressionBuilderType<T extends Expression = Expression> = {
68 [K in T['$type']]: AstFactory<Extract<T, { $type: K }>>;
69};

Callers 10

setValueMethod · 0.90
setValueMethod · 0.90
setOperandMethod · 0.85
setValueMethod · 0.85
setOperandMethod · 0.85
setValueMethod · 0.85
setValueMethod · 0.85
addItemMethod · 0.85
setRightMethod · 0.85
setLeftMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected