private void PushOperator(Token token) { _operators.Push(token); if (IsLogicalOperator(token)) { var jmpIdx = _compiler.AddCommand(TokenToOperationCode(token), -1); LogicalJumps.Push(jmpIdx); } }
private void AddCommandForToken(Token current) { if (IsLogicalOperator(current)) { #if DEBUG System.Diagnostics.Debug.Assert(HasPendingLogicalJumps()); #endif _compiler.AddCommand(OperationCode.MakeBool, 0); var idx = LogicalJumps.Pop(); _compiler.CorrectCommandArgument(idx, _compiler._module.Code.Count); } else { _compiler.AddCommand(TokenToOperationCode(current), 0); } }