use of org.whole.lang.semantics.builders.ISemanticsBuilder in project whole by wholeplatform.
the class SemanticsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new SemanticsLanguageKit());
platform.addOperationFactory(SemanticsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new SemanticsGenericBuilderAdapter((ISemanticsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(SemanticsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new SemanticsSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(SemanticsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new SemanticsInterpreterVisitor();
else
return null;
}
});
platform.addOperationFactory(SemanticsLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new SemanticsDynamicCompilerVisitor();
else
return null;
}
});
}
Aggregations