public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
3f4c3a9e514875d963e34d8681d9d962b674286a blob 1376 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
 
/*
 * Copyright (C) 2024 olang maintainers
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
#ifndef CLI_H
#define CLI_H
#include "string_view.h"
#include <stdint.h>
#include <stdio.h>

typedef struct cli_args
{
    int argc;
    char **argv;
} cli_args_t;

typedef struct cli_opts
{
    uint32_t options;
    char *arch;
    char *sysroot;
    char *compiler_path;
    char *file_path;
    string_view_t output_bin;
} cli_opts_t;

typedef enum
{
    CLI_OPT_DUMP_TOKENS = 1 << 0,
    CLI_OPT_OUTPUT = 1 << 1,
    CLI_OPT_SAVE_TEMPS = 1 << 2,
    CLI_OPT_ARCH = 1 << 3,
    CLI_OPT_SYSROOT = 1 << 4,
    CLI_OPT_DUMP_AST = 1 << 5
} cli_opt_t;

cli_opts_t
cli_parse_args(int argc, char **argv);

void
cli_print_usage(FILE *stream, char *compiler_path);

#endif /* CLI_H */
debug log:

solving 3f4c3a9 ...
found 3f4c3a9 in https://git.johnnyrichard.com/olang.git

Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox