StatementParser { static Parser<BlockStatement> blockStatement(Parser<Statement> stmt) { return between(term("{"), stmt.many(), term("}")).map(BlockStatement::new); }    }
@Test public void testBlockStatement() { Parser<BlockStatement> parser = StatementParser.blockStatement(StatementParser.NOP); TerminalParserTest.assertResult(parser, "{}", BlockStatement.class, "{}"); TerminalParserTest.assertResult(parser, "{;}", BlockStatement.class, "{;}"); TerminalParserTest.assertResult(parser, "{;;}", BlockStatement.class, "{; ;}"); }