use of org.whole.lang.tests.visitors.TestsLearningInterpreterVisitor in project whole by wholeplatform.
the class TestsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new TestsLanguageKit());
platform.addOperationFactory(TestsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new TestsGenericBuilderAdapter((ITestsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(TestsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new TestsSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(TestsLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new TestsPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(TestsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new TestsLearningInterpreterVisitor();
else
return null;
}
});
platform.addOperationFactory(TestsLanguageKit.URI, ContentAssistOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new TestsContentAssistVisitor();
}
});
}
Aggregations