Skip to content

Commit 451666e

Browse files
Merge pull request #42 from dreamer-coding/enhance_parser
Enhance parser
2 parents 8df9bcd + 27cff5d commit 451666e

File tree

4 files changed

+623
-66
lines changed

4 files changed

+623
-66
lines changed

code/logic/fossil/io/parser.h

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ extern "C" {
2222

2323
// Types of command argument
2424
typedef enum {
25-
FOSSIL_IO_PARSER_BOOL, // Boolean (enable/disable)
26-
FOSSIL_IO_PARSER_STRING, // String argument
27-
FOSSIL_IO_PARSER_INT, // Integer argument
28-
FOSSIL_IO_PARSER_COMBO // Combo of predefined values
25+
FOSSIL_IO_PARSER_BOOL, // Boolean (enable/disable)
26+
FOSSIL_IO_PARSER_STRING, // String argument
27+
FOSSIL_IO_PARSER_INT, // Integer argument
28+
FOSSIL_IO_PARSER_FLOAT, // Floating-point argument
29+
FOSSIL_IO_PARSER_DATE, // Date argument
30+
FOSSIL_IO_PARSER_ARRAY, // Array of values
31+
FOSSIL_IO_PARSER_FEATURE, // Feature flag
32+
FOSSIL_IO_PARSER_INVALID // Invalid argument type
2933
} fossil_io_parser_arg_type_t;
3034

3135
// Structure to represent each argument in the command
@@ -54,6 +58,21 @@ typedef struct fossil_io_parser_palette_s {
5458
fossil_io_parser_command_t *commands; // List of commands
5559
} fossil_io_parser_palette_t;
5660

61+
// ==================================================================
62+
// Global Variables
63+
// ==================================================================
64+
65+
extern int FOSSIL_CLI_TOGGLE_DRY_RUN;
66+
extern int FOSSIL_CLI_TOGGLE_VERBOSE;
67+
extern int FOSSIL_CLI_TOGGLE_SANITY;
68+
69+
extern char *FOSSIL_CLI_TOOL_NAME;
70+
extern char *FOSSIL_CLI_TOOL_VERSION;
71+
extern char *FOSSIL_CLI_TOOL_AUTHOR;
72+
extern char *FOSSIL_CLI_TOOL_LICENSE;
73+
extern char *FOSSIL_CLI_TOOL_DESCRIPTION;
74+
extern char *FOSSIL_CLI_TOOL_WEBSITE;
75+
5776
// ==================================================================
5877
// Functions
5978
// ==================================================================

0 commit comments

Comments
 (0)