Code cleanup. Converting a number lexeme to a proper integer setup but not done yet. So number tokens don't have a valid value.

This commit is contained in:
2022-05-05 16:12:33 +00:00
parent 9fa48520c7
commit 8ec0b9b216
11 changed files with 59 additions and 283 deletions
+4 -4
View File
@@ -1,10 +1,10 @@
#include "../includes/parser.h"
#include "../includes/lexer.h"
#include "../includes/token.h"
#include <stdio.h>
#include <stdlib.h>
static List* SymbolsTable;
static unsigned int program_counter = 0;
//static List* SymbolsTable;
//static unsigned int program_counter = 0;
void ProcessDirective(List*);
void ProcessVariableDeclaration(List*);
@@ -51,5 +51,5 @@ void ProcessVariableDeclaration(List* tokens) {
Token* string_literal = (Token*) tokens->content[2];
printf("Found string literal.\n");
printf("Name '%s' value: '%s'\n", symbol_token->value, string_literal->value);
printf("Name '%s' value: '%s'\n", symbol_token->lexeme, string_literal->lexeme);
}