hyc

Hydrogen Compiler written in C
git clone git://git.kocotian.pl/hyc.git
Log | Files | Refs | README | LICENSE

commit d5a527ed31beb52e35fceb4dcc2287c51ca18d0f
parent 84f3e0360e4ef430ff8da3cc047e4fca6786b9d7
Author: kocotian <kocotian@kocotian.pl>
Date:   Mon, 26 Jul 2021 14:08:15 +0000

ExclamationMark token

Diffstat:
Minclude/tokenize.h | 1+
Mtokenize.c | 1+
2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/tokenize.h b/include/tokenize.h @@ -29,6 +29,7 @@ typedef enum { TokenOpeningParenthesis, TokenClosingParenthesis, TokenOpeningBracket, TokenClosingBracket, TokenOpeningBrace, TokenClosingBrace, + TokenExclamationMark, TokenAsterisk, TokenAmperstand, TokenSemicolon, TokenComma, TokenDot, TokenColon, TokenDoubleColon, diff --git a/tokenize.c b/tokenize.c @@ -97,6 +97,7 @@ tokenize(String input, Token **output) } else if (CURCHAR == '{') { TYPE(OpeningBrace); SEEKCHAR; } else if (CURCHAR == '}') { TYPE(ClosingBrace); SEEKCHAR; /* Other single-char operators */ + } else if (CURCHAR == '!') { TYPE(ExclamationMark); SEEKCHAR; } else if (CURCHAR == '*') { TYPE(Asterisk); SEEKCHAR; } else if (CURCHAR == '&') { TYPE(Amperstand); SEEKCHAR; } else if (CURCHAR == ';') { TYPE(Semicolon); SEEKCHAR;