add declaring and assignment with parser LHS support

This commit is contained in:
2025-06-04 21:20:44 +01:00
parent 9417cbe57a
commit 2bd0384060
17 changed files with 244 additions and 87 deletions

View File

@@ -0,0 +1,16 @@
#ifndef DECLARATION_H
#define DECLARATION_H
#include "../parser.h"
#include "../../lexer/token.h" // for Token
typedef struct {
char * name;
bool is_function;
DArray args; // string[]
ParsedValue * from;
} ParsedDeclaration;
// Function declaration for parsing an identifier
ParsedValue *parse_declaration(char *file, DArray *parsed, DArray *tokens, size_t *index);
#endif // DECLARATION_H