diff options
author | Johnny Richard <johnny@johnnyrichard.com> | 2023-04-14 23:38:43 +0200 |
---|---|---|
committer | Johnny Richard <johnny@johnnyrichard.com> | 2023-04-15 02:16:29 +0200 |
commit | f2bc5274bb55bc2b180efae274ada107ea4716d1 (patch) | |
tree | ed4bc690e81e2aab5c2629987865524e289d2b6e /src/lexer.h | |
parent | e927a4b22115e0461db6feeee891256b10650c0e (diff) |
parser: Show filepath row and col when parsing fails
In order to find out where a parsing error occurred, this patch
introduces the exactly location following the format 'file:row:col'.
Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
Diffstat (limited to 'src/lexer.h')
-rw-r--r-- | src/lexer.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lexer.h b/src/lexer.h index f5333a0..472ee10 100644 --- a/src/lexer.h +++ b/src/lexer.h @@ -36,6 +36,7 @@ typedef enum { typedef struct token_t { token_kind_t kind; char *value; + char *filepath; uint32_t row; uint32_t col; } token_t; |