use of org.metaborg.core.config.ConfigRequest in project spoofax by metaborg.
the class SpoofaxLanguageSpecConfigService method toConfig.
@Override
protected ConfigRequest<ISpoofaxLanguageSpecConfig> toConfig(HierarchicalConfiguration<ImmutableNode> config, FileObject configFile) {
final SpoofaxProjectConfig projectConfig = new SpoofaxProjectConfig(config);
final SpoofaxLanguageSpecConfig languageSpecConfig = new SpoofaxLanguageSpecConfig(config, projectConfig);
final MessageBuilder mb = MessageBuilder.create().asError().asInternal().withSource(configFile);
final Collection<IMessage> messages = languageSpecConfig.validate(mb);
return new ConfigRequest<ISpoofaxLanguageSpecConfig>(languageSpecConfig, messages);
}
use of org.metaborg.core.config.ConfigRequest in project spoofax by metaborg.
the class SpoofaxProjectConfigService method toConfig.
@Override
protected ConfigRequest<ISpoofaxProjectConfig> toConfig(HierarchicalConfiguration<ImmutableNode> config, FileObject configFile) {
final SpoofaxProjectConfig projectConfig = new SpoofaxProjectConfig(config);
final MessageBuilder mb = MessageBuilder.create().asError().asInternal().withSource(configFile);
final Collection<IMessage> messages = projectConfig.validate(mb);
return new ConfigRequest<>(projectConfig, messages);
}
use of org.metaborg.core.config.ConfigRequest 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