org.unlaxer.tinyexpression.parser.javalang.StringVariableDeclarationParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tinyExpression Show documentation
Show all versions of tinyExpression Show documentation
TinyExpression implemented with Unlaxer
The newest version!
package org.unlaxer.tinyexpression.parser.javalang;
import java.util.Optional;
import org.unlaxer.Tag;
import org.unlaxer.parser.Parser;
import org.unlaxer.tinyexpression.parser.ExpressionType;
import org.unlaxer.tinyexpression.parser.ExpressionTypes;
import org.unlaxer.tinyexpression.parser.StringSetterParser;
@SuppressWarnings("serial")
public class StringVariableDeclarationParser extends AbstractVariableDeclarationParser {
@Override
public java.util.Optional typeDeclaration() {
return java.util.Optional.of(
Parser.newInstance(StringTypeDeclarationParser.class).addTag(typed, typeTag()));
}
@Override
public Tag typeTag() {
return Tag.of(StringVariableDeclarationParser.class);
}
@Override
public Optional setter() {
return Optional.of(
new org.unlaxer.parser.combinator.Optional(
StringSetterParser.class
)
);
}
@Override
public Optional type() {
return Optional.of(ExpressionTypes.string);
}
}