Пример #1
0
 /// <summary>
 /// Returns a <see cref="System.String"/> that represents the current <see cref="GraphicFoo.Procedure"/>.
 /// </summary>
 /// <returns>A <see cref="System.String"/> that represents the current <see cref="GraphicFoo.Procedure"/>.</returns>
 public override string ToString()
 {
     return("[" + index + ", " + end + "] Function: " +
            type.ToString() + " " + name +
            "\nFunction parameters: " + parameters.ToString() +
            "Function variables: " + procedureVariables.ToString() +
            "Function temporaries: " + temporaryVariables.ToString());
 }
Пример #2
0
        /// <summary>
        /// Debugs the program memory.
        /// </summary>
        public static void DebugProgramMemory()
        {
            string output = "\n=====\nProgram Memory\n=====\n";

            output += "Constants: " + constants.ToString();
            output += "Global Variables: " + globalVariables.ToString();
            output += "Global Temporaries: " + globalTemporary.ToString();
            output += "Procedures: \n";
            foreach (Procedure procedure in procedures.Values)
            {
                output += procedure.ToString() + "\n";
            }
            Console.WriteLine(output);
        }