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-by: Eric Seckler <>
Commit-Queue: Fredrik Söderquist <>
Cr-Commit-Position: refs/heads/master@{#591979}
1 file changed