Artifact Content
Not logged in

Artifact 15707244447f69717d91d75af2ec22670ff3f709


/**
 * Authors: k.inaba
 * License: NYSL 0.9982 http://www.kmonos.net/nysl/
 *
 * Interpreter-wise fresh ID generator.
 */
module polemy.fresh;
import polemy._common;
import core.atomic;

private shared int freshVarId = -1;

/// Generate one fresh variable name

string freshVarName()
{
	return text("$", atomicOp!("+=")(freshVarId, 1));
}