Formatting
This commit is contained in:
parent
9c3bc6d2c2
commit
a626fcb86a
18
ell.c
18
ell.c
|
@ -213,19 +213,8 @@ new_list (struct item *head) {
|
||||||
|
|
||||||
// --- Lexer -------------------------------------------------------------------
|
// --- Lexer -------------------------------------------------------------------
|
||||||
|
|
||||||
enum token {
|
enum token { T_ABORT, T_LPAREN, T_RPAREN, T_LBRACKET, T_RBRACKET,
|
||||||
T_ABORT, ///< EOF or error
|
T_LBRACE, T_RBRACE, T_STRING, T_NEWLINE, T_AT };
|
||||||
|
|
||||||
T_LPAREN, ///< Left parenthesis
|
|
||||||
T_RPAREN, ///< Right parenthesis
|
|
||||||
T_LBRACKET, ///< Left bracket
|
|
||||||
T_RBRACKET, ///< Right bracket
|
|
||||||
T_LBRACE, ///< Left curly bracket
|
|
||||||
T_RBRACE, ///< Right curly bracket
|
|
||||||
T_STRING, ///< Everything else that's not space
|
|
||||||
T_NEWLINE, ///< New line
|
|
||||||
T_AT ///< At symbol
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
token_name (enum token token) {
|
token_name (enum token token) {
|
||||||
|
@ -489,8 +478,7 @@ parser_free (struct parser *self) {
|
||||||
|
|
||||||
static enum token
|
static enum token
|
||||||
parser_peek (struct parser *self, jmp_buf out) {
|
parser_peek (struct parser *self, jmp_buf out) {
|
||||||
if (self->replace_token)
|
if (self->replace_token) {
|
||||||
{
|
|
||||||
self->token = lexer_next (&self->lexer, &self->error);
|
self->token = lexer_next (&self->lexer, &self->error);
|
||||||
if (self->error)
|
if (self->error)
|
||||||
longjmp (out, 1);
|
longjmp (out, 1);
|
||||||
|
|
Loading…
Reference in New Issue