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
45 lines
1.4 KiB
C
45 lines
1.4 KiB
C
#include <bshell/command/alias.h>
|
|
#include <bshell/command/command.h>
|
|
#include <fx/reflection/function.h>
|
|
#include <fx/string.h>
|
|
#include <fx/vector.h>
|
|
|
|
#define BSHELL_TYPE_PERCENT (bshell_percent_get_type())
|
|
|
|
fx_type_id bshell_percent_get_type(void);
|
|
|
|
FX_DECLARE_TYPE(bshell_percent);
|
|
|
|
FX_TYPE_CLASS_DECLARATION_BEGIN(bshell_percent)
|
|
FX_TYPE_CLASS_DECLARATION_END(bshell_percent)
|
|
|
|
struct bshell_percent_p {
|
|
};
|
|
|
|
static void init(fx_object *obj, void *priv)
|
|
{
|
|
}
|
|
|
|
FX_TYPE_CLASS_BEGIN(bshell_percent)
|
|
FX_TYPE_VTABLE_INTERFACE_BEGIN(fx_object, FX_TYPE_OBJECT)
|
|
FX_INTERFACE_ENTRY(to_string) = NULL;
|
|
FX_TYPE_VTABLE_INTERFACE_END(fx_object, FX_TYPE_OBJECT)
|
|
|
|
FX_TYPE_VTABLE_INTERFACE_BEGIN(bshell_alias, BSHELL_TYPE_ALIAS)
|
|
FX_INTERFACE_ENTRY(a_callable_name) = "%";
|
|
FX_INTERFACE_ENTRY(a_target_name) = "ForEach-Object";
|
|
FX_TYPE_VTABLE_INTERFACE_END(bshell_cmdlet, BSHELL_TYPE_CMDLET)
|
|
|
|
FX_TYPE_VTABLE_INTERFACE_BEGIN(bshell_command, BSHELL_TYPE_COMMAND)
|
|
FX_TYPE_VTABLE_INTERFACE_END(bshell_command, BSHELL_TYPE_COMMAND)
|
|
FX_TYPE_CLASS_END(bshell_percent)
|
|
|
|
FX_TYPE_DEFINITION_BEGIN(bshell_percent)
|
|
FX_TYPE_ID(0x4255a9de, 0xd6f6, 0x4708, 0x829c, 0xffa4c6034edb);
|
|
FX_TYPE_NAME("bshell.core.percent");
|
|
FX_TYPE_EXTENDS(BSHELL_TYPE_ALIAS);
|
|
FX_TYPE_CLASS(bshell_percent_class);
|
|
FX_TYPE_INSTANCE_INIT(init);
|
|
FX_TYPE_INSTANCE_PRIVATE(struct bshell_percent_p);
|
|
FX_TYPE_DEFINITION_END(bshell_percent)
|