Add cmd.cpp cmd.h, MA_LENGTHOF to MA_Lengthof

This commit is contained in:
Krzosa Karol
2024-03-04 15:26:15 +01:00
parent 2abd8870cb
commit 3f358584bb
7 changed files with 228 additions and 30 deletions

25
core/cmd.h Normal file
View File

@@ -0,0 +1,25 @@
enum CmdDeclKind {
CmdDeclKind_Bool,
CmdDeclKind_List,
CmdDeclKind_Enum,
};
struct CmdDecl {
CmdDeclKind kind;
S8_String name;
S8_String help;
bool * bool_result;
Array<S8_String> *list_result;
int * enum_result;
const char ** enum_options;
int enum_option_count;
};
struct CmdParser {
int argc;
char ** argv;
Array<CmdDecl> decls;
};