package org.simantics.scl.compiler.compilation;
import java.util.Arrays;
+import java.util.Collection;
import java.util.function.Consumer;
+import org.simantics.scl.compiler.elaboration.chr.CHRRuleset;
import org.simantics.scl.compiler.elaboration.modules.SCLValue;
-import org.simantics.scl.compiler.elaboration.modules.TypeAlias;
import org.simantics.scl.compiler.elaboration.modules.TypeClass;
-import org.simantics.scl.compiler.elaboration.modules.TypeConstructor;
+import org.simantics.scl.compiler.elaboration.modules.TypeDescriptor;
import org.simantics.scl.compiler.elaboration.relations.SCLEntityType;
import org.simantics.scl.compiler.elaboration.relations.SCLRelation;
import org.simantics.scl.compiler.elaboration.rules.MappingRelation;
public Namespace getNamespace(String name) {
return base.getNamespace(name);
}
+
+ @Override
+ public Collection<String> getNamespaces() {
+ return base.getNamespaces();
+ }
@Override
public SCLValue getValue(String name) throws AmbiguousNameException {
throw new AmbiguousNameException(Arrays.asList(value.getName().module, value2.getName().module), value.getName().name);
}
else {
- if(value != null)
- return value;
- return base.getValue(name);
+ if(value != null)
+ return value;
+ return base.getValue(name);
}
}
-
+
@Override
public SCLRelation getRelation(String name) throws AmbiguousNameException {
SCLRelation relation = module.getRelation(name);
return base.getRelation(name);
}
+ @Override
+ public CHRRuleset getRuleset(String name) throws AmbiguousNameException {
+ CHRRuleset ruleset = module.getRuleset(name);
+ if(ruleset != null)
+ return ruleset;
+ return base.getRuleset(name);
+ }
+
@Override
public SCLEntityType getEntityType(String name)
throws AmbiguousNameException {
}
@Override
- public TypeConstructor getTypeConstructor(String name)
+ public TypeDescriptor getTypeDescriptor(String name)
throws AmbiguousNameException {
- TypeConstructor typeConstructor = module.getTypeConstructor(name);
- if(typeConstructor != null)
- return typeConstructor;
- return base.getTypeConstructor(name);
+ TypeDescriptor typeDescriptor = module.getTypeDescriptor(name);
+ if(typeDescriptor != null)
+ return typeDescriptor;
+ return base.getTypeDescriptor(name);
}
@Override
return typeClass;
return base.getTypeClass(name);
}
-
- @Override
- public TypeAlias getTypeAlias(String name) throws AmbiguousNameException {
- TypeAlias typeAlias = module.getTypeAlias(name);
- if(typeAlias != null)
- return typeAlias;
- return base.getTypeAlias(name);
- }
@Override
public MappingRelation getMappingRelation(String name)