From 3eef27fe9f504e67ec74e330587007eb7b28946f Mon Sep 17 00:00:00 2001 From: David Kerkeslager Date: Mon, 25 Sep 2017 17:55:10 -0400 Subject: [PATCH] Change parent_jump to parentJump to conform to previously used code style --- templates/function_definition.c | 4 ++-- templates/program.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/templates/function_definition.c b/templates/function_definition.c index 9ebac36..4635e9c 100644 --- a/templates/function_definition.c +++ b/templates/function_definition.c @@ -1,5 +1,5 @@ -Object user${{name}}$implementation(EnvironmentPool* environmentPool, Environment* parent, size_t argc, Stack* parentStack, jmp_buf parent_jump) +Object user${{name}}$implementation(EnvironmentPool* environmentPool, Environment* parent, size_t argc, Stack* parentStack, jmp_buf parentJump) { Environment* environment = EnvironmentPool_allocate(environmentPool); Environment_initialize(environment, parent); @@ -20,7 +20,7 @@ Object user${{name}}$implementation(EnvironmentPool* environmentPool, Environmen } Environment_setLive(environment, false); - longjmp(parent_jump, 1); + longjmp(parentJump, 1); } Object result = builtin$nil; diff --git a/templates/program.c b/templates/program.c index 7cfd1e3..6b49881 100644 --- a/templates/program.c +++ b/templates/program.c @@ -550,7 +550,7 @@ Object operator$negate(Object input) } // TODO Make this conditionally added -Object operator$concatenate(Stack* stack, jmp_buf parent_jump, size_t line) +Object operator$concatenate(Stack* stack, jmp_buf parentJump, size_t line) { Object right = Stack_pop(stack); Object left = Stack_pop(stack); @@ -583,7 +583,7 @@ Object operator$concatenate(Stack* stack, jmp_buf parent_jump, size_t line) } {% for id in infix_declarations %} -Object operator${{ id.name }}(Stack* stack, jmp_buf parent_jump, size_t line) +Object operator${{ id.name }}(Stack* stack, jmp_buf parentJump, size_t line) { Object right = Stack_pop(stack); Object left = Stack_pop(stack); @@ -595,7 +595,7 @@ Object operator${{ id.name }}(Stack* stack, jmp_buf parent_jump, size_t line) if(right.instance.integer == 0) { fprintf(stderr, "DivisionByZeroError on line %zu\n", line); - longjmp(parent_jump, 1); + longjmp(parentJump, 1); } {% endif %} @@ -607,7 +607,7 @@ Object operator${{ id.name }}(Stack* stack, jmp_buf parent_jump, size_t line) {% endfor %} {% if 'pow' in builtins %} -Object builtin$pow$implementation(EnvironmentPool* environmentPool, Environment* parent, size_t argc, Stack* stack, jmp_buf parent_jump) +Object builtin$pow$implementation(EnvironmentPool* environmentPool, Environment* parent, size_t argc, Stack* stack, jmp_buf parentJump) { // Must unload items in reverse order Object exponent = Stack_pop(stack); @@ -626,7 +626,7 @@ Object builtin$pow = { CLOSURE, (Instance)(Closure){ NULL, builtin$pow$implement {% endif %} {% if 'print' in builtins %} -Object builtin$print$implementation(EnvironmentPool* environmentPool, Environment* parent, size_t argc, Stack* stack, jmp_buf parent_jump) +Object builtin$print$implementation(EnvironmentPool* environmentPool, Environment* parent, size_t argc, Stack* stack, jmp_buf parentJump) { Stack reverse_stack; Stack_initialize(&reverse_stack); @@ -656,9 +656,9 @@ Object builtin$print$implementation(EnvironmentPool* environmentPool, Environmen case STRING_CONCATENATION: Stack_push(stack, output.instance.string_concatenation->left); - builtin$print$implementation(NULL, NULL, 1, stack, parent_jump); + builtin$print$implementation(NULL, NULL, 1, stack, parentJump); Stack_push(stack, output.instance.string_concatenation->right); - builtin$print$implementation(NULL, NULL, 1, stack, parent_jump); + builtin$print$implementation(NULL, NULL, 1, stack, parentJump); break; case STRING_LITERAL: -- 2.20.1