Type alias Expr

Expr: {
    kind: "expr.literal";
    unit?: Unit;
    value: number;
} | {
    id: ID;
    kind: "expr.param";
} | {
    kind: "expr.binary";
    left: Expr;
    op: "+" | "-" | "*" | "/";
    right: Expr;
} | {
    kind: "expr.neg";
    value: Expr;
}

Type declaration

  • kind: "expr.literal"
  • Optional unit?: Unit
  • value: number

Type declaration

  • id: ID
  • kind: "expr.param"

Type declaration

  • kind: "expr.binary"
  • left: Expr
  • op: "+" | "-" | "*" | "/"
  • right: Expr

Type declaration

  • kind: "expr.neg"
  • value: Expr