27 lines
379 B
C
27 lines
379 B
C
#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 |