From 0d929287d77ccc3fb52ca8bd072678b5ae2c81c8 Mon Sep 17 00:00:00 2001 From: Thomas Bracht Laumann Jespersen Date: Thu, 26 Jan 2023 12:09:44 +0100 Subject: implement line number info tracking Support "file" and "loc" directives. "file" takes a string (a file name) assigns it a number, sets the current file to that number and records the string for later. "loc" takes a single number and outputs location information with a reference to the current file. --- tools/lexh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/lexh.c b/tools/lexh.c index 5ceb4ee..8883976 100644 --- a/tools/lexh.c +++ b/tools/lexh.c @@ -23,11 +23,11 @@ char *tok[] = { "ceql", "cnel", "cles", "clts", "cgts", "cges", "cnes", "ceqs", "cos", "cuos", "cled", "cltd", "cgtd", "cged", "cned", "ceqd", "cod", "cuod", - "vaarg", "vastart", "...", "env", + "vaarg", "vastart", "...", "env", "loc", "call", "phi", "jmp", "jnz", "ret", "hlt", "export", - "function", "type", "data", "section", "align", "blit", - "l", "w", "sh", "uh", "h", "sb", "ub", "b", + "function", "type", "data", "section", "align", "file", + "blit", "l", "w", "sh", "uh", "h", "sb", "ub", "b", "d", "s", "z", "loadw", "loadl", "loads", "loadd", "alloc1", "alloc2", -- cgit 1.4.1