From b5cb655b099b57d45dfc13d79ce94779dccf4126 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sat, 24 Sep 2016 14:19:24 +0200 Subject: Added comments --- interpreter/lex.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'interpreter') diff --git a/interpreter/lex.c b/interpreter/lex.c index 180c23e..8946252 100644 --- a/interpreter/lex.c +++ b/interpreter/lex.c @@ -66,6 +66,10 @@ token_list* lex(token_list* list, char* input) { case ',': list->elem.kind = TOKEN_COMMA; break; case '!': list->elem.kind = TOKEN_STRICT; break; default: + if (input[0] == '/' && input[1] == '/') { + while (input && input[0] != '\n') input++; + break; + } if (input[0] == 'c' && input[1] == 'o' && input[2] == 'd' && input[3] == 'e' && is_space_char(input[4])) { list->elem.kind = TOKEN_CODE; -- cgit v1.2.3