aboutsummaryrefslogtreecommitdiff
path: root/src/parse-expr.ts
blob: 53de485e669b4d83dadc7bfe6f00c0b36ea601ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import { Enum, constructors } from "./utils/adt";

export type Expr = Enum<{
  Call: { name: string, args: Expr[] }
  Var: { name: string, defaultValue: Expr }
  Identifier: string
  LiteralString: string
}>;

export const Expr = constructors<Expr>();