From: Clyne Sullivan Date: Wed, 7 Feb 2018 21:24:27 +0000 (-0500) Subject: loop fix X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=1d092d70a3c941920da6fb25899bac0aec5cf6bf;p=clyne%2Finterpreter.git loop fix --- diff --git a/parser.c b/parser.c index bd540e0..ac739a0 100644 --- a/parser.c +++ b/parser.c @@ -186,18 +186,17 @@ int idoline(interpreter *interp, const char *line) loop: ooffset = 0; offset = 0; + skipblank(line, eol, &offset); - if (line[0] == '#') { + if (line[offset] == '#') { goto norun; } else if (interp->indent > 0) { - skipblank(line, eol, &offset); if (!strcmp(line + offset, "end")) interp->indent--; goto norun; } // step 1 - convert to tokens - skipblank(line, eol, &offset); while (!eol(line[offset])) { if (offset > 0 && line[offset] == '>') { offset++;