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

fitnesse.wikitext.parser.EqualPairRule Maven / Gradle / Ivy

There is a newer version: 20241026
Show newest version
package fitnesse.wikitext.parser;

public class EqualPairRule implements Rule {
    @Override
    public Maybe parse(Symbol current, Parser parser) {
        Symbol body = parser.parseToIgnoreFirst(current.getType());
        if (body.getChildren().isEmpty())  return Symbol.nothing;
        if (!parser.getCurrent().isType(current.getType())) return Symbol.nothing;

        return new Maybe<>(current.add(body));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy