}
// TODO Make this conditionally added
-Object operator$concatenate(Stack* stack, jmp_buf parent_jump)
+Object operator$concatenate(Stack* stack, jmp_buf parent_jump, size_t line)
{
Object right = Stack_pop(stack);
Object left = Stack_pop(stack);
}
{% for id in infix_declarations %}
-Object operator${{ id.name }}(Stack* stack, jmp_buf parent_jump)
+Object operator${{ id.name }}(Stack* stack, jmp_buf parent_jump, size_t line)
{
Object right = Stack_pop(stack);
Object left = Stack_pop(stack);
{% if id.name == 'integerDivide' or id.name == 'modularDivide' %}
if(right.instance.integer == 0)
{
- fprintf(stderr, "DivisionByZeroError\n");
+ fprintf(stderr, "DivisionByZeroError on line %zu\n", line);
longjmp(parent_jump, 1);
}
{% endif %}