kielet/plurals/ast

Plural forms abstract syntax tree

Types

pub type Ast {
  N
  Integer(Int)
  BinaryOperation(operator: BinOp, lvalue: Ast, rvalue: Ast)
  If(condition: Ast, truthy: Ast, falsy: Ast)
  Paren(Ast)
}

Constructors

  • N

    Represents the input value

  • Integer(Int)

    Integer literal

  • BinaryOperation(operator: BinOp, lvalue: Ast, rvalue: Ast)
  • If(condition: Ast, truthy: Ast, falsy: Ast)
  • Paren(Ast)

    Parenthesised expression

A binary operation (operation with two arguments)

pub type BinOp {
  Equal
  NotEqual
  GreaterThan
  GreaterThanOrEqual
  LowerThan
  LowerThanOrEqual
  Remainder
  And
  Or
}

Constructors

  • Equal
  • NotEqual
  • GreaterThan
  • GreaterThanOrEqual
  • LowerThan
  • LowerThanOrEqual
  • Remainder
  • And
  • Or
Search Document