From 6f5de04b14b87d5f9f3c65433c13e1bce8892e95 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 18 Sep 2024 00:43:50 -0400 Subject: [PATCH] Deprecate dead code --- parse.c | 20 -------------------- parse.h | 1 - 2 files changed, 21 deletions(-) diff --git a/parse.c b/parse.c index b72df36..4ed9b06 100644 --- a/parse.c +++ b/parse.c @@ -2411,24 +2411,4 @@ type_ast_t *parse_type_str(const char *str) { return ast; } -ast_t *parse_expression_str(const char *str) { - file_t *file = spoof_file("", str); - parse_ctx_t ctx = { - .file=file, - .on_err=NULL, - .next_lambda_id=0, - }; - - const char *pos = file->text; - whitespace(&pos); - ast_t *ast = parse_extended_expr(&ctx, pos); - if (!ast) return ast; - pos = ast->end; - whitespace(&pos); - if (strlen(pos) > 0) { - parser_err(&ctx, pos, pos + strlen(pos), "I couldn't parse this part of the expression"); - } - return ast; -} - // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 diff --git a/parse.h b/parse.h index ebd49d5..8fe7125 100644 --- a/parse.h +++ b/parse.h @@ -7,7 +7,6 @@ #include "ast.h" type_ast_t *parse_type_str(const char *str); -ast_t *parse_expression_str(const char *str); ast_t *parse_file(const char *path, jmp_buf *on_err); // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0