Next: , Previous: , Up: D Parsers   [Contents][Index]

10.2.3 D Location Values

When the directive %locations is used, the D parser supports location tracking, see Tracking Locations. The position and the location structures are provided.

Instance Variable of Location: Position begin
Instance Variable of Location: Position end

The first, inclusive, position of the range, and the first beyond.

Constructor on Location: this(Position loc)

Create a Location denoting an empty range located at a given point.

Constructor on Location: this(Position begin, Position end)

Create a Location from the endpoints of the range.

Method on Location: string toString()

The range represented by the location as a string.