edfb3e24a3
bshell: the front-end binary bshell.runtime: contains the parser, compiler, and classes needed to run bshell scripts bshell.core: contains the builtin commandlets and aliases
26 lines
889 B
C
26 lines
889 B
C
#include "compile-node.h"
|
|
|
|
static const compile_node_impl node_compilers[] = {
|
|
[BSHELL_AST_INT] = compile_int,
|
|
[BSHELL_AST_DOUBLE] = compile_double,
|
|
[BSHELL_AST_STRING] = compile_string,
|
|
[BSHELL_AST_WORD] = compile_word,
|
|
[BSHELL_AST_OP] = compile_op,
|
|
[BSHELL_AST_VAR] = compile_var,
|
|
[BSHELL_AST_FSTRING] = compile_fstring,
|
|
[BSHELL_AST_ARRAY] = compile_array,
|
|
[BSHELL_AST_HASHTABLE] = compile_hashtable,
|
|
[BSHELL_AST_HASHTABLE_ITEM] = compile_hashtable_item,
|
|
[BSHELL_AST_CMDCALL] = compile_cmdcall,
|
|
[BSHELL_AST_PIPELINE] = compile_pipeline,
|
|
[BSHELL_AST_BLOCK] = compile_block,
|
|
};
|
|
static const size_t nr_node_compilers = sizeof node_compilers
|
|
/ sizeof node_compilers[0];
|
|
|
|
const struct compile_state_type normal_state = {
|
|
.s_size = sizeof(struct compile_state),
|
|
.s_compile_node = node_compilers,
|
|
.s_nr_compile_node = nr_node_compilers,
|
|
};
|