aboutsummaryrefslogtreecommitdiff
path: root/tokens.h
blob: 8b06454b604d4bdafd3a9c010fac371181e4ffd3 (plain)
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 TOKENS_H
#define TOKENS_H

enum
{
    TOKEN_INT,
    TOKEN_STR,
    TOKEN_SYMBOL,
    TOKEN_LPAREN,
    TOKEN_RPAREN,
    TOKEN_PERIOD,
    TOKEN_QUOTE
};

struct token
{
    const char *s;
    int len;
    int type;
};

int get_next_token(const char *src, int *pos, struct token *token);

#endif