27 lines
383 B
C
27 lines
383 B
C
#ifndef SCANNER_H
|
|
#define SCANNER_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "token_types.h"
|
|
#include "tokens.h"
|
|
|
|
typedef struct scanner {
|
|
unsigned char *src, *cursor, *start, *end;
|
|
} scanner_t;
|
|
|
|
uint16_t scan_token(scanner_t *s);
|
|
|
|
inline scanner_t scanner_from_string(const char *input);
|
|
|
|
token_array *tokenize(const char *input);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|