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

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

There is a newer version: 20241026
Show newest version
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));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy