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

Method visit

packages/orm/src/utils/schema-utils.ts:19–32  ·  view source on GitHub ↗
(expr: Expression)

Source from the content-addressed store, hash-verified

17
18export class ExpressionVisitor {
19 visit(expr: Expression): VisitResult {
20 return match(expr)
21 .with({ kind: 'literal' }, (e) => this.visitLiteral(e))
22 .with({ kind: 'array' }, (e) => this.visitArray(e))
23 .with({ kind: 'field' }, (e) => this.visitField(e))
24 .with({ kind: 'member' }, (e) => this.visitMember(e))
25 .with({ kind: 'binary' }, (e) => this.visitBinary(e))
26 .with({ kind: 'unary' }, (e) => this.visitUnary(e))
27 .with({ kind: 'call' }, (e) => this.visitCall(e))
28 .with({ kind: 'binding' }, (e) => this.visitBinding(e))
29 .with({ kind: 'this' }, (e) => this.visitThis(e))
30 .with({ kind: 'null' }, (e) => this.visitNull(e))
31 .exhaustive();
32 }
33
34 protected visitLiteral(_e: LiteralExpression): VisitResult {}
35

Callers 7

visitArrayMethod · 0.95
visitMemberMethod · 0.95
visitBinaryMethod · 0.95
visitUnaryMethod · 0.95
visitCallMethod · 0.95
visitMethod · 0.45

Calls 10

visitLiteralMethod · 0.95
visitArrayMethod · 0.95
visitFieldMethod · 0.95
visitMemberMethod · 0.95
visitBinaryMethod · 0.95
visitUnaryMethod · 0.95
visitCallMethod · 0.95
visitBindingMethod · 0.95
visitThisMethod · 0.95
visitNullMethod · 0.95

Tested by

no test coverage detected