summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/c/pgf')
-rw-r--r--src/runtime/c/pgf/expr.c88
-rw-r--r--src/runtime/c/pgf/expr.h9
2 files changed, 0 insertions, 97 deletions
diff --git a/src/runtime/c/pgf/expr.c b/src/runtime/c/pgf/expr.c
index 92e92f04f..8580035b2 100644
--- a/src/runtime/c/pgf/expr.c
+++ b/src/runtime/c/pgf/expr.c
@@ -918,94 +918,6 @@ pgf_read_expr(GuIn* in, GuPool* pool, GuPool* tmp_pool, GuExn* err)
return expr;
}
-PGF_API int
-pgf_read_expr_tuple(GuIn* in,
- size_t n_exprs, PgfExpr exprs[],
- GuPool* pool, GuExn* err)
-{
- GuPool* tmp_pool = gu_new_pool();
- PgfExprParser* parser =
- pgf_new_parser(in, pgf_expr_parser_in_getc, pool, tmp_pool, err);
- if (parser->token_tag != PGF_TOKEN_LTRIANGLE)
- goto fail;
- pgf_expr_parser_token(parser, false);
- for (size_t i = 0; i < n_exprs; i++) {
- if (i > 0) {
- if (parser->token_tag != PGF_TOKEN_COMMA)
- goto fail;
- pgf_expr_parser_token(parser, false);
- }
-
- exprs[i] = pgf_expr_parser_expr(parser, false);
- if (gu_variant_is_null(exprs[i]))
- goto fail;
- }
- if (parser->token_tag != PGF_TOKEN_RTRIANGLE)
- goto fail;
- pgf_expr_parser_token(parser, false);
- if (parser->token_tag != PGF_TOKEN_EOF)
- goto fail;
- gu_pool_free(tmp_pool);
-
- return 1;
-
-fail:
- gu_pool_free(tmp_pool);
- return 0;
-}
-
-PGF_API GuSeq*
-pgf_read_expr_matrix(GuIn* in,
- size_t n_exprs,
- GuPool* pool, GuExn* err)
-{
- GuPool* tmp_pool = gu_new_pool();
- PgfExprParser* parser =
- pgf_new_parser(in, pgf_expr_parser_in_getc, pool, tmp_pool, err);
- if (parser->token_tag != PGF_TOKEN_LTRIANGLE)
- goto fail;
- pgf_expr_parser_token(parser, false);
-
- GuBuf* buf = gu_new_buf(PgfExpr, pool);
-
- if (parser->token_tag != PGF_TOKEN_RTRIANGLE) {
- for (;;) {
- PgfExpr* exprs = gu_buf_extend_n(buf, n_exprs);
-
- for (size_t i = 0; i < n_exprs; i++) {
- if (i > 0) {
- if (parser->token_tag != PGF_TOKEN_COMMA)
- goto fail;
- pgf_expr_parser_token(parser, false);
- }
-
- exprs[i] = pgf_expr_parser_expr(parser, false);
- if (gu_variant_is_null(exprs[i]))
- goto fail;
- }
-
- if (parser->token_tag != PGF_TOKEN_SEMI)
- break;
-
- pgf_expr_parser_token(parser, false);
- }
-
- if (parser->token_tag != PGF_TOKEN_RTRIANGLE)
- goto fail;
- }
-
- pgf_expr_parser_token(parser, false);
- if (parser->token_tag != PGF_TOKEN_EOF)
- goto fail;
- gu_pool_free(tmp_pool);
-
- return gu_buf_data_seq(buf);
-
-fail:
- gu_pool_free(tmp_pool);
- return NULL;
-}
-
PGF_API PgfType*
pgf_read_type(GuIn* in, GuPool* pool, GuPool* tmp_pool, GuExn* err)
{
diff --git a/src/runtime/c/pgf/expr.h b/src/runtime/c/pgf/expr.h
index b775bd9b5..2c960ac92 100644
--- a/src/runtime/c/pgf/expr.h
+++ b/src/runtime/c/pgf/expr.h
@@ -170,15 +170,6 @@ pgf_expr_unmeta(PgfExpr expr);
PGF_API_DECL PgfExpr
pgf_read_expr(GuIn* in, GuPool* pool, GuPool* tmp_pool, GuExn* err);
-PGF_API_DECL int
-pgf_read_expr_tuple(GuIn* in,
- size_t n_exprs, PgfExpr exprs[],
- GuPool* pool, GuExn* err);
-
-PGF_API_DECL GuSeq*
-pgf_read_expr_matrix(GuIn* in, size_t n_exprs,
- GuPool* pool, GuExn* err);
-
PGF_API_DECL PgfType*
pgf_read_type(GuIn* in, GuPool* pool, GuPool* tmp_pool, GuExn* err);