X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftext%2FParser.java;h=3fef8ae997e60a8550555c6a01ef01b70af8a7c0;hb=ab7fada54ed08b0a8d9ce9c606cbea29c3c3f819;hp=ccec36a74e37e6f73c6d1b7698b56cdc226a46a8;hpb=e8411efc4eaff6418cad496eb34fd7bc260eb9cd;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/text/Parser.java b/src/main/java/net/pterodactylus/sone/text/Parser.java index ccec36a..3fef8ae 100644 --- a/src/main/java/net/pterodactylus/sone/text/Parser.java +++ b/src/main/java/net/pterodactylus/sone/text/Parser.java @@ -24,19 +24,23 @@ import java.io.Reader; * Interface for parsers that can create {@link Part}s from a text source * (usually a {@link Reader}). * + * @param + * The type of the parser context * @author David ‘Bombe’ Roden */ -public interface Parser { +public interface Parser { /** * Create a {@link Part} from the given text source. * + * @param context + * The parser context * @param source * The text source * @return The parsed part * @throws IOException * if an I/O error occurs */ - public Part parse(Reader source) throws IOException; + public Iterable parse(C context, Reader source) throws IOException; }