mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Add src/theme/xbm/tokenize.c
This commit is contained in:
parent
16e879cb16
commit
d80a7b518f
8 changed files with 208 additions and 0 deletions
26
include/xbm.h
Normal file
26
include/xbm.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#ifndef XBM_H
|
||||
#define XBM_H
|
||||
|
||||
enum token_type {
|
||||
TOKEN_NONE = 0,
|
||||
TOKEN_IDENT,
|
||||
TOKEN_INT,
|
||||
TOKEN_SPECIAL,
|
||||
TOKEN_OTHER,
|
||||
};
|
||||
|
||||
#define MAX_TOKEN_SIZE (256)
|
||||
struct token {
|
||||
char name[MAX_TOKEN_SIZE];
|
||||
size_t pos;
|
||||
enum token_type type;
|
||||
};
|
||||
|
||||
/**
|
||||
* tokenize - tokenize xbm file
|
||||
* @buffer: buffer containing xbm file
|
||||
* returns vector of tokens
|
||||
*/
|
||||
struct token *tokenize(char *buffer);
|
||||
|
||||
#endif /* XBM_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue