Improve EOF handling in the headless REPL

When the REPL encounters an EOF, it can start spinning on just
generating a lot of empty ("") expressions.
Instead quit if an EOF is received and there's an empty expression. If
the expression is not empty it will still be evaluated. This helps
certain non-interactive use-cases.

Bug: 748419
Change-Id: Ica91f2164361bd6891f71e25fbdba0773c6c9941
Reviewed-on: https://chromium-review.googlesource.com/1225764
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#591979}
1 file changed