summaryrefslogtreecommitdiffstats
path: root/llparse-builder/src/code/base.ts
blob: 00b479f72e7fb04fa9e891b6692bf41e906e4d24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
export type Signature = 'match' | 'value';

/**
 * Base code class.
 */
export abstract class Code {
  /**
   * @param signature  Code signature to be used. `match` means that code takes
   *                   no input value (from `.select()`), otherwise it must be
   *                   `value`
   * @param name       External function or intrinsic name.
   */
  constructor(public readonly signature: Signature,
              public readonly name: string) {
  }
}