runtime: move variable definition from runtime to individual scopes

This commit is contained in:
2026-06-20 15:09:10 +01:00
parent c2d3e05430
commit c262b53eab
7 changed files with 42 additions and 28 deletions
+6 -4
View File
@@ -1,5 +1,5 @@
#ifndef BSHELL_RUNTIME_SCOPE_H_
#define BSHELL_RUNTIME_SCOPE_H_
#ifndef RUNTIME_SCOPE_H_
#define RUNTIME_SCOPE_H_
#include "var-map.h"
@@ -37,12 +37,14 @@ extern struct bshell_runtime_scope *runtime_push_scope(
enum bshell_runtime_scope_type type,
bshell_scriptblock *block);
extern void runtime_pop_scope(struct bshell_runtime *rt);
extern struct bshell_runtime_scope *runtime_get_scope(struct bshell_runtime *rt);
extern struct bshell_runtime_scope *runtime_get_scope(
struct bshell_runtime *rt);
extern void bshell_runtime_scope_push_value(
struct bshell_runtime_scope *scope,
const fx_value *value);
extern fx_value bshell_runtime_scope_pop_value(struct bshell_runtime_scope *scope);
extern fx_value bshell_runtime_scope_pop_value(
struct bshell_runtime_scope *scope);
extern void bshell_runtime_scope_set_block(
struct bshell_runtime_scope *scope,