tartrazine/internal/tokenizer/linguist.h
Alexander Bezzubov 553399ed76
tokenizer: port flex-based C impl from linguist
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2019-04-14 21:38:16 +02:00

21 lines
400 B
C

enum tokenizer_type {
NO_ACTION,
REGULAR_TOKEN,
SHEBANG_TOKEN,
SGML_TOKEN,
};
struct tokenizer_extra {
char *token;
enum tokenizer_type type;
};
// #include <stddef.h>
// #ifdef __APPLE__
// char *strndup(const char *s1, size_t n);
// #elif defined(_WIN32) || defined(_WIN64)
// char *strndup(const char *s1, size_t n);
// #pragma warning (disable: 4244)
// #endif // _WIN32 || _WIN64