modify some and define types for token

This commit is contained in:
2025-11-04 13:20:21 +09:00
parent cacb35ddb2
commit bbc1838b8a
3 changed files with 33 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
#pragma once
typedef enum {
LBRACK,
RBRACK,
LCURLY,
RCURLY,
ID,
SEMI,
COMMA,
ARROW,
STAR,
COMMENT,
NUM,
RETURN,
IF,
ELSE,
STRING_LITERAL,
ERROR
} TokenType;
typedef struct {
TokenType type;
char *data;
int line;
} Token;