use of org.metaborg.spoofax.core.config.SpoofaxProjectConfig 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.spoofax.core.config.SpoofaxProjectConfig in project spoofax by metaborg.
the class SpoofaxLanguageSpecConfigBuilder method build.
@Override
public ISpoofaxLanguageSpecConfig build(@Nullable FileObject rootFolder) throws IllegalStateException {
if (configuration == null) {
configuration = configReaderWriter.create(null, rootFolder);
}
SpoofaxProjectConfig projectConfig = projectConfigBuilder.build(configuration);
final SpoofaxLanguageSpecConfig config = new SpoofaxLanguageSpecConfig(configuration, projectConfig, identifier, name, langContribs, generates, exports, pardonedLanguages, useBuildSystemSpec, sdfVersion, sdfEnabled, sdf2tableVersion, dataDependent, sdfMainFile, parseTable, jsglrVersion, completionsParseTable, placeholderCharacters, prettyPrint, sdfExternalDef, sdfArgs, strFormat, strExternalJar, strExternalJarFlags, strArgs, buildSteps);
return config;
}
Aggregations