net.forthecrown.grenadier.annotations.tree.RequiresTree Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grenadier-annotations Show documentation
Show all versions of grenadier-annotations Show documentation
Annotation-based command support for Grenadier
package net.forthecrown.grenadier.annotations.tree;
import org.jetbrains.annotations.ApiStatus.Internal;
@Internal
public interface RequiresTree extends Tree {
record MemberRequires(int tokenStart, MemberChainTree ref)
implements RequiresTree
{
@Override
public R accept(TreeVisitor visitor, C context) {
return visitor.visitMemberRequirement(this, context);
}
}
record PermissionRequires(int tokenStart, Name name)
implements RequiresTree
{
@Override
public R accept(TreeVisitor visitor, C context) {
return visitor.visitPermissionRequirement(this, context);
}
}
record VariableRequires(int tokenStart, String variable)
implements RequiresTree, VariableHolder
{
@Override
public R accept(TreeVisitor visitor, C context) {
return visitor.visitVariableRequires(this, context);
}
}
record ConstantRequires(int tokenStart, boolean value)
implements RequiresTree
{
@Override
public R accept(TreeVisitor visitor, C context) {
return visitor.visitConstantRequires(this, context);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy