use of org.whole.lang.scheme.model.Definition in project whole by wholeplatform.
the class SchemeInterpreterVisitor method visit.
public void visit(LocalExpression entity) {
getBindings().wEnterScope();
Definitions defs = entity.getDefinitions();
if (!defs.wGetEntityDescriptor().equals(SchemeEntityDescriptorEnum.Definitions))
throw new VisitException("expected a " + SchemeEntityDescriptorEnum.Definitions);
for (int i = 0; i < defs.wSize(); i++) {
IEntity e = defs.wGet(i);
if (e.wGetEntityDescriptor().equals(SchemeEntityDescriptorEnum.Definition)) {
Definition def = ((Definition) e);
getBindings().wDef(def.getName().wStringValue(), def.getExpression());
}
}
entity.getBody().accept(this);
getBindings().wExitScope();
}
use of org.whole.lang.scheme.model.Definition in project whole by wholeplatform.
the class DefinitionPart method getModelSpecificChildren.
protected List<IEntity> getModelSpecificChildren() {
List<IEntity> list = new ArrayList<IEntity>(2);
Definition entity = getModelEntity();
list.add(entity.getName());
list.add(entity.getExpression());
return list;
}
Aggregations