Artifact 15707244447f69717d91d75af2ec22670ff3f709
- File
polemy/fresh.d
- 2010-11-24 03:30:56 - part of checkin [20be503cae] on branch trunk - set up referece manual (user: kinaba) [annotate]
/** * 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)); }