Files
quip/include/frontend/token.h
2026-03-21 17:15:24 -04:00

41 lines
737 B
C

/*
* Copyright (c) 2026, Mirocom Laboratories
* Provided under the BSD-3 clause
*
* Abstract:
* This file defines the list of valid tokens.
* Author:
* Ian M. Moffett <ian@mirocom.org>
*/
#ifndef FRONTEND_TOKEN_H
#define FRONTEND_TOKEN_H 1
/*
* Represents valid token types
*/
typedef enum {
TT_NONE, /* [none] */
TT_NAME, /* [name] */
TT_NEWLINE, /* [newline] */
TT_SHELLBLOCK, /* [shellblock] */
TT_CC, /* '.cc' */
TT_LD, /* '.ld' */
TT_COLON, /* ':' */
} tt_t;
/*
* Represents a lexical token
*
* @type: Token type
*/
struct token {
tt_t type;
union {
char c;
char *s;
};
};
#endif /* !FRONTEND_TOKEN_H */