added first deps implementation

This commit is contained in:
2026-03-24 13:42:13 +00:00
parent ce951d2e10
commit 5ee28101a3
129 changed files with 1691 additions and 2176 deletions
@@ -0,0 +1,30 @@
package p.studio.compiler;
import p.studio.compiler.model.FrontendSpec;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
public class FrontendRegistryService {
private static final FrontendSpec[] FRONTEND_SPECS = {
PBSDefinitions.PBS,
};
private static final Map<String, FrontendSpec> FRONTENDS = new HashMap<>();
static {
for (final var frontendSpec : FRONTEND_SPECS) {
FRONTENDS.put(frontendSpec.getLanguageId(), frontendSpec);
}
if (FRONTENDS.size() != FRONTEND_SPECS.length) throw new IllegalStateException("Duplicate frontend specs found");
}
public static FrontendSpec getDefaultFrontendSpec() {
return FRONTENDS.get(PBSDefinitions.PBS.getLanguageId());
}
public static Optional<FrontendSpec> getFrontendSpec(final String languageId) {
return Optional.ofNullable(FRONTENDS.get(languageId));
}
}