Package weasel.compiler

Examples of weasel.compiler.WeaselCompilerMessage


              }else{
                iterator.previous();
                iterator.previous();
              }
            }catch(WeaselCompilerException e){
              compiler.addWeaselCompilerMessage(new WeaselCompilerMessage(MessageType.ERROR, e.getLine(), parentClass.getFileName(), e.getMessage()));
              iterator.previous();
              token = iterator.next();
              while(token.tokenType!=WeaselTokenType.SEMICOLON && iterator.hasNext()){
                token = iterator.next();
              }
            }
          }else{
            iterator.previous();
            iterator.previous();
          }
        }else{
          iterator.previous();
        }
      }
      if(auto){
        superCaller = true;
        if(classCompiler.genericClass.getGenericSuperClass()!=null){
          WeaselGenericMethod2 method = classCompiler.genericClass.getGenericSuperClass().getGenericMethodOfThis("<init>()", new WeaselGenericClass[0]);
          if(method==null){
            compiler.addWeaselCompilerMessage(
                new WeaselCompilerMessage(MessageType.ERROR, 0, parentClass.getFileName(),
                    String.format("No default constructor in %s found", classCompiler.genericClass.getGenericSuperClass())));
          }else{
            instructions.add(0, new WeaselInstructionInvoke(method.getMethod().getMethod().getClassNameAndDesk()));
          }
        }
      }
    }
    while(iterator.hasNext()){
      try{
        instructions.addAll(WeaselTree.parseAndCompile(compiler, this, iterator));
      }catch(WeaselCompilerException e){
        compiler.addWeaselCompilerMessage(new WeaselCompilerMessage(MessageType.ERROR, e.getLine(), parentClass.getFileName(), e.getMessage()));
        iterator.previous();
        WeaselToken token = iterator.next();
        while(token.tokenType!=WeaselTokenType.SEMICOLON && iterator.hasNext()){
          token = iterator.next();
        }
View Full Code Here


    return token;
  }
 
  @Override
  public void compileEasy() {
    compiler.addWeaselCompilerMessage(new WeaselCompilerMessage(MessageType.INFO, 0, getFileName(), "Compiling Class"));
    List<WeaselToken> modifiers = readModifier();
    WeaselToken token = getNextToken();
    try{
      WeaselCompiler.expectKeyWord(token, WeaselKeyWord.CLASS, WeaselKeyWord.INTERFACE, WeaselKeyWord.ENUM);
    }catch(WeaselCompilerException e){
View Full Code Here

    return modifier;
  }
 
  @Override
  public void finishCompile() {
    compiler.addWeaselCompilerMessage(new WeaselCompilerMessage(MessageType.INFO, 0, getFileName(), "Compiling Methods"));
    checkOverrides();
    for(int i=0; i<staticMethodBodys.length; i++){
      if(staticMethodBodys[i]!=null){
        try{
          ((WeaselMethodBodyCompilerV2)staticMethodBodys[i]).compile();
View Full Code Here

TOP

Related Classes of weasel.compiler.WeaselCompilerMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.