// Goldie: GOLD Engine for D
// Grammar Compiler
// Written in the D programming language.

module goldie.grmc.util;

import std.conv;
public import std.datetime : _goldie_grmc_util_StopWatchType = StopWatch;
import std.stdio;

import semitwist.util.all;

template verboseSection(alias msg)
{
	enum verboseSection = `
		_goldie_grmc_util_StopWatchType _goldie_grmc_util_stopWatch;
		if(verbose)
		{
			write(`~msg.stringof~`);
			stdout.flush();
			_goldie_grmc_util_stopWatch.start();
		}
		scope(exit) if(verbose)
		{
			writeln(_goldie_grmc_util_stopWatch.peek.msecs, "ms");
			stdout.flush();
		}
	`;
}
