/* * Builtin classes (will be defined by the runtime library) * * Copyright © 2025 Samuel Lidén Borell * * SPDX-License-Identifier: EUPL-1.2+ OR LGPL-2.1-or-later */ #include #include #include "compiler.h" struct Type *builtin_commandmain_class = NULL; struct Type *builtin_string_class = NULL; static struct Type *init_class(const char *name) { struct Type *t; type_start(name, strlen(name)); t = current_type; assert(t->ident.node.is_defined); type_end(); return t; } void builtins_init(void) { assert(builtin_commandmain_class == NULL); assert(builtin_string_class == NULL); current_filename = ""; current_line = 0; { struct Type *t = init_class("CommandMain"); /* TODO */ builtin_commandmain_class = t; } { struct Type *t = init_class("String"); /* TODO */ builtin_string_class = t; } }