fitnesse.wikitext.parser.EqualPairRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fitnesse Show documentation
Show all versions of fitnesse Show documentation
The fully integrated standalone wiki, and acceptance testing framework.
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));
}
}