From 12558fca11f19ef2665391ccd860ad6a111ce9e9 Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 29 Apr 2017 02:00:31 -0400 Subject: [PATCH] Token: Add new tokens --- lithos_c/inc/Lth_hashmap.h | 6 +++--- lithos_c/inc/Lth_token.h | 3 +++ lithos_c/src/token.c | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lithos_c/inc/Lth_hashmap.h b/lithos_c/inc/Lth_hashmap.h index e987507..fd184f6 100644 --- a/lithos_c/inc/Lth_hashmap.h +++ b/lithos_c/inc/Lth_hashmap.h @@ -78,9 +78,9 @@ typedef struct Lth_HashMap Lth_HashMapElem **table; Lth_Vector(Lth_HashMapElem) elem; - __prop destroy {call: Lth_HashMapDestroy(this)} - __prop alloc {call: Lth_HashMapAlloc (this)} - __prop build {call: Lth_HashMapBuild (this)} + __prop destroy {call: Lth_HashMapDestroy(this)} + __prop alloc {call: Lth_HashMapAlloc (this)} + __prop build {call: Lth_HashMapBuild (this)} __prop findhash {call: Lth_HashMapFind_hash (this)} __prop findwchr {call: Lth_HashMapFind_wchar(this)} __prop find_str {call: Lth_HashMapFind_str (this)} diff --git a/lithos_c/inc/Lth_token.h b/lithos_c/inc/Lth_token.h index 8c46fda..5c4f8a8 100644 --- a/lithos_c/inc/Lth_token.h +++ b/lithos_c/inc/Lth_token.h @@ -28,6 +28,9 @@ Lth_X(Minus ) // - Lth_X(Dot ) // . Lth_X(Equals) // = Lth_X(Semico) // ; +Lth_X(Comma ) // , +Lth_X(GT ) // > +Lth_X(LT ) // < Lth_X(BrackO) // [ Lth_X(BrackC) // ] diff --git a/lithos_c/src/token.c b/lithos_c/src/token.c index 600a820..8810470 100644 --- a/lithos_c/src/token.c +++ b/lithos_c/src/token.c @@ -43,6 +43,9 @@ void Lth_TokenGet(FILE *fp, Lth_Token *out) { case '=': Lth_TokenSet(out, Equals); return; case ';': Lth_TokenSet(out, Semico); return; + case ',': Lth_TokenSet(out, Comma ); return; + case '>': Lth_TokenSet(out, GT ); return; + case '<': Lth_TokenSet(out, LT ); return; case '[': Lth_TokenSet(out, BrackO); return; case ']': Lth_TokenSet(out, BrackC); return;