public override void Accept (WhileStatement whileStmt) { IodineLabel whileLabel = methodBuilder.CreateLabel (); IodineLabel breakLabel = methodBuilder.CreateLabel (); breakLabels.Push (breakLabel); continueLabels.Push (whileLabel); methodBuilder.MarkLabelPosition (whileLabel); whileStmt.Condition.Visit (this); methodBuilder.EmitInstruction (whileStmt.Condition.Location, Opcode.JumpIfFalse, breakLabel); whileStmt.Body.Visit (this); methodBuilder.EmitInstruction (whileStmt.Body.Location, Opcode.Jump, whileLabel); methodBuilder.MarkLabelPosition (breakLabel); breakLabels.Pop (); continueLabels.Pop (); }
private static AstNode ParseWhile(TokenStream stream) { WhileStatement ret = new WhileStatement (stream.Location); stream.Expect (TokenClass.Keyword, "while"); stream.Expect (TokenClass.OpenParan); ret.Add (ParseExpression (stream)); stream.Expect (TokenClass.CloseParan); ret.Add (ParseStatement (stream)); return ret; }
public void Accept(WhileStatement whileStmt) { whileStmt.Visit (functionCompiler); }
public override void Accept (WhileStatement whileStmt) { errorLog.AddError (ErrorType.ParserError, whileStmt.Location, "statement can not exist inside pattern!"); }
public virtual void Accept(WhileStatement whileStmt) { }
public void Accept(WhileStatement whileStmt) { whileStmt.VisitChildren (this); }
public void Accept(WhileStatement whileStmt) { errorLog.AddError (ErrorType.ParserError, whileStmt.Location, "Statement not allowed outside function body!"); }