← Commit list

c08993f40

Denys Vlasenko
Denys Vlasenko
2020-02-22
SUCCESS Duration: 155s

Subject

ash: parser: Do not push token back before parseheredoc

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+4 -1
@@ -11607,7 +11607,7 @@ list(int nlflag)
n1 = NULL;
for (;;) {
- switch (peektoken()) {
+ switch (readtoken()) {
case TNL:
if (!(nlflag & 1))
break;
@@ -11618,9 +11618,12 @@ list(int nlflag)
if (!n1 && (nlflag & 1))
n1 = NODE_EOF;
parseheredoc();
+ tokpushback++;
+ lasttoken = TEOF;
return n1;
}
+ tokpushback++;
checkkwd = CHKNL | CHKKWD | CHKALIAS;
if (nlflag == 2 && ((1 << peektoken()) & tokendlist))
return n1;