Module Liquidsoap_lang_parser.Term_preprocessor

Parsed-term level preprocessing: %include expansion.

type processor = (Parser.token * Stdlib.Lexing.position * Stdlib.Lexing.position, Liquidsoap_lang_ast.Parsed_term.t) MenhirLib.Convert.revised
exception Includer_error of exn * Sedlexing.lexbuf * Stdlib.Printexc.raw_backtrace
val program : (Parser.token * Stdlib.Lexing.position * Stdlib.Lexing.position, Liquidsoap_lang_ast.Parsed_term.t) MenhirLib__Convert.revised
val script_path_value : string option -> [> `Null | `String of char * string ]
val mk_expr : ?fname:??? -> (Parser.token * Stdlib.Lexing.position * Stdlib.Lexing.position, Liquidsoap_lang_ast.Parsed_term.t) MenhirLib__Convert.revised -> Sedlexing.lexbuf -> Liquidsoap_lang_ast.Parsed_term.t
exception No_extra

Expand every `%include` in tm and normalize `Inline_if` into `If`. Everything else is left alone: the recursion over the other constructors is Parsed_term.map_children, with the block hook doing the splicing.

val expand_statements : restore_script_path:bool -> Liquidsoap_lang_ast.Parsed_term.statement list -> Liquidsoap_lang_ast.Parsed_term.statement list
val expand_statement : restore_script_path:bool -> Liquidsoap_lang_ast.Parsed_term.statement -> Liquidsoap_lang_ast.Parsed_term.statement list