Identifier.generateIdWithLoc

Generate deterministic named identifier based on a source location, such that the name is consistent across multiple compilations. A new unique name is generated. If the prefix+location is already in the stringtable, an extra suffix is added (starting the count at "_1").

class Identifier
nothrow extern (D) static
generateIdWithLoc
(
string prefix
,
const ref Loc loc
)

Parameters

prefix string

first part of the identifier name.

loc Loc

source location to use in the identifier name.

Return Value

Identifier (inside Identifier.idPool) with deterministic name based on the source location.

Meta