From dddbdcbeb41777c1e98e37281dddd6f3c89a1280 Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 8 Aug 2022 19:31:35 +0200 Subject: ok --- bootstrap/parse.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bootstrap/parse.c') 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"); } -- cgit v1.2.3