BjorneToken token = tokens.peek();
int tt = token.getTokenType();
if (tt == TOK_END_OF_STREAM) {
captureCompletions(token, expectedSet);
if (needMore) {
throw new ShellSyntaxException(
"EOF reached while looking for optional linebreak(s)");
}
} else if (tt == TOK_END_OF_LINE) {
tokens.next();
captureHereDocuments();
while (true) {
token = tokens.peek();
tt = token.getTokenType();
if (tt == TOK_END_OF_LINE) {
tokens.next();
} else if (tt == TOK_END_OF_STREAM) {
captureCompletions(token, expectedSet);
if (needMore) {
throw new ShellSyntaxException(
"EOF reached while dealing with optional linebreak(s)");
} else {
break;
}
} else {