public List <TokensError> Run() { TokensBuilder.gen.needLaterCall = false; // we will 'laterCall' in this method if (haveIf) { return(ift.Run()); } List <TokensError> errors = new List <TokensError>(); TokensBuilder.gen.ParseExpression(body); // parse body LaterCalls.CreateEndIfLabel(); LaterCalls.Call(); LaterCalls.brEndIf = false; return(errors); }
public List <TokensError> Run() { List <TokensError> errors = new List <TokensError>(); TokensBuilder.gen.needLaterCall = false; Label endBlock = g.DefineLabel(); LaterCalls.StartLoop(); // initilizate start of loop LaterCalls.Brfalse(endBlock); // make statement that points to end of loop | TokensBuilder.gen.ParseExpression(body); // parse body | LaterCalls.BrEndIf(); // make break to start of loop and mark end of loop <- LaterCalls.Call(); // call all that we write here LaterCalls.isLoop = false; // mark that we heven`t loop now return(errors); }