aboutsummaryrefslogtreecommitdiff
path: root/interpreter/lex.c
diff options
context:
space:
mode:
authorCamil Staps2016-09-24 14:19:24 +0200
committerCamil Staps2016-09-24 14:22:16 +0200
commitb5cb655b099b57d45dfc13d79ce94779dccf4126 (patch)
treed293ca31b36b4c5ead6d3ca99fbc15cb5ac95914 /interpreter/lex.c
parentRemoved strictness paragraph from docs; doesn't apply anymore (diff)
Added comments
Diffstat (limited to 'interpreter/lex.c')
-rw-r--r--interpreter/lex.c4
1 files changed, 4 insertions, 0 deletions
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;