use of org.whole.lang.models.visitors.ModelsInterpreterVisitor in project whole by wholeplatform.
the class ModelsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new ModelsLanguageKit());
platform.addOperationFactory(ModelsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ModelsGenericBuilderAdapter((IModelsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ModelsSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, ExportTexOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new TeXGeneratorVisitor((ExportTexOperation) operation);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ModelsPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, ValidatorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ModelsValidatorVisitor();
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ModelsInterpreterVisitor();
else
return null;
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, NormalizerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ModelsNormalizerVisitor();
}
});
}
Aggregations