package bjc.pratt; import bjc.utils.data.ITree; import bjc.utils.parserutils.ParserException; /** * Represents a embedded block in an expression. * * @author bjculkin * * @param * The key type of the token. * * @param * The value type of the token. * * @param * The state type of the parser. */ @FunctionalInterface public interface ParseBlock { /** * Parse the block this represents. * * @param ctx * The context for parsing. * * @return A AST for this block. * * @throws ParserException * If something goes wrong during parsing, or the block * fails validation. */ ITree> parse(ParserContext ctx) throws ParserException; }