package tiny_languages

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module St_astSource

Sourcetype pos = int * int
Sourcetype literal =
  1. | L_int of int
  2. | L_large of bool * int list
  3. | L_float of float
  4. | L_char of char
  5. | L_string of string
  6. | L_symbol of string
  7. | L_array of literal list
  8. | L_nil
  9. | L_true
  10. | L_false
Sourcetype expr = {
  1. e : desc;
  2. pos : pos;
}
Sourceand desc =
  1. | Lit of literal
  2. | Var of string
  3. | Assign of string * expr
  4. | Send of expr * string * expr list
  5. | Cascade of expr * (string * expr list * pos) list
  6. | Block of string list * string list * stmt list
Sourceand stmt =
  1. | Expr of expr
  2. | Return of expr * pos
Sourcetype method_ = {
  1. selector : string;
  2. args : string list;
  3. temps : string list;
  4. primitive : int option;
  5. body : stmt list;
}
Sourceval arity : string -> int
Sourceval show_expr : expr -> string
Sourceval show_stmt : stmt -> string
Sourceval show_literal : literal -> string