Skip to content

Commit cf26631

Browse files
ok
1 parent 3f3c6f4 commit cf26631

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

PLATFORM/C/LIB/common-macros.lsts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ typed macro macro::while(cond: lazy, body: lazy): lazy = (
6868
);
6969

7070
typed macro macro::assert(cond: lazy): lazy = (
71-
if not(cond) then fail("Assertion Failed", macro::location(here))
71+
if not(cond) then fail("Assertion Failed", macro::location(cond))
7272
);

PLUGINS/FRONTEND/LSTS/lsts-parse.lsts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,13 +525,14 @@ let lsts-make-maybe-var(tokens: List<Token>): Tuple<AST,List<Token>> = (
525525
lsts-parse-lit(tokens)
526526
} else {
527527
if not(non-zero(tokens)) { lsts-parse-expect(c"Identifier", tokens); };
528+
let loc = head(tokens).location;
528529
let base = ASTEOF;
529530
if lsts-is-lit(head(tokens).key) {
530531
base = lsts-make-lit(head(tokens));
531532
tokens = tail(tokens);
532533
} else {
533534
(let var-name, tokens) = lsts-parse-identifier(tokens);
534-
base = mk-var(var-name);
535+
base = with-location(mk-var(var-name), loc);
535536
};
536537
Tuple { base, tokens }
537538
}

tests/unit/ast-macros.lsts.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[3,4]2
1+
[3,4]20123

0 commit comments

Comments
 (0)