Skip to content

Commit 05914d2

Browse files
committed
Add documentation for LacoHandler and LacoCommand
1 parent 909a8d1 commit 05914d2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/util.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,18 @@
55

66
struct LacoState;
77

8+
/**
9+
* Generalized function pointer for handling commands from from either a
10+
* command line flag or a command inside of laco itself.
11+
*/
812
typedef void (*LacoHandler)(struct LacoState* laco, const char** arguments);
913

14+
/**
15+
* A representation of each command with a list of string matches and a
16+
* function pointer to the behavior of said command. When there is a match
17+
* to one of the string, this function will be called and passed in the
18+
* appropriate arguments.
19+
*/
1020
struct LacoCommand {
1121
const char** matches;
1222
LacoHandler handler;

0 commit comments

Comments
 (0)