aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/parse.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-08 19:31:35 +0200
committerlemon <lsof@mailbox.org>2022-08-08 19:31:35 +0200
commitdddbdcbeb41777c1e98e37281dddd6f3c89a1280 (patch)
tree6c172f13a3d7d92bc31b8a045d81b7fa7caad007 /bootstrap/parse.c
parentfc55daf22dd890860ac9c1a0a29900977a700df2 (diff)
ok
Diffstat (limited to 'bootstrap/parse.c')
-rw-r--r--bootstrap/parse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/bootstrap/parse.c b/bootstrap/parse.c
index 67ec66d..180ddea 100644
--- a/bootstrap/parse.c
+++ b/bootstrap/parse.c
@@ -381,6 +381,14 @@ lex(struct parser *P) {
} else if (!strncmp(s, "#'", 2)) {
tok.t = TKlabel;
tok.str = xstrdup(s);
+ } else if (!strcmp(s, "#FILE")) {
+ tok.t = TKstrlit;
+ tok.str = P->curfile;
+ tok.strlen = strlen(P->curfile);
+ } else if (!strcmp(s, "#LINE")) {
+ tok.t = TKintlit;
+ tok.ty = ty_uint;
+ tok.ilit.i = P->tokspan.line;
} else {
fatal(P, P->tokspan, "invalid #keyword");
}