hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/lexer.h
blob: 4e09acecadf0ff8732ac4edc9401cf9838411585 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <stdbool.h>
#include <stdio.h>

enum Token
{
    TOK_END = 0,
    TOK_COLONCOLON = 256,
    TOK_EMIT,
    TOK_COMMIT,
    TOK_DECLTYPE,
    TOK_DIFFERENCE,
    TOK_CHAR
};

extern FILE* yyin;   // input
extern int yylineno; // current line
int yylex(void);     // scanner

bool lexer_failed(void);
char lexer_character(void);