start working on runtime oop
This commit is contained in:
@@ -19,6 +19,7 @@ ArErr runtime_declaration(Translated *translated, RuntimeState *state,
|
||||
SourceLocation *source_location = darray_get(&translated->source_locations, source_location_index);
|
||||
return create_err(source_location->line, source_location->column, source_location->length, state->path, "Runtime Error", "Identifier '%.*s' has already been declared in the current scope", length, arena_get(&translated->constants, offset));
|
||||
}
|
||||
hashmap_insert_GC(stack->scope, hash, arena_get(&translated->constants, offset), state->registers[from_register], 0);
|
||||
ArgonObject * key = init_string_object(arena_get(&translated->constants, offset), length);
|
||||
hashmap_insert_GC(stack->scope, hash, key, state->registers[from_register], 0);
|
||||
return no_err;
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
#ifndef runtime_declaration_H
|
||||
#define runtime_declaration_H
|
||||
#include "../runtime.h"
|
||||
#include "../objects/string/string.h"
|
||||
|
||||
ArErr runtime_declaration(Translated *translated, RuntimeState *state,
|
||||
struct Stack *stack);
|
||||
|
||||
Reference in New Issue
Block a user