package morbig

  1. Overview
  2. Docs

Helpers about programs and complete commands

val empty_program : CST.program
val nonempty_program : CST.program -> bool
val complete_command_to_json : CST.complete_command -> Yojson.Safe.json
val program_to_json : CST.program -> Yojson.Safe.json

Helpers about words and names

val unWord : CST.word -> string
val unName : CST.name -> string
val word_of_name : CST.name -> CST.word
val word_of_assignment_word : CST.assignment_word -> CST.word
val string_of_word : CST.word -> string
val word_placeholder : unit -> CST.word' Stdlib.ref
module NameSet : Stdlib.Set.S

Helpers about positions

val on_located : ('a -> 'b) -> 'a CST.located -> 'b
val with_pos : CST.position -> 'a -> 'a CST.located
val with_poss : Stdlib.Lexing.position -> Stdlib.Lexing.position -> 'a -> 'a CST.located
val dummy_lexing_position : Stdlib.Lexing.position
val dummy_position : CST.position
val start_of_position : CST.position -> Stdlib.Lexing.position
val end_of_position : CST.position -> Stdlib.Lexing.position
val filename_of_position : CST.position -> string
val line : Stdlib.Lexing.position -> int
val column : Stdlib.Lexing.position -> int
val characters : Stdlib.Lexing.position -> Stdlib.Lexing.position -> int * int
val emacs_position : string -> int -> int list -> string
val string_of_lexing_position : Stdlib.Lexing.position -> string
val string_of_position : CST.position -> string
val compare_positions : CST.position -> CST.position -> int

CST destructors

val wordlist_of_cmd_suffix : CST.cmd_suffix -> CST.word' list

wordlist_of_cmd_suffix extracts the list of all words from a cmd_sufix

val io_redirect_list_of_cmd_prefix : CST.cmd_prefix -> CST.io_redirect' list
val io_redirect_list_of_cmd_suffix : CST.cmd_suffix -> CST.io_redirect' list
val io_redirect_list_of_simple_command : CST.simple_command -> CST.io_redirect' list
val io_redirect_list_of_redirect_list : CST.redirect_list -> CST.io_redirect' list
OCaml

Innovation. Community. Security.