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.lexer
Compiler implementation of the
D programming language.
Authors:
License:
Source lexer.d
Documentation https://dlang.org/phobos/dmd_lexer.html
- class
Lexer; -
- pure nothrow this(const(char)*
filename, const(char)*base, size_tbegoffset, size_tendoffset, booldoDocComment, boolcommentToken, DiagnosticReporterdiagnosticReporter); - Creates a Lexer for the source code base[begoffset..endoffset+1]. The last character, base[endoffset], must be null (0) or EOF (0x1A).Parameters:
const(char)* filenameused for error messages const(char)* basesource code, must be terminated by a null (0) or EOF (0x1A) character size_t begoffsetstarting offset into base[] size_t endoffsetthe last offset to read into base[] bool doDocCommenthandle documentation comments bool commentTokencomments become TOK.comment's DiagnosticReporter diagnosticReporterthe diagnostic reporter to use - final nothrow bool
errors(); - Returns:true if any errors occurred during lexing or parsing.
- pure nothrow @safe Token*
allocateToken(); - Returns:a newly allocated Token.
- final nothrow TOK
peekNext(); - Look ahead at next token's value.
- final nothrow TOK
peekNext2(); - Look 2 tokens ahead at value.
- final nothrow void
scan(Token*t); - Turn next token in buffer into a token.
- final nothrow Token*
peekPastParen(Token*tk); - tk is on the opening (. Look ahead and return token that is past the closing ).
- static pure nothrow const(char)*
combineComments(const(char)*c1, const(char)*c2, boolnewParagraph); - Combine two document comments into one, separated by an extra newline if newParagraph is true.
Copyright © 1999-2019 by the D Language Foundation | Page generated by
Ddoc on Sun Sep 1 19:49:31 2019