Report a bug
		
				If you spot a problem with this page, click here to create a Bugzilla issue.
		
			Improve this page
		
			Quickly fork, edit online, and submit a pull request for this page.
			Requires a signed-in GitHub account. This works well for small changes.
			If you'd like to make larger changes you may want to consider using
			a local clone.
		
	dmd.location
Encapsulates file/line/column locations.
Authors: 
License: 
Source location.d
Documentation https://dlang.org/phobos/dmd_location.html
- enumMessageStyle: ubyte;
- How code locations are formatted for diagnostic reporting- digitalmars
- filename.d(line): message
- gnu
- filename.d:line: message, see https://www.gnu.org/prep/standards/html_node/Errors.html
 
- structLoc;
- A source code locationUsed for error messages, __FILE__ and __LINE__ tokens, __traits(getLocation, XXX), debug info etc.- static immutable Locinitial;
- use for default initialization of const ref Loc's
- static nothrow voidset(boolshowColumns, MessageStylemessageStyle);
- Configure how display is doneParameters:bool showColumnswhen to display columns MessageStyle messageStyledigitalmars or gnu style messages 
- const nothrow @nogc @safe uintcharnum();
 nothrow @nogc @safe uintcharnum(uintnum);
- utf8 code unit index relative to start of line, starting from 1
- const nothrow @nogc @safe uintlinnum();
 nothrow @nogc @safe uintlinnum(uintnum);
- line number, starting from 1
- const nothrow @nogc const(char)*filename();
- Returns:filename for this location, null if none
- nothrow @trusted voidfilename(const(char)*name);
- Set file name for this locationParameters:const(char)* namefile name for location, null for no file name 
- const nothrow boolequals(ref const(Loc)loc);
- Checks for equivalence by comparing the filename contents (not the pointer) and character location.Note - Uses case-insensitive comparison on Windows
- Ignores charnum if Columns is false.
 
- const nothrow @nogc @trusted boolopEquals(ref const(Loc)loc);
 const nothrow @trusted size_ttoHash();
- opEquals() /- toHash() for AA key usageCompare filename contents (case-sensitively on Windows too), not the pointer - a static foreach loop repeatedly mixing in a mixin may lead to multiple equivalent filenames (foo.d-mixin-<line>), e.g., for test/runnable/test18880.d.
- const pure nothrow @safe boolisValid();
- Returns:true if Loc has been set to other than the default initialization
 
Copyright © 1999-2024 by the D Language Foundation | Page generated by
Ddoc on (no date time)