Skip to content
Snippets Groups Projects
Select Git revision
  • 2270c9ec24491ec7d44bf3d5273bead1d0a873a3
  • master default
  • anders.blomdell
  • typeref
  • pragma
  • compiler-refactoring
  • labcomm2013
  • v2014.1
  • v2014.0
  • v2013.0
10 results

labcomm_default_scheduler.c

Blame
  • Forked from Anders Blomdell / LabComm
    Source project has a limited visibility.
    ErrorCheck.jrag 722 B
    import java.util.Collection;
    
    aspect ErrorCheck {
    
        syn int ASTNode.lineNumber() = getLine(getStart());
    
        protected String ASTNode.errors = null;
    
        protected void ASTNode.error(String s) {
            s = "Error at " + lineNumber() + ": " + s;
            if(errors == null) {
              errors = s;
            } else {
              errors = errors + "\n" + s;
            }
        }
    
        protected boolean ASTNode.hasErrors() {
            return errors != null;
        }
        public void ASTNode.errorCheck(Collection collection) {
            nameCheck();
            typeCheck();
            if(hasErrors())
            collection.add(errors);
            for(int i = 0; i < getNumChild(); i++) {
            getChild(i).errorCheck(collection);
            }
        }
    }