added an API for cloning expressions/types/literals

This commit is contained in:
krangelov
2020-08-14 20:54:15 +02:00
parent 830dbe760d
commit 23edeec5a9
6 changed files with 179 additions and 74 deletions

View File

@@ -233,6 +233,15 @@ PGF_API_DECL void
pgf_print_expr_tuple(size_t n_exprs, PgfExpr exprs[], PgfPrintContext* ctxt,
GuOut* out, GuExn* err);
PGF_API PgfLiteral
pgf_clone_literal(PgfLiteral lit, GuPool* pool);
PGF_API PgfExpr
pgf_clone_expr(PgfExpr expr, GuPool* pool);
PGF_API PgfType*
pgf_clone_type(PgfType* type, GuPool* pool);
PGF_API_DECL prob_t
pgf_compute_tree_probability(PgfPGF *gr, PgfExpr expr);