diff options
Diffstat (limited to 'bootstrap/parse.c')
| -rw-r--r-- | bootstrap/parse.c | 8 |
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"); } |