summaryrefslogtreecommitdiff
path: root/src/include/token.h
blob: 83c595b2f4bfda95cee0bcb17e23a22f78ccf125 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef TOKEN_H
#define TOKEN_H

typedef struct {
  enum {
    TOKEN_ID,
    TOKEN_LPAREN,
    TOKEN_RPAREN,
    TOKEN_BOOL,
    TOKEN_INT,
    TOKEN_FLOAT,
    TOKEN_STRING,
    TOKEN_QUOTE,
    TOKEN_PERIOD,
  } type;
  char *value;
  int row;
  int col;
} token_t;

token_t *init_token(int type, char *value, int row, int col);
#endif