use of org.metaborg.core.config.ProjectConfig in project spoofax by metaborg.
the class LanguageSpecConfigBuilder method build.
@Override
public ILanguageSpecConfig build(@Nullable FileObject rootFolder) throws IllegalStateException {
if (configuration == null) {
configuration = configReaderWriter.create(null, rootFolder);
}
ProjectConfig projectConfig = projectConfigBuilder.build(configuration);
final LanguageSpecConfig config = new LanguageSpecConfig(configuration, projectConfig, identifier, name, sdfEnabled, sdf2tableVersion, dataDependent, parseTable, completionsParseTable, jsglrVersion, langContribs, generates, exports, pardonedLanguages, useBuildSystemSpec);
return config;
}
use of org.metaborg.core.config.ProjectConfig in project spoofax by metaborg.
the class LanguageSpecConfigService method toConfig.
@Override
protected ConfigRequest<ILanguageSpecConfig> toConfig(HierarchicalConfiguration<ImmutableNode> config, FileObject configFile) {
final ProjectConfig projectConfig = new ProjectConfig(config);
final LanguageSpecConfig languageSpecConfig = new LanguageSpecConfig(config, projectConfig);
final MessageBuilder mb = MessageBuilder.create().asError().asInternal().withSource(configFile);
final Collection<IMessage> messages = languageSpecConfig.validate(mb);
return new ConfigRequest<>(languageSpecConfig, messages);
}
Aggregations