Module Scratch_blocks

type category =
  1. | Motion
  2. | Looks
  3. | Events
  4. | Control
  5. | Sensing
  6. | Operators
  7. | Variables
  8. | Pen
  9. | Lists
  10. | Other
type shape =
  1. | Hat
  2. | Stack
  3. | Cap
  4. | C_block
  5. | C_cap
  6. | Reporter
  7. | Predicate
  8. | Ring
  9. | Command_ring
type part =
  1. | Word of string
  2. | Num of string
  3. | Text of string
  4. | Menu of string
  5. | Bool
  6. | Lambda of string
type spec = {
  1. op : string;
  2. category : category;
  3. shape : shape;
  4. lines : part list list;
}
type arg =
  1. | Lit of string
  2. | Block of block
and block = {
  1. op : string;
  2. args : arg list;
  3. mouths : block list list;
}
type script = {
  1. x : float;
  2. y : float;
  3. blocks : block list;
}
val specs : spec list
val snap_specs : spec list
val categories : category list
val snap_categories : category list
val category_name : category -> string
val spec : string -> spec
val custom_op : string -> string -> string
val params : string -> string list
val slots : spec -> part list
val make : string -> block
val variable : string -> block