fitnesse.wikitext.parser.Literal 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 Literal extends SymbolType implements Rule {
public static final Literal symbolType = new Literal();
public Literal() {
super("Literal");
wikiMatcher(new Matcher().string("!-"));
wikiRule(this);
}
@Override
public Maybe parse(Symbol current, Parser parser) {
SymbolType type = current.getType();
String literal = parser.parseLiteral(CloseLiteral);
if (parser.atEnd()) return Symbol.nothing;
return new Maybe<>(new Symbol(type, literal));
}
}