@@ -274,7 +274,12 @@ let lsts-parse-typed-macro(tokens: List<Token>): (AST, List<Token>) = (
274274 lsts-parse-expect(c"(", tokens); tokens = tail(tokens);
275275 while lsts-parse-head(tokens)!=c")" {
276276 if not(is(margs,ASTNil)) then { lsts-parse-expect(c",", tokens); tokens = tail(tokens); };
277- (let mbind, tokens) = lsts-parse-atom-without-tail(tokens);
277+ (let binding, tokens) = lsts-parse-identifier(tokens);
278+ let mbind = mk-var(binding);
279+ while lsts-parse-head(tokens) != c":" {
280+ (binding, tokens) = lsts-parse-identifier(tokens);
281+ mbind = mk-cons(mbind, mk-var(binding));
282+ };
278283 lsts-parse-expect(c":", tokens); tokens = tail(tokens);
279284 (let mbindt, tokens) = lsts-parse-type(tokens);
280285 let marg = mk-app(mk-lit(c":"), mk-cons(mbind, mk-atype(mbindt)));
@@ -324,7 +329,7 @@ let lsts-parse-type-conjugate(tokens: List<Token>): Tuple<Type,List<Token>> = (
324329 lsts-parse-expect(c"?", tokens); tokens = tail(tokens);
325330 TAny {}
326331 } else if lsts-is-ident-head(lsts-parse-head(tokens)) && not(lsts-is-type-tag(lsts-parse-head(tokens))) {
327- let varname = lsts-parse-head(tokens); tokens = tail (tokens);
332+ ( let varname, tokens) = lsts-parse-identifier (tokens);
328333 TVar { varname }
329334 } else {
330335 if not(lsts-is-type-tag(lsts-parse-head(tokens))) {
@@ -1075,13 +1080,13 @@ let lsts-parse-small-expression(tokens: List<Token>): Tuple<AST,List<Token>> = (
10751080 tokens = rhs-rest.second;
10761081 lsts-parse-expect(c"}", tokens); tokens = tail(tokens);
10771082 base = mk-app(
1078- Var{ c"macro::while", with-location( mk-token("macro::while"),loc) },
1079- mk-cons(
1080- c-rest.first,
1081- mk-app(
1082- Var{ c"scope", with-location( mk-token("scope"),loc) },
1083- rhs-rest.first
1084- )
1083+ mk-app(
1084+ Var{ c"while", with-location( mk-token("while"),loc) },
1085+ c-rest.first
1086+ ),
1087+ mk-app(
1088+ Var{ c"scope", with-location(mk-token("scope"),loc) },
1089+ rhs-rest.first
10851090 )
10861091 );
10871092 );
0 commit comments