1
0
mirror of https://github.com/emersion/kanshi synced 2024-11-10 02:11:38 +01:00
kanshi/include/parser.h

28 lines
414 B
C
Raw Normal View History

2019-05-30 13:59:25 +02:00
#ifndef KANSHI_PARSER_H
#define KANSHI_PARSER_H
#include <stdio.h>
struct kanshi_config;
enum kanshi_token_type {
KANSHI_TOKEN_LBRACKET,
KANSHI_TOKEN_RBRACKET,
KANSHI_TOKEN_STR,
KANSHI_TOKEN_NEWLINE,
};
struct kanshi_parser {
FILE *f;
int next;
int line, col;
enum kanshi_token_type tok_type;
char tok_str[1024];
size_t tok_str_len;
};
struct kanshi_config *parse_config(const char *path);
#endif