예제 #1
0
        public string Visit(CIL_If_Goto node)
        {
            string solve = "";
            int    val;

            if (int.TryParse(node.Condition, out val))
            {
                solve += $"\t li $t0, {val} \n";
            }
            else
            {
                solve += $"\t lw $t0, { context_function[node.Condition] } \n";
            }
            solve += $"\t bne $t0, $zero, {node.Label}\n";
            return(solve);
        }
예제 #2
0
 public string Visit(CIL_If_Goto node)
 {
     throw new NotImplementedException();
 }