Un-comment the debug functionality of the indentation stack

This commit is contained in:
Hackerpilot 2018-01-29 14:17:43 -08:00
parent 060d3f5a80
commit 19e774ebf7
1 changed files with 5 additions and 2 deletions

View File

@ -159,14 +159,17 @@ struct IndentStack
return cast(int) index; return cast(int) index;
} }
/+void dump() /**
* Dumps the current state of the indentation stack to `stderr`. Used for debugging.
*/
void dump()
{ {
import std.stdio : stderr; import std.stdio : stderr;
import dparse.lexer : str; import dparse.lexer : str;
import std.algorithm.iteration : map; import std.algorithm.iteration : map;
stderr.writefln("\033[31m%(%s %)\033[0m", arr[0 .. index].map!(a => str(a))); stderr.writefln("\033[31m%(%s %)\033[0m", arr[0 .. index].map!(a => str(a)));
}+/ }
private: private: