codebased/scirpt/main.c
2023-04-12 01:59:42 +02:00

21 lines
399 B
C

#include "scirpt/lexer.h"
#include "scirpt/token.h"
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
printf("hello world\n");
const char* text = "123 if +";
ScirptLexer* lexer = scirpt_lexer_new(text, strlen(text));
while (true) {
ScirptToken token = scirpt_lexer_next(lexer);
if (token.type == ScirptTokenTypeEof)
break;
printf("%d\n", token.type);
}
}