Implement String structure and update Location/Token to use it
This commit is contained in:
+20
@@ -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
|
||||
Reference in New Issue
Block a user