Package weasel.compiler

Examples of weasel.compiler.WeaselSyntaxError


  public abstract List<WeaselInstruction> compile(WeaselToken token, WeaselCompiler compiler, boolean isFirst) throws WeaselCompilerException;

  protected WeaselToken expect(WeaselCompiler compiler, WeaselTokenType tt) throws WeaselCompilerException{
    WeaselToken token = null;//compiler.getNextToken();
    if(token.tokenType!=tt){
      throw new WeaselSyntaxError(token.line, "Expect %s but got %s", tt, token);
    }
    return token;
  }
View Full Code Here


    return token;
  }
 
  protected void expectFirst(WeaselToken token, boolean isFirst) throws WeaselCompilerException{
    if(!isFirst){
      throw new WeaselSyntaxError(token.line, "Token %s has to be first", token);
    }
  }
View Full Code Here

TOP

Related Classes of weasel.compiler.WeaselSyntaxError

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.