@@ -1286,9 +1286,7 @@ let lsts-make-lit(t: Token): AST = (
1286
1286
while non-zero(s) && s != c"_ss" {
1287
1287
if s.has-prefix(c"\\{") {
1288
1288
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) };
1289
+ let be = mk-lit(with-location(mk-token(clone-rope(buffer)),loc)).ascript(t1(c"SmartString"));
1292
1290
if non-zero(base) {
1293
1291
base = mk-app(
1294
1292
Var{ c"+", with-location(mk-token("+"),loc) },
@@ -1330,9 +1328,7 @@ let lsts-make-lit(t: Token): AST = (
1330
1328
}
1331
1329
};
1332
1330
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) };
1331
+ let be = mk-lit(with-location(mk-token(clone-rope(buffer)),loc)).ascript(t1(c"SmartString"));
1336
1332
if non-zero(base) {
1337
1333
base = mk-app(
1338
1334
Var{ c"+", with-location(mk-token("+"),loc) },
@@ -1342,6 +1338,8 @@ let lsts-make-lit(t: Token): AST = (
1342
1338
base = be;
1343
1339
};
1344
1340
};
1341
+ } else if t.key.has-suffix(c"_ss") {
1342
+ base = with-location(mk-lit(t.key.remove-suffix(c"_ss")),loc).ascript(t1(c"SmartString"));
1345
1343
};
1346
1344
base
1347
1345
);
@@ -1493,6 +1491,8 @@ let lsts-parse-atom-without-tail(tokens: List<Token>): Tuple<AST,List<Token>> =
1493
1491
tokens = term-rest.second;
1494
1492
lsts-parse-expect(c")", tokens); tokens = tail(tokens);
1495
1493
term = AType{ term-rest.first };
1494
+ } else if lsts-parse-head(tokens).has-suffix(c"_ss") {
1495
+ (term, tokens) = lsts-parse-lit(tokens);
1496
1496
} else if lsts-parse-head(tokens)==c"sizeof" {
1497
1497
let loc = head(tokens).location;
1498
1498
tokens = tail(tokens);
0 commit comments