Updated the lexer to pick out some more language specific grammar.
This commit is contained in:
+11
-1
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user