Updated the lexer to pick out some more language specific grammar.

This commit is contained in:
2022-02-02 19:18:27 +00:00
parent 7a88d6e34d
commit d39e37b078
3 changed files with 30 additions and 48 deletions
+11 -1
View File
@@ -21,5 +21,15 @@ int main(int argc, char* args[]) {
return -1;
}
GenerateTokensFromFile(args[1]);
List* tokens = GenerateTokensFromFile(args[1]);
for (int i = 0; i < tokens->size; i++) {
Token* t = (Token*) tokens->content[i];
printf("Token Type: '%d' Value: '%s'\n", t->type, t->value);
free(t->value);
}
DestroyList(tokens);
}