@Override
  public ParsedLine parse(final String line, final int cursor, final ParseContext context) {
    final ParsedLine parsed = delegate.parse(line, cursor, context);

    if (context != ParseContext.ACCEPT_LINE) {
      return parsed;
    }

    if (UnclosedQuoteChecker.isUnclosedQuote(line)) {
      throw new EOFError(-1, -1, "Missing end quote", "end quote char");
    }

    final String bare = CommentStripper.strip(parsed.line());
    if (bare.isEmpty()) {
      return parsed;
    }

    if (cliCmdPredicate.test(bare)) {
      return parsed;
    }

    if (!bare.endsWith(TERMINATION_CHAR)) {
      throw new EOFError(-1, -1, "Missing termination char", "termination char");
    }

    return parsed;
  }
@Test
  public void shouldNotAcceptUnterminatedAcceptLine() {
    // Given:
    givenDelegateWillReturn(UNTERMINATED_LINE);

    // When:
    final EOFError e = assertThrows(
        EOFError.class,
        () -> parser.parse("what ever", 0, ParseContext.ACCEPT_LINE)
    );

    // Then:
    assertThat(e.getMessage(), containsString("Missing termination char"));
  }