iris

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

commit d691e933bd50a2534ee0c1a3de38f4d8b34e69b4
parent 09230fe8689b1495740433e4845b0b3c38fe1cc9
Author: sin <sin@2f30.org>
Date:   Fri May  9 13:56:07 +0100

State enumeration should be internal to the lexer

Diffstat:
lexer.c | 18++++++++++++++++++
lexer.h | 18------------------
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/lexer.c b/lexer.c @@ -5,6 +5,24 @@ #include <string.h> #include "lexer.h" +typedef enum { + State_Se, + State_Identifier, + State_Probable_Boolean, + State_Boolean, + State_Number, + State_Probable_Character, + State_Character, + State_Probable_String, + State_String, + State_Lparen, + State_Rparen, + State_Quote, + State_Dot, + State_Comment, + State_Unknown_Token, +} state; + int delim(int c) { diff --git a/lexer.h b/lexer.h @@ -13,24 +13,6 @@ typedef enum { Dot } toktype; -typedef enum { - State_Se, - State_Identifier, - State_Probable_Boolean, - State_Boolean, - State_Number, - State_Probable_Character, - State_Character, - State_Probable_String, - State_String, - State_Lparen, - State_Rparen, - State_Quote, - State_Dot, - State_Comment, - State_Unknown_Token, -} state; - struct tok { toktype type; const char *s;