All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.snapscript.tree.reference.SetReference Maven / Gradle / Ivy

There is a newer version: 1.4.6
Show newest version
package org.snapscript.tree.reference;

import static org.snapscript.core.constraint.Constraint.SET;

import org.snapscript.core.InternalStateException;
import org.snapscript.core.scope.Scope;
import org.snapscript.core.type.Type;
import org.snapscript.parse.StringToken;

public class SetReference extends ConstraintReference {
   
   public SetReference(StringToken token) {
      super();
   }
   
   @Override
   protected ConstraintValue create(Scope scope) {
      try {
         Type type = SET.getType(scope);
         return new ConstraintValue(type, SET);
      } catch(Exception e) {
         throw new InternalStateException("Could not resolve set reference", e);
      }
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy