Package weasel.interpreter.bytecode

Examples of weasel.interpreter.bytecode.WeaselInstructionJumperDummy


   
    WeaselToken t = iterator.next();
    WeaselCompilerReturn wcr;
    if(instructions == null){
      instructions = new WeaselInstructionList();
      instructions.add(token.line, new WeaselInstructionJumperDummy());
    }
    WeaselInstruction startJump = instructions.getLast();
    wcr = tree2.compile(compiler, compilerHelpher, null, new WeaselGenericClass(compiler.baseTypes.voidClass), null, false);
    instructions.addAll(wcr.getInstructions());
    WeaselTree.autoCast(compiler, wcr.getReturnType(), new WeaselGenericClass(compiler.baseTypes.booleanClass), token.line, instructions, true);
View Full Code Here


      throw new WeaselCompilerException(token.line, "Expect boolean value in while");
    }
    WeaselToken t = iterator.next();
    WeaselCompilerReturn wcr;
    WeaselInstructionList instructions = new WeaselInstructionList();
    WeaselInstruction continueJump = new WeaselInstructionJumperDummy();
    instructions.add(token.line, continueJump);
    wcr = tree1.compile(compiler, compilerHelpher, null, new WeaselGenericClass(compiler.baseTypes.booleanClass), null, false);
    instructions.addAll(wcr.getInstructions());
    WeaselTree.autoCast(compiler, wcr.getReturnType(), new WeaselGenericClass(compiler.baseTypes.booleanClass), token.line, instructions, true);
    WeaselInstructionIf ifI;
View Full Code Here

  @Override
  public WeaselCompilerReturn compile(WeaselToken token, WeaselCompiler compiler, WeaselKeyWordCompilerHelper compilerHelpher, ListIterator<WeaselToken> iterator) throws WeaselCompilerException {
    compilerHelpher.openBlock(true);
    WeaselToken t = iterator.next();
    WeaselInstructionList instructions = new WeaselInstructionList();
    WeaselInstructionJumperDummy startJump = new WeaselInstructionJumperDummy();
    instructions.add(token.line, startJump);
    if(t.tokenType==WeaselTokenType.OPENBLOCK){
      t = iterator.next();
      while(t.tokenType!=WeaselTokenType.CLOSEBLOCK){
        iterator.previous();
View Full Code Here

TOP

Related Classes of weasel.interpreter.bytecode.WeaselInstructionJumperDummy

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.