pub unsafe extern "C" fn clingo_program_builder_add(
    builder: *mut clingo_program_builder_t,
    ast: *mut clingo_ast_t
) -> bool
Expand description

! Adds a statement to the program. ! ! @attention @ref clingo_program_builder_begin() must be called before adding statements and @ref clingo_program_builder_end() must be called after all statements have been added. ! @param[in] builder the target program builder ! @param[in] ast the AST node to add ! @return whether the call was successful; might set one of the following error codes: ! - ::clingo_error_runtime for statements of invalid form or AST nodes that do not represent statements ! - ::clingo_error_bad_alloc