public void CloseMethod()
{
// Make sure a method is open
if (currentMethod == null)
throw new Exception("No methods currently open.");
// Check to make sure all scopes have been closed.
if (currentScope != null)
throw new Exception("Can not close method until all scopes are closed. Method Token: " + currentMethod.Token.ToString());
// Change the current method to null
currentMethod = null;
}