yukigo 0.2.0 → 0.2.2

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/analyzer/index.d.ts +7 -0
  3. package/dist/src/analyzer/GraphBuilder.d.ts +30 -0
  4. package/dist/src/analyzer/GraphBuilder.js +100 -0
  5. package/dist/src/analyzer/index.d.ts +59 -0
  6. package/dist/src/analyzer/index.js +152 -0
  7. package/dist/src/analyzer/inspections/functional/functional.d.ts +44 -0
  8. package/dist/src/analyzer/inspections/functional/functional.js +149 -0
  9. package/dist/src/analyzer/inspections/functional/smells.d.ts +16 -0
  10. package/dist/src/analyzer/inspections/functional/smells.js +98 -0
  11. package/dist/src/analyzer/inspections/generic/generic.d.ts +178 -0
  12. package/dist/src/analyzer/inspections/generic/generic.js +604 -0
  13. package/dist/src/analyzer/inspections/generic/smells.d.ts +61 -0
  14. package/dist/src/analyzer/inspections/generic/smells.js +349 -0
  15. package/dist/src/analyzer/inspections/imperative/imperative.d.ts +35 -0
  16. package/dist/src/analyzer/inspections/imperative/imperative.js +109 -0
  17. package/dist/src/analyzer/inspections/imperative/smells.d.ts +16 -0
  18. package/dist/src/analyzer/inspections/imperative/smells.js +58 -0
  19. package/dist/src/analyzer/inspections/logic/logic.d.ts +32 -0
  20. package/dist/src/analyzer/inspections/logic/logic.js +96 -0
  21. package/dist/src/analyzer/inspections/logic/smells.d.ts +15 -0
  22. package/dist/src/analyzer/inspections/logic/smells.js +60 -0
  23. package/dist/src/analyzer/inspections/object/object.d.ts +90 -0
  24. package/dist/src/analyzer/inspections/object/object.js +321 -0
  25. package/dist/src/analyzer/inspections/object/smells.d.ts +30 -0
  26. package/dist/src/analyzer/inspections/object/smells.js +135 -0
  27. package/dist/src/analyzer/utils.d.ts +30 -0
  28. package/dist/src/analyzer/utils.js +78 -0
  29. package/dist/src/index.d.ts +4 -0
  30. package/dist/src/index.js +4 -0
  31. package/dist/src/interpreter/components/EnvBuilder.d.ts +21 -0
  32. package/dist/src/interpreter/components/EnvBuilder.js +155 -0
  33. package/dist/src/interpreter/components/Operations.d.ts +14 -0
  34. package/dist/src/interpreter/components/Operations.js +84 -0
  35. package/dist/src/interpreter/components/PatternMatcher.d.ts +73 -0
  36. package/dist/src/interpreter/components/PatternMatcher.js +358 -0
  37. package/dist/src/interpreter/components/RuntimeContext.d.ts +35 -0
  38. package/dist/src/interpreter/components/RuntimeContext.js +93 -0
  39. package/dist/src/interpreter/components/TestRunner.d.ts +19 -0
  40. package/dist/src/interpreter/components/TestRunner.js +110 -0
  41. package/dist/src/interpreter/components/Visitor.d.ts +71 -0
  42. package/dist/src/interpreter/components/Visitor.js +638 -0
  43. package/dist/src/interpreter/components/logic/LogicEngine.d.ts +29 -0
  44. package/dist/src/interpreter/components/logic/LogicEngine.js +259 -0
  45. package/dist/src/interpreter/components/logic/LogicResolver.d.ts +53 -0
  46. package/dist/src/interpreter/components/logic/LogicResolver.js +484 -0
  47. package/dist/src/interpreter/components/logic/LogicTranslator.d.ts +14 -0
  48. package/dist/src/interpreter/components/logic/LogicTranslator.js +99 -0
  49. package/dist/src/interpreter/components/runtimes/FunctionRuntime.d.ts +12 -0
  50. package/dist/src/interpreter/components/runtimes/FunctionRuntime.js +149 -0
  51. package/dist/src/interpreter/components/runtimes/LazyRuntime.d.ts +19 -0
  52. package/dist/src/interpreter/components/runtimes/LazyRuntime.js +269 -0
  53. package/dist/src/interpreter/components/runtimes/ObjectRuntime.d.ts +35 -0
  54. package/dist/src/interpreter/components/runtimes/ObjectRuntime.js +126 -0
  55. package/dist/src/interpreter/errors.d.ts +19 -0
  56. package/dist/src/interpreter/errors.js +36 -0
  57. package/dist/src/interpreter/index.d.ts +24 -0
  58. package/dist/src/interpreter/index.js +41 -0
  59. package/dist/src/interpreter/trampoline.d.ts +17 -0
  60. package/dist/src/interpreter/trampoline.js +38 -0
  61. package/dist/src/interpreter/utils.d.ts +11 -0
  62. package/dist/src/interpreter/utils.js +65 -0
  63. package/dist/src/tester/index.d.ts +25 -0
  64. package/dist/src/tester/index.js +113 -0
  65. package/dist/src/utils/helpers.d.ts +13 -0
  66. package/dist/src/utils/helpers.js +52 -0
  67. package/dist/utils/helpers.d.ts +5 -1
  68. package/dist/utils/helpers.js +79 -6
  69. package/package.json +4 -2
  70. package/src/analyzer/index.ts +9 -0
  71. package/src/utils/helpers.ts +111 -10
  72. package/tests/analyzer/helpers.spec.ts +14 -8
  73. package/tests/tester/Tester.spec.ts +0 -1
@@ -0,0 +1,78 @@
1
+ import { TraverseVisitor, } from "yukigo-ast";
2
+ export class InspectionVisitor extends TraverseVisitor {
3
+ fallback(node) { }
4
+ }
5
+ export class ScopedVisitor extends InspectionVisitor {
6
+ binding;
7
+ inScope = false;
8
+ constructor(binding) {
9
+ super();
10
+ this.setBinding(binding);
11
+ }
12
+ setBinding(binding) {
13
+ this.binding = binding;
14
+ this.inScope = !binding;
15
+ }
16
+ visitVariable(node) {
17
+ this.manageScope(node, () => super.visitVariable(node));
18
+ }
19
+ visitFunction(node) {
20
+ this.manageScope(node, () => super.visitFunction(node));
21
+ }
22
+ visitClass(node) {
23
+ this.manageScope(node, () => super.visitClass(node));
24
+ }
25
+ visitObject(node) {
26
+ this.manageScope(node, () => super.visitObject(node));
27
+ }
28
+ visitMethod(node) {
29
+ this.manageScope(node, () => super.visitMethod(node));
30
+ }
31
+ visitRule(node) {
32
+ this.manageScope(node, () => super.visitRule(node));
33
+ }
34
+ visitFact(node) {
35
+ this.manageScope(node, () => super.visitFact(node));
36
+ }
37
+ visitProcedure(node) {
38
+ this.manageScope(node, () => super.visitProcedure(node));
39
+ }
40
+ fallback(node) { }
41
+ manageScope(node, traverse) {
42
+ const isTarget = node.identifier.value === this.binding;
43
+ if (isTarget)
44
+ this.inScope = true;
45
+ traverse();
46
+ if (isTarget)
47
+ this.inScope = false;
48
+ }
49
+ }
50
+ export function AutoScoped(constructor) {
51
+ const proto = constructor.prototype;
52
+ const methodNames = Object.getOwnPropertyNames(proto);
53
+ for (const name of methodNames) {
54
+ if (isValidVisitMethod(name)) {
55
+ const originalMethod = proto[name];
56
+ // replace the method on the prototype
57
+ proto[name] = function (node) {
58
+ if (!this.inScope)
59
+ return;
60
+ // run the inspection logic if in scope
61
+ return originalMethod.call(this, node);
62
+ };
63
+ }
64
+ }
65
+ }
66
+ function isScopeBoundary(name) {
67
+ return [
68
+ "visitFunction",
69
+ "visitMethod",
70
+ "visitProcedure",
71
+ "visitRule",
72
+ "visitFact",
73
+ "visitVariable",
74
+ "visitClass",
75
+ "visitObject",
76
+ ].includes(name);
77
+ }
78
+ const isValidVisitMethod = (name) => name.startsWith("visit") && name !== "constructor" && !isScopeBoundary(name);
@@ -0,0 +1,4 @@
1
+ export * from "./interpreter/index.js";
2
+ export * from "./analyzer/index.js";
3
+ export * from "./tester/index.js";
4
+ export * from "./utils/helpers.js";
@@ -0,0 +1,4 @@
1
+ export * from "./interpreter/index.js";
2
+ export * from "./analyzer/index.js";
3
+ export * from "./tester/index.js";
4
+ export * from "./utils/helpers.js";
@@ -0,0 +1,21 @@
1
+ import { AST, ASTNode, Class, Fact, Function, Rule, TraverseVisitor, Object, Variable, Sequence } from "yukigo-ast";
2
+ import { RuntimeContext } from "./RuntimeContext.js";
3
+ /**
4
+ * Builds the initial environment by collecting all top-level function declarations.
5
+ * Each function captures a closure of the environment at its definition time,
6
+ * allowing recursion by including itself in the closure.
7
+ */
8
+ export declare class EnvBuilderVisitor extends TraverseVisitor {
9
+ private ctx;
10
+ constructor(ctx: RuntimeContext);
11
+ build(ast: AST): void;
12
+ visitSequence(node: Sequence): void;
13
+ visitFunction(node: Function): void;
14
+ visitClass(node: Class): void;
15
+ visitObject(node: Object): void;
16
+ visitFact(node: Fact): void;
17
+ visitRule(node: Rule): void;
18
+ visitVariable(node: Variable): void;
19
+ visit(node: ASTNode): void;
20
+ fallback(node: ASTNode): string;
21
+ }
@@ -0,0 +1,155 @@
1
+ import { isRuntimePredicate, TraverseVisitor, } from "yukigo-ast";
2
+ import { InterpreterVisitor } from "./Visitor.js";
3
+ import { idContinuation, trampoline } from "../trampoline.js";
4
+ import { InterpreterError } from "../errors.js";
5
+ import { UnexpectedNode } from "../../utils/helpers.js";
6
+ /**
7
+ * Builds the initial environment by collecting all top-level function declarations.
8
+ * Each function captures a closure of the environment at its definition time,
9
+ * allowing recursion by including itself in the closure.
10
+ */
11
+ export class EnvBuilderVisitor extends TraverseVisitor {
12
+ ctx;
13
+ constructor(ctx) {
14
+ super();
15
+ this.ctx = ctx;
16
+ }
17
+ build(ast) {
18
+ for (const node of ast)
19
+ node.accept(this);
20
+ }
21
+ visitSequence(node) {
22
+ for (const stmt of node.statements)
23
+ stmt.accept(this);
24
+ }
25
+ visitFunction(node) {
26
+ const name = node.identifier.value;
27
+ if (this.ctx.config.debug)
28
+ console.log(`[EnvBuilder] Defining function: ${name}`);
29
+ if (node.equations.length === 0)
30
+ throw new Error(`Function ${name} has no equations`);
31
+ const arity = node.equations[0].patterns.length;
32
+ if (node.equations.some((eq) => eq.patterns.length !== arity))
33
+ throw new Error(`All equations of ${name} must have the same arity`);
34
+ let placeholder = { type: "Function", arity: 0, equations: [] };
35
+ this.ctx.define(name, placeholder);
36
+ const equations = node.equations.map((eq) => ({
37
+ patterns: eq.patterns,
38
+ body: eq.body,
39
+ }));
40
+ const runtimeFunc = {
41
+ type: "Function",
42
+ identifier: name,
43
+ arity,
44
+ equations,
45
+ closure: this.ctx.env,
46
+ };
47
+ this.ctx.define(name, runtimeFunc);
48
+ }
49
+ visitClass(node) {
50
+ const identifier = node.identifier.value;
51
+ if (this.ctx.config.debug)
52
+ console.log(`[EnvBuilder] Defining class: ${identifier}`);
53
+ const superclass = node.extendsSymbol?.value;
54
+ const mixins = node.includes.map((symbol) => symbol.value);
55
+ const collector = new OOPCollector();
56
+ node.expression.accept(collector);
57
+ const fields = collector.collectedFields;
58
+ const methods = collector.collectedMethods;
59
+ const runtimeClass = {
60
+ type: "Class",
61
+ identifier,
62
+ fields,
63
+ methods,
64
+ superclass,
65
+ mixins,
66
+ };
67
+ this.ctx.define(identifier, runtimeClass);
68
+ }
69
+ visitObject(node) {
70
+ const identifier = node.identifier.value;
71
+ if (this.ctx.config.debug)
72
+ console.log(`[EnvBuilder] Defining object: ${identifier}`);
73
+ const collector = new OOPCollector();
74
+ node.expression.accept(collector);
75
+ const fields = collector.collectedFields;
76
+ const methods = collector.collectedMethods;
77
+ const runtimeObject = {
78
+ type: "Object",
79
+ identifier,
80
+ className: "",
81
+ fields,
82
+ methods,
83
+ };
84
+ this.ctx.define(identifier, runtimeObject);
85
+ }
86
+ visitFact(node) {
87
+ const identifier = node.identifier.value;
88
+ if (this.ctx.config.debug)
89
+ console.log(`[EnvBuilder] Defining fact: ${identifier}`);
90
+ try {
91
+ const runtimeValue = this.ctx.lookup(identifier);
92
+ if (!isRuntimePredicate(runtimeValue))
93
+ throw new InterpreterError("EnvBuilder", `"${identifier}" is not a predicate. Maybe there is something else defined as "${identifier}"?`);
94
+ runtimeValue.equations.push(node);
95
+ }
96
+ catch (error) {
97
+ this.ctx.define(identifier, {
98
+ kind: "Predicate",
99
+ identifier,
100
+ equations: [node],
101
+ });
102
+ }
103
+ }
104
+ visitRule(node) {
105
+ const identifier = node.identifier.value;
106
+ if (this.ctx.config.debug)
107
+ console.log(`[EnvBuilder] Defining rule: ${identifier}`);
108
+ try {
109
+ const runtimeValue = this.ctx.lookup(identifier);
110
+ if (!isRuntimePredicate(runtimeValue))
111
+ throw new InterpreterError("EnvBuilder", `"${identifier}" is not a predicate. Maybe there is something else defined as "${identifier}"?`);
112
+ runtimeValue.equations.push(node);
113
+ }
114
+ catch (error) {
115
+ this.ctx.define(identifier, {
116
+ kind: "Predicate",
117
+ identifier,
118
+ equations: [node],
119
+ });
120
+ }
121
+ }
122
+ visitVariable(node) {
123
+ const identifier = node.identifier.value;
124
+ if (this.ctx.config.debug)
125
+ console.log(`[EnvBuilder] Defining variable: ${identifier}`);
126
+ const interpreter = new InterpreterVisitor(this.ctx);
127
+ const cps = node.expression.accept(interpreter);
128
+ this.ctx.define(identifier, trampoline(cps(idContinuation)));
129
+ }
130
+ visit(node) {
131
+ return node.accept(this);
132
+ }
133
+ fallback(node) {
134
+ throw new UnexpectedNode(node.constructor.name, "EnvBuilderVisitor");
135
+ }
136
+ }
137
+ class OOPCollector extends TraverseVisitor {
138
+ collectedMethods = new Map();
139
+ collectedFields = new Map();
140
+ visitMethod(node) {
141
+ const runtimeMethod = {
142
+ type: "Function",
143
+ identifier: node.identifier.value,
144
+ arity: node.equations[0].patterns.length,
145
+ equations: node.equations,
146
+ };
147
+ this.collectedMethods.set(node.identifier.value, runtimeMethod);
148
+ }
149
+ visitAttribute(node) {
150
+ this.collectedFields.set(node.identifier.value, InterpreterVisitor.evaluateLiteral(node.expression));
151
+ }
152
+ fallback(node) {
153
+ throw new UnexpectedNode(node.constructor.name, "OOPCollector");
154
+ }
155
+ }
@@ -0,0 +1,14 @@
1
+ import { PrimitiveValue } from "yukigo-ast";
2
+ export type UnaryOp<T, R = T> = (x: T) => R;
3
+ export type BinaryOp<T, R = T> = (x: T, y: T) => R;
4
+ export type OperatorTable<T> = Record<string, T>;
5
+ export declare const ArithmeticBinaryTable: OperatorTable<BinaryOp<number>>;
6
+ export declare const ComparisonOperationTable: OperatorTable<BinaryOp<boolean>>;
7
+ export declare const LogicalBinaryTable: OperatorTable<(l: boolean, r: () => boolean) => boolean>;
8
+ export declare const BitwiseBinaryTable: OperatorTable<BinaryOp<number>>;
9
+ export declare const StringOperationTable: OperatorTable<BinaryOp<any, string>>;
10
+ export declare const BitwiseUnaryTable: OperatorTable<UnaryOp<number>>;
11
+ export declare const LogicalUnaryTable: OperatorTable<UnaryOp<boolean>>;
12
+ export declare const ListBinaryTable: OperatorTable<BinaryOp<any, PrimitiveValue>>;
13
+ export declare const ListUnaryTable: OperatorTable<UnaryOp<PrimitiveValue[], PrimitiveValue>>;
14
+ export declare const ArithmeticUnaryTable: OperatorTable<UnaryOp<number, number | string>>;
@@ -0,0 +1,84 @@
1
+ import { isArrayOfNumbers } from "../utils.js";
2
+ export const ArithmeticBinaryTable = {
3
+ Plus: (a, b) => a + b,
4
+ Minus: (a, b) => a - b,
5
+ Multiply: (a, b) => a * b,
6
+ Divide: (a, b) => a / b,
7
+ Modulo: (a, b) => a % b,
8
+ Power: (a, b) => a ** b,
9
+ Min: (a, b) => Math.min(a, b),
10
+ Max: (a, b) => Math.max(a, b),
11
+ };
12
+ export const ComparisonOperationTable = {
13
+ Equal: (a, b) => a == b,
14
+ NotEqual: (a, b) => a != b,
15
+ Same: (a, b) => a === b,
16
+ NotSame: (a, b) => a !== b,
17
+ //Similar: (a, b) => ,
18
+ //NotSimilar: (a, b) => ,
19
+ GreaterOrEqualThan: (a, b) => a >= b,
20
+ GreaterThan: (a, b) => a > b,
21
+ LessOrEqualThan: (a, b) => a <= b,
22
+ LessThan: (a, b) => a < b,
23
+ };
24
+ export const LogicalBinaryTable = {
25
+ And: (left, rightThunk) => left && rightThunk(),
26
+ Or: (left, rightThunk) => left || rightThunk(),
27
+ };
28
+ export const BitwiseBinaryTable = {
29
+ BitwiseOr: (a, b) => a | b,
30
+ BitwiseAnd: (a, b) => a & b,
31
+ BitwiseLeftShift: (a, b) => a << b,
32
+ BitwiseRightShift: (a, b) => a >> b,
33
+ BitwiseUnsignedRightShift: (a, b) => a >>> b,
34
+ BitwiseXor: (a, b) => a ^ b,
35
+ };
36
+ export const StringOperationTable = {
37
+ Concat: (a, b) => {
38
+ if ((typeof a !== "string" && typeof a !== "number") ||
39
+ (typeof b !== "string" && typeof b !== "number")) {
40
+ throw new Error(`String Concatenation: operands must be strings or numbers, got ${typeof a} and ${typeof b}`);
41
+ }
42
+ return String(a) + String(b);
43
+ },
44
+ };
45
+ export const BitwiseUnaryTable = {
46
+ BitwiseNot: (a) => ~a,
47
+ };
48
+ export const LogicalUnaryTable = {
49
+ Negation: (a) => !a,
50
+ };
51
+ export const ListBinaryTable = {
52
+ Concat: (a, b) => {
53
+ const res = a.concat(b);
54
+ if (typeof a === "string" && typeof b === "string") {
55
+ const hasNonString = res.some((c) => typeof c !== "string");
56
+ if (!hasNonString)
57
+ return res.join("");
58
+ }
59
+ return res;
60
+ },
61
+ };
62
+ export const ListUnaryTable = {
63
+ Size: (a) => a.length,
64
+ DetectMax: (a) => {
65
+ if (!isArrayOfNumbers(a))
66
+ throw new Error("Operand of DetectMax must be Array of numbers");
67
+ return Math.max(...a);
68
+ },
69
+ DetectMin: (a) => {
70
+ if (!isArrayOfNumbers(a))
71
+ throw new Error("Operand of DetectMin must be Array of numbers");
72
+ return Math.min(...a);
73
+ },
74
+ Flatten: (a) => a.flat(),
75
+ };
76
+ export const ArithmeticUnaryTable = {
77
+ Round: (a) => Math.round(a),
78
+ Absolute: (a) => Math.abs(a),
79
+ Ceil: (a) => Math.ceil(a),
80
+ Floor: (a) => Math.floor(a),
81
+ Negation: (a) => a * -1,
82
+ Sqrt: (a) => Math.sqrt(a),
83
+ ToString: (a) => String(a),
84
+ };
@@ -0,0 +1,73 @@
1
+ import { ApplicationPattern, AsPattern, ASTNode, ConsPattern, ConstructorPattern, Expression, FunctorPattern, LazyList, ListPattern, LiteralPattern, PrimitiveValue, TuplePattern, UnionPattern, VariablePattern, Visitor, WildcardPattern, TypePattern, EnvStack } from "yukigo-ast";
2
+ import { Bindings } from "../index.js";
3
+ import { CPSThunk } from "../trampoline.js";
4
+ import { RuntimeContext } from "./RuntimeContext.js";
5
+ import { ExpressionEvaluator } from "../utils.js";
6
+ declare class SharedSequence {
7
+ private cache;
8
+ private source;
9
+ private isDone;
10
+ constructor(generatorFactory: () => Generator<PrimitiveValue, void, unknown>);
11
+ get(index: number): {
12
+ value: PrimitiveValue | null;
13
+ done: boolean;
14
+ };
15
+ }
16
+ export interface InternalConsState {
17
+ readonly head: PrimitiveValue;
18
+ readonly tailExpr: Expression;
19
+ readonly evaluator: ExpressionEvaluator;
20
+ readonly capturedEnv: EnvStack;
21
+ realizedTail?: PrimitiveValue;
22
+ }
23
+ export interface MemoizedLazyList extends LazyList {
24
+ _sequence: SharedSequence;
25
+ _offset: number;
26
+ _consState?: InternalConsState;
27
+ toJSON: () => any;
28
+ }
29
+ export declare function isMemoizedList(list: unknown): list is MemoizedLazyList;
30
+ export declare function createMemoizedStream(genFactory: () => Generator<PrimitiveValue, void, unknown>, sequence?: SharedSequence, offset?: number): MemoizedLazyList;
31
+ export declare class PatternResolver implements Visitor<string> {
32
+ visitVariablePattern(node: VariablePattern): string;
33
+ visitWildcardPattern(node: WildcardPattern): string;
34
+ visitLiteralPattern(node: LiteralPattern): string;
35
+ visitTuplePattern(node: TuplePattern): string;
36
+ visitListPattern(node: ListPattern): string;
37
+ visitConsPattern(node: ConsPattern): string;
38
+ visitConstructorPattern(node: ConstructorPattern): string;
39
+ visitFunctorPattern(node: FunctorPattern): string;
40
+ visitApplicationPattern(node: ApplicationPattern): string;
41
+ visitAsPattern(node: AsPattern): string;
42
+ visitTypePattern(node: TypePattern): string;
43
+ visit(node: ASTNode): string;
44
+ fallback(node: ASTNode): string;
45
+ }
46
+ /**
47
+ * Recursively matches a value against a pattern node.
48
+ * Updates `bindings` when variables are bound successfully.
49
+ * Returns true if the pattern matches, false otherwise.
50
+ */
51
+ export declare class PatternMatcher implements Visitor<CPSThunk<boolean>> {
52
+ private value;
53
+ private bindings;
54
+ private ctx;
55
+ constructor(value: PrimitiveValue, bindings: Bindings, ctx: RuntimeContext);
56
+ visitVariablePattern(node: VariablePattern): CPSThunk<boolean>;
57
+ visitWildcardPattern(node: WildcardPattern): CPSThunk<boolean>;
58
+ visitLiteralPattern(node: LiteralPattern): CPSThunk<boolean>;
59
+ visitTuplePattern(node: TuplePattern): CPSThunk<boolean>;
60
+ visitListPattern(node: ListPattern): CPSThunk<boolean>;
61
+ private matchList;
62
+ visitConsPattern(node: ConsPattern): CPSThunk<boolean>;
63
+ visitTypePattern(node: TypePattern): CPSThunk<boolean>;
64
+ private resolveCons;
65
+ visitConstructorPattern(node: ConstructorPattern): CPSThunk<boolean>;
66
+ visitFunctorPattern(node: FunctorPattern): CPSThunk<boolean>;
67
+ visitApplicationPattern(node: ApplicationPattern): CPSThunk<boolean>;
68
+ visitAsPattern(node: AsPattern): CPSThunk<boolean>;
69
+ visitUnionPattern(node: UnionPattern): CPSThunk<boolean>;
70
+ visit(node: ASTNode): CPSThunk<boolean>;
71
+ fallback(node: ASTNode): CPSThunk<boolean>;
72
+ }
73
+ export {};