All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jtwig.plural.parse.parboiled.ParserContext Maven / Gradle / Ivy

There is a newer version: 5.87.0.RELEASE
Show newest version
package org.jtwig.plural.parse.parboiled;

import org.parboiled.BaseParser;

import java.util.HashMap;
import java.util.Map;

public class ParserContext {
    private final Map parsers = new HashMap();

    public  T parser (Class type) {
        return type.cast(parsers.get(type));
    }

    public ParserContext register (Class type, BaseParser parser) {
        parsers.put(type, parser);
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy