/* * Decompiled with CFR 0.152. * * Could not load the following classes: * org.jspecify.annotations.Nullable */ package net.minecraft.util.parsing.packrat; import java.util.Optional; import net.minecraft.util.parsing.packrat.Control; import net.minecraft.util.parsing.packrat.ErrorCollector; import net.minecraft.util.parsing.packrat.NamedRule; import net.minecraft.util.parsing.packrat.Scope; import org.jspecify.annotations.Nullable; public interface ParseState { public Scope scope(); public ErrorCollector errorCollector(); default public Optional parseTopRule(NamedRule rule) { T result = this.parse(rule); if (result != null) { this.errorCollector().finish(this.mark()); } if (!this.scope().hasOnlySingleFrame()) { throw new IllegalStateException("Malformed scope: " + String.valueOf(this.scope())); } return Optional.ofNullable(result); } public @Nullable T parse(NamedRule var1); public S input(); public int mark(); public void restore(int var1); public Control acquireControl(); public void releaseControl(); public ParseState silent(); }