aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rwxr-xr-x[-rw-r--r--]src/main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index a9682a6..45ee0c6 100644..100755
--- a/src/main.c
+++ b/src/main.c
@@ -1,7 +1,18 @@
#include <stdio.h>
+#include "include/lexer.h"
int main(int argc, char* argv[]) {
- printf("Hello, world.");
+ lexer_t* lexer = lexer_init(
+ "[nice & simple]\nlet it = \"Hello, World!\";\nsay it;\n"
+ );
+
+ printf("\n=== INPUT =======\n%s\n=== END INPUT ===\n", lexer->content);
+
+ token_t* token = NULL;
+
+ while ((token = lexer_get_next_token(lexer)) != NULL) {
+ printf("===\ntoken type: %d\ntoken value: %s\n===\n", token->type, token->value);
+ }
return 0;
}