aboutsummaryrefslogtreecommitdiff
path: root/src/include/token.h
blob: 9bfc4f36ada711e7bbebc2cee9d5e02ed3707f9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef TOKEN_H
#define TOKEN_H
typedef struct TOKEN_STRUC {
   enum {
      TOKEN_ID,       // keyword
      TOKEN_EQ,       // '='
      TOKEN_STR,      // "string"
      TOKEN_SEMI,     // ';'
      TOKEN_LORD,     // '/'
      TOKEN_RORD,     // '\'
      TOKEN_AMP,      // '&'
      TOKEN_LBRAK,    // '['
      TOKEN_RBRAK,    // ']'
      TOKEN_POUND,    // '#''
      TOKEN_tILDE,    // '~'
      TOKEN_QUOTE,    // '''
      TOKEN_EOF       // '\0'
    } type;

    char* value;
} token_t;

token_t* token_init(int type, char* value);
#endif