iris

small scheme interpreter
git clone git://git.2f30.org/iris
Log | Files | Refs | LICENSE

commit 886ce4808152a7d4685b4a31e7091358a730278e
parent 1545da6d1f889b904a1875afc0e5b391b4cbce51
Author: sin <sin@2f30.org>
Date:   Fri,  9 May 2014 16:30:42 +0100

Rename unknown token to illegal token

We should revisit this in the future when we relax the definition
of valid identifiers.

Diffstat:
Mlexer.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lexer.c b/lexer.c @@ -19,7 +19,7 @@ enum state { State_Quote, State_Dot, State_Comment, - State_Unknown_Token, + State_Illegal_Token, }; int @@ -80,7 +80,7 @@ gettok(struct lexerctx *ctx, const char *buf, size_t len) else if (*ctx->e == ';') state = State_Comment; else - state = State_Unknown_Token; + state = State_Illegal_Token; if (state != State_Se) ctx->s = ctx->e; break; @@ -202,9 +202,9 @@ gettok(struct lexerctx *ctx, const char *buf, size_t len) ctx->s = tmp; } break; - case State_Unknown_Token: + case State_Illegal_Token: tok.type = Error; - tok.s = "unknown token"; + tok.s = "illegal token"; tok.e = NULL; return tok; default: