package morbig

  1. Overview
  2. Docs

Module Morbig.CSTHelpersSource

Helpers about programs and complete commands

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

Helpers about words and names

Sourceval unWord : CST.word -> string
Sourceval unName : CST.name -> string
Sourceval word_of_name : CST.name -> CST.word
Sourceval word_of_assignment_word : CST.assignment_word -> CST.word
Sourceval string_of_word : CST.word -> string
Sourceval word_placeholder : unit -> CST.word' ref

Helpers about positions

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

CST destructors

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

wordlist_of_cmd_suffix extracts the list of all words from a cmd_sufix

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

Innovation. Community. Security.