init parser

This commit is contained in:
hugogogo
2026-04-30 23:19:14 +02:00
parent 7a30dcc345
commit 512ba9b5f4
7 changed files with 70 additions and 13 deletions

27
headers/parser.h Normal file
View File

@@ -0,0 +1,27 @@
#ifndef PARSER_H
#define PARSER_H
#include "libft.h"
#include "lexer.h"
#include "errors.h"
typedef enum
{
TERM_LEFT, // a in "a = b"
TERM_RIGHT, // b in "a = b"
} term_type;
typedef struct
{
term_type type;
union
{
char value_char;
int value_int;
double value_double;
};
} term;
int parse(token *tokens, term *terms);
#endif