Liquidsoap_lang_parser.Parser_helperTerm constructors used by the grammar's actions.
Helper functions for the parser.
module Vars = Liquidsoap_lang_ast.Parsed_term.Varstype arglist = Liquidsoap_lang_ast.Parsed_term.fun_arg listtype pos = Liquidsoap_lang_ast.Parsed_term.postype let_opt_el = string * Liquidsoap_lang_ast.Parsed_term.tval get_pending_comments : unit -> (pos * string list) listval append_comment : pos:pos -> string -> unitval attach_comments : Liquidsoap_lang_ast.Parsed_term.t -> unitval mk_stmt :
pos:pos ->
Liquidsoap_lang_ast.Parsed_term.statement_ast ->
Liquidsoap_lang_ast.Parsed_term.statementval mk_block :
pos:pos ->
Liquidsoap_lang_ast.Parsed_term.statement list ->
Liquidsoap_lang_ast.Parsed_term.blockval expr_of_block :
pos:pos ->
Liquidsoap_lang_ast.Parsed_term.block ->
Liquidsoap_lang_ast.Parsed_term.tA block where an expression is expected. A single-expression block is returned unwrapped, which is the common case (`if a then`, `def f() = e end`) and keeps the AST free of redundant `Block` nodes.
val block_expr :
pos:pos ->
Liquidsoap_lang_ast.Parsed_term.statement list ->
Liquidsoap_lang_ast.Parsed_term.tval binding_target :
Liquidsoap_lang_ast.Parsed_term.t ->
Liquidsoap_lang_ast.Parsed_term.pattern
* Liquidsoap_lang_ast.Parsed_term.type_annotation optionReinterpret a bare binding's left-hand side, parsed as an expression, as a pattern plus an optional type annotation. Raises Term.Parse_error if it is not a valid target.
val let_args :
kind:Liquidsoap_lang_ast.Parsed_term.binding_kind ->
decoration:Liquidsoap_lang_ast.Parsed_term.let_decoration ->
pat:Liquidsoap_lang_ast.Parsed_term.pattern ->
?arglist:arglist ->
def:Liquidsoap_lang_ast.Parsed_term.t ->
?cast:Liquidsoap_lang_ast.Parsed_term.type_annotation ->
unit ->
Liquidsoap_lang_ast.Parsed_term._letval let_decoration_of_lexer_let_decoration :
lexer_let_decoration ->
Liquidsoap_lang_ast.Parsed_term.let_decorationval expect_keyword : pos:pos -> string -> string -> unitCheck a contextual keyword's spelling, e.g. the `as` of `as json.object`. Raises Term.Parse_error naming what was expected.
val mk_json_object_ty :
pos:pos ->
Liquidsoap_lang_ast.Parsed_term.type_annotation ->
Liquidsoap_lang_ast.Parsed_term.type_annotationval mk_source_ty :
pos:pos ->
string ->
Liquidsoap_lang_ast.Parsed_term.source_annotation ->
Liquidsoap_lang_ast.Parsed_term.type_annotationval mk_named_ty :
pos:pos ->
string ->
Liquidsoap_lang_ast.Parsed_term.type_annotation option ->
Liquidsoap_lang_ast.Parsed_term.type_annotationval mk :
?comments:(pos * Liquidsoap_lang_ast.Parsed_term.comment) list ->
?annotations:Liquidsoap_lang_ast.Parsed_term.term_annotation list ->
pos:pos ->
Liquidsoap_lang_ast.Parsed_term.parsed_ast ->
Liquidsoap_lang_ast.Parsed_term.tval mk_try :
?handler:Liquidsoap_lang_ast.Parsed_term._try_handler ->
?finally_block:Liquidsoap_lang_ast.Parsed_term.block ->
body_block:Liquidsoap_lang_ast.Parsed_term.block ->
pos:pos ->
unit ->
Liquidsoap_lang_ast.Parsed_term.tval mk_fun :
pos:pos ->
arglist ->
Liquidsoap_lang_ast.Parsed_term.t ->
Liquidsoap_lang_ast.Parsed_term.tval mk_encoder :
pos:pos ->
string ->
Liquidsoap_lang_ast.Parsed_term.encoder_params ->
Liquidsoap_lang_ast.Parsed_term.tval args_of_json_parse : pos:pos -> (string * 'a) list -> (string * 'a) listval render_string : pos:pos -> (char * string) -> string