View source code
Display the source code in dmd/lexer.d from which this page was generated on github.
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 local clone.

dmd.lexer.Lexer.this - multiple declarations

Function Lexer.this

Creates a Lexer for the source code base[begoffset..endoffset+1]. The last character, base[endoffset], must be null (0) or EOF (0x1A).

this (
  const(char)* filename,
  const(char)* base,
  ulong begoffset,
  ulong endoffset,
  bool doDocComment,
  bool commentToken,
  const(char)[] vendor = "DLF",
  uint versionNumber = 1u
) pure;

Parameters

NameDescription
filename used for error messages
base source code, must be terminated by a null (0) or EOF (0x1A) character
begoffset starting offset into base[]
endoffset the last offset to read into base[]
doDocComment handle documentation comments
commentToken comments become TOK.comment's
vendor name of the vendor
versionNumber version of the caller

Function Lexer.this

Alternative entry point for DMDLIB, adds whitespaceToken

this (
  const(char)* filename,
  const(char)* base,
  ulong begoffset,
  ulong endoffset,
  bool doDocComment,
  bool commentToken,
  bool whitespaceToken
);

Function Lexer.this

Used for unittests for a mock Lexer

this();

Authors

Walter Bright

License

Boost License 1.0