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:
+4
-4
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user