@@ -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 }
@@ -1286,9 +1287,7 @@ let lsts-make-lit(t: Token): AST = (
12861287 while non-zero(s) && s != c"_ss" {
12871288 if s.has-prefix(c"\\{") {
12881289 if non-zero(buffer) {
1289- buffer = buffer + SAtom{c"_ss"};
1290- let bs = clone-rope(buffer);
1291- let be = Lit { bs, with-location(mk-token(bs),loc) };
1290+ let be = mk-lit(with-location(mk-token(clone-rope(buffer)),loc)).ascript(t1(c"SmartString"));
12921291 if non-zero(base) {
12931292 base = mk-app(
12941293 Var{ c"+", with-location(mk-token("+"),loc) },
@@ -1330,9 +1329,7 @@ let lsts-make-lit(t: Token): AST = (
13301329 }
13311330 };
13321331 if non-zero(buffer) {
1333- buffer = buffer + SAtom{ c"_ss" };
1334- let bs = clone-rope(buffer);
1335- let be = Lit{ bs, with-location(mk-token(bs),loc) };
1332+ let be = mk-lit(with-location(mk-token(clone-rope(buffer)),loc)).ascript(t1(c"SmartString"));
13361333 if non-zero(base) {
13371334 base = mk-app(
13381335 Var{ c"+", with-location(mk-token("+"),loc) },
@@ -1342,6 +1339,8 @@ let lsts-make-lit(t: Token): AST = (
13421339 base = be;
13431340 };
13441341 };
1342+ } else if t.key.has-suffix(c"_ss") {
1343+ base = with-location(mk-lit(t.key.remove-suffix(c"_ss")),loc).ascript(t1(c"SmartString"));
13451344 };
13461345 base
13471346);
@@ -1493,6 +1492,8 @@ let lsts-parse-atom-without-tail(tokens: List<Token>): Tuple<AST,List<Token>> =
14931492 tokens = term-rest.second;
14941493 lsts-parse-expect(c")", tokens); tokens = tail(tokens);
14951494 term = AType{ term-rest.first };
1495+ } else if lsts-parse-head(tokens).has-suffix(c"_ss") {
1496+ (term, tokens) = lsts-parse-lit(tokens);
14961497 } else if lsts-parse-head(tokens)==c"sizeof" {
14971498 let loc = head(tokens).location;
14981499 tokens = tail(tokens);
0 commit comments