/// <summary> /// Re-assigns the indices of all local variables which are accessed inside the statement, such that they /// build a 0-based continuous sequence. /// </summary> /// <param name="body">a statement</param> /// <returns>an enumeration of all local variables which are accessed inside the statement</returns> public static IEnumerable <Variable> RenumerateLocalVariables(this Statement body) { var ext = new LocalVariableExtractor(body); ext.GetAlgorithm(); return(ext.SeenVariables); }
/// <summary> /// Re-assigns the indices of all local variables which are accessed inside the statement, such that they /// build a 0-based continuous sequence. /// </summary> /// <param name="body">a statement</param> /// <returns>an enumeration of all local variables which are accessed inside the statement</returns> public static IEnumerable<Variable> RenumerateLocalVariables(this Statement body) { var ext = new LocalVariableExtractor(body); ext.GetAlgorithm(); return ext.SeenVariables; }