update shell
This commit is contained in:
+28
@@ -4,6 +4,8 @@ import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import p.studio.utilities.structures.ReadOnlySet;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Builder
|
||||
@Getter
|
||||
public class FrontendSpec {
|
||||
@@ -13,8 +15,34 @@ public class FrontendSpec {
|
||||
private final boolean caseSensitive;
|
||||
@Builder.Default
|
||||
private final String entryPointCallableName = "main";
|
||||
@Builder.Default
|
||||
private final List<Stdlib> stdlibVersions = List.of();
|
||||
|
||||
public String toString() {
|
||||
return String.format("FrontendSpec(language=%s, entryPoint=%s)", languageId, entryPointCallableName);
|
||||
}
|
||||
|
||||
public enum StdlibType {
|
||||
DEFAULT,
|
||||
STABLE,
|
||||
EXPERIMENTAL,
|
||||
}
|
||||
|
||||
public record Stdlib(int version, StdlibType type) {
|
||||
public static Stdlib asDefault(final int version) {
|
||||
return new Stdlib(version, StdlibType.DEFAULT);
|
||||
}
|
||||
|
||||
public static Stdlib asStable(final int version) {
|
||||
return new Stdlib(version, StdlibType.STABLE);
|
||||
}
|
||||
|
||||
public static Stdlib of(final int version) {
|
||||
return asStable(version);
|
||||
}
|
||||
|
||||
public static Stdlib asExperimental(final int version) {
|
||||
return new Stdlib(version, StdlibType.EXPERIMENTAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user