Search in sources :

Example 1 with SchemeSpecificBuilderAdapter

use of org.whole.lang.scheme.builders.SchemeSpecificBuilderAdapter in project whole by wholeplatform.

the class SchemeLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new SchemeLanguageKit());
    platform.addOperationFactory(SchemeLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new SchemeGenericBuilderAdapter((ISchemeBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(SchemeLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new SchemeSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addOperationFactory(SchemeLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new SchemeInterpreterVisitor((InterpreterOperation) operation);
            else
                return null;
        }
    });
    platform.addEditorKit(SchemeTextualEditorKit.ID);
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) SchemeGenericBuilderAdapter(org.whole.lang.scheme.builders.SchemeGenericBuilderAdapter) SchemeSpecificBuilderAdapter(org.whole.lang.scheme.builders.SchemeSpecificBuilderAdapter) ISchemeBuilder(org.whole.lang.scheme.builders.ISchemeBuilder) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) SchemeInterpreterVisitor(org.whole.lang.scheme.visitors.SchemeInterpreterVisitor) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory)

Aggregations

IBuilder (org.whole.lang.builders.IBuilder)1 IBuilderFactory (org.whole.lang.builders.IBuilderFactory)1 IEntityContext (org.whole.lang.contexts.IEntityContext)1 IOperation (org.whole.lang.operations.IOperation)1 ISchemeBuilder (org.whole.lang.scheme.builders.ISchemeBuilder)1 SchemeGenericBuilderAdapter (org.whole.lang.scheme.builders.SchemeGenericBuilderAdapter)1 SchemeSpecificBuilderAdapter (org.whole.lang.scheme.builders.SchemeSpecificBuilderAdapter)1 SchemeInterpreterVisitor (org.whole.lang.scheme.visitors.SchemeInterpreterVisitor)1 IVisitor (org.whole.lang.visitors.IVisitor)1 IVisitorFactory (org.whole.lang.visitors.IVisitorFactory)1