fitnesse.wikitext.parser.Comment 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 Comment extends SymbolType implements Rule, Translation {
public static final Comment symbolType = new Comment();
public Comment() {
super("Comment");
wikiMatcher(new Matcher().startLine().string("#"));
wikiRule(this);
htmlTranslation(this);
}
@Override
public Maybe parse(Symbol current, Parser parser) {
String literal = parser.parseLiteral(Newline);
if (!parser.atEnd()) literal += "\n";
return new Maybe<>(current.add(literal));
}
@Override
public String toTarget(Translator translator, Symbol symbol) {
return "";
}
}