From 2a9674862ecaf9b7b1b66178782d47e8445df325 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 26 Mar 2020 20:54:37 +0000 Subject: 45616: Remove token from count argument to repeat --- ChangeLog | 5 +++++ Src/loop.c | 4 +++- Test/A01grammar.ztst | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fea7b0f76..0f4c36dfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-03-26 Peter Stephenson + + * 45616: Src/loop.c, Test/A01grammar.ztst: Remove tokens + from count to repeat keyword. + 2020-03-25 Daniel Shahaf * 45583/0008: Etc/BUGS, Src/utils.c, Test/B13whence.ztst: diff --git a/Src/loop.c b/Src/loop.c index 95ef48b33..f13c8c4a9 100644 --- a/Src/loop.c +++ b/Src/loop.c @@ -499,8 +499,10 @@ execrepeat(Estate state, UNUSED(int do_exec)) lastval = 0; tmp = ecgetstr(state, EC_DUPTOK, &htok); - if (htok) + if (htok) { singsub(&tmp); + untokenize(tmp); + } count = mathevali(tmp); if (errflag) return 1; diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst index 0dbf468f6..35a04e7d5 100644 --- a/Test/A01grammar.ztst +++ b/Test/A01grammar.ztst @@ -557,6 +557,13 @@ >Hip hip hooray >Hip hip hooray + repeat 2*2 print yeah +0:Tokens in repeat argument +>yeah +>yeah +>yeah +>yeah + case bravo { (alpha) print schmalpha ;; -- cgit 1.4.1