add while loop

This commit is contained in:
William Bell
2025-08-28 04:07:19 +01:00
parent c322d5680f
commit fff4f6bcb5
9 changed files with 207 additions and 6 deletions

20
src/parser/while/while.h Normal file
View File

@@ -0,0 +1,20 @@
/*
* SPDX-FileCopyrightText: 2025 William Bell
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef PARSE_WHILE_H
#define PARSE_WHILE_H
#include "../parser.h"
typedef struct {
ParsedValue * condition;
ParsedValue *content;
} ParsedWhile;
ParsedValueReturn parse_while(char *file, DArray *tokens, size_t *index);
void free_parsed_while(void *ptr);
#endif // PARSE_WHILE_H