aboutsummaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2024-01-02 11:09:18 +0100
committerQuentin Carbonneaux <[email protected]>2024-01-02 12:12:05 +0100
commit85287081c4a25785dec1ec48c488a5879b3c37ac (patch)
tree83387b773a127d32498d9c9b356ed150fd77a780 /parse.c
parent24d68e841f6c4adf0622b132f905e97d115a4e2d (diff)
dbgloc: add column argument
dbgloc line [col] This is implemented in a backwards-compatible manner.
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index 33ed6ec..738ec5b 100644
--- a/parse.c
+++ b/parse.c
@@ -669,6 +669,14 @@ parseline(PState ps)
arg[0] = INT(tokval.num);
if (arg[0].val != tokval.num)
err("line number too big");
+ if (peek() == Tcomma) {
+ next();
+ expect(Tint);
+ arg[1] = INT(tokval.num);
+ if (arg[1].val != tokval.num)
+ err("column number too big");
+ } else
+ arg[1] = INT(0);
goto Ins;
}
if (op == Tcall) {