Skip to content

Commit 7fe3a44

Browse files
committed
Define data types for structured command handling
1 parent f223c37 commit 7fe3a44

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/commands.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33

44
struct LacoState;
55

6+
typedef void (*LacoHandler)(struct LacoState* laco, const char** arguments);
7+
8+
struct LacoCommand {
9+
const char** matches;
10+
LacoHandler handler;
11+
};
12+
613
/**
714
* Gets passed ever line to see if it matches one of the REPL command. If it
815
* does, that command will be executed.

0 commit comments

Comments
 (0)