29 lines
566 B
C
29 lines
566 B
C
/**
|
|
* Location handling for error reporting.
|
|
*/
|
|
#ifndef LOCATION_H
|
|
#define LOCATION_H
|
|
|
|
#include "str.h"
|
|
|
|
#include <stddef.h>
|
|
|
|
typedef struct {
|
|
/// @brief The name of the file where the token was found.
|
|
char* filename;
|
|
|
|
/// @brief The entire line of text where the token was found.
|
|
String line_text;
|
|
|
|
/// @brief The line number where the token was found.
|
|
int line;
|
|
|
|
/// @brief The starting column number where the token was found.
|
|
int column_start;
|
|
|
|
/// @brief The ending column number where the token was found.
|
|
int column_end;
|
|
} Location;
|
|
|
|
#endif
|