Implement String structure and update Location/Token to use it

This commit is contained in:
2026-04-25 14:17:17 +02:00
parent 902e2f0325
commit 116bdecafe
9 changed files with 73 additions and 35 deletions
+20
View File
@@ -0,0 +1,20 @@
/**
* Contains the definition of the String structure, which is a simple representation of a string in C.
*/
#ifndef STRING_H
#define STRING_H
#include <stddef.h>
/**
* A simple string structure that holds a pointer to the character data and its length.
*/
typedef struct {
/// @brief A pointer to the character data of the string.
char* data;
/// @brief The length of the string.
size_t length;
} String;
#endif