From 2e27402b584482195db6a8ddad80f4c68251498b Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 5 Mar 2021 21:29:56 +1100 Subject: [PATCH] parsergen: make "code" arg to "gen_reduce" more obvious. Call it "pre_reduce" so we know where the code goes. Signed-off-by: NeilBrown --- csrc/parsergen.mdc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csrc/parsergen.mdc b/csrc/parsergen.mdc index 815605c..fc95688 100644 --- a/csrc/parsergen.mdc +++ b/csrc/parsergen.mdc @@ -2303,15 +2303,15 @@ transformed, and will cause an error when the code is compiled. ###### functions static void gen_reduce(FILE *f, struct grammar *g, char *file, - struct code_node *code) + struct code_node *pre_reduce) { int i; fprintf(f, "#line 1 \"gen_reduce\"\n"); fprintf(f, "static int do_reduce(int prod, void **body, struct token_config *config, void *ret)\n"); fprintf(f, "{\n"); fprintf(f, "\tint ret_size = 0;\n"); - if (code) - code_node_print(f, code, file); + if (pre_reduce) + code_node_print(f, pre_reduce, file); fprintf(f, "#line 4 \"gen_reduce\"\n"); fprintf(f, "\tswitch(prod) {\n"); -- 2.43.0