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

org.snapscript.compile.validate.ExecutableValidator Maven / Gradle / Ivy

There is a newer version: 1.4.6
Show newest version
package org.snapscript.compile.validate;

import java.util.List;

import org.snapscript.core.Context;
import org.snapscript.core.Module;
import org.snapscript.core.ModuleRegistry;
import org.snapscript.core.ProgramValidator;
import org.snapscript.core.TypeExtractor;
import org.snapscript.core.convert.ConstraintMatcher;

public class ExecutableValidator implements ProgramValidator {

   private final ModuleValidator validator;
   
   public ExecutableValidator(ConstraintMatcher matcher, TypeExtractor extractor) {
      this.validator = new ModuleValidator(matcher, extractor);
   }
   
   @Override
   public void validate(Context context) throws Exception {
      ModuleRegistry registry = context.getRegistry();
      List modules = registry.getModules();
      
      for(Module module : modules) {
         validator.validate(module);
      }
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy