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.
							
						Class dmd.lexer.Lexer
				
						
					
				Constructors
| Name | Description | 
|---|---|
| this | Creates a Lexer for the source code base[begoffset..endoffset+1]. The last character, base[endoffset], must be null (0) or EOF (0x1A). | 
Methods
| Name | Description | 
|---|---|
| charConstant | |
| combineComments | Combine two document comments into one, separated by an extra newline if newParagraph is true. | 
| decodeUTF | Decode UTF character. Issue error messages for invalid sequences. Return decoded character, advance p to last character in UTF sequence. | 
| delimitedStringConstant | Lex a delimited string. Some examples of delimited strings are: | 
| escapeSequence | Parse escape sequence. | 
| escapeSequence | Parse the given string literal escape sequence into a single character. | 
| escapeStringConstant | Scan a double-quoted string while building the processed string value by
    handling escape sequences. The result is returned in the given ttoken.
    This function assumes thatpcurrently points to the opening double-quote
    of the string. | 
| getDocComment | Parse doc comment embedded between t.ptr and p. Remove trailing blanks and tabs from lines. Replace all newlines with \n. Remove leading comment character from each line. Decide if it's a lineComment or a blockComment. Append to previous one for this token. | 
| hexStringConstant | Lex hex strings: x"0A ae 34FE BD" | 
| inreal | Read in characters, converting them to real. | 
| number | Read in a number. If it's an integer, store it in tok.TKutok.Vlong. integers can be decimal, octal or hex Handle the suffixes U, UL, LU, L, etc. If it's double, store it in tok.TKutok.Vdouble. | 
| peekNext | Look ahead at next token's value. | 
| peekNext2 | Look 2 tokens ahead at value. | 
| peekPastParen | tk is on the opening (. Look ahead and return token that is past the closing ). | 
| poundLine | |
| scan | Turn next token in buffer into a token. | 
| stringPostfix | Get postfix of string literal. | 
| tokenStringConstant | Lex a token string. Some examples of token strings are: | 
| wysiwygStringConstant | Lex a wysiwyg string. pmust be pointing to the first character before the
    contents of the string literal. The character pointed to bypwill be used as
    the terminating character (i.e. backtick or double-quote). | 
| error | Report an error message. | 
| error | Report an error message. | 
| factory | Create instance of class specified by the fully qualified name classname. The class must either have no constructors or have a default constructor. | 
| opCmp | Compare with another Object obj. | 
| opEquals | Test whether thisis equal too.
 The default implementation only compares by identity (using theisoperator).
 Generally, overrides foropEqualsshould attempt to compare objects by their contents. | 
| toHash | Compute hash function for Object. | 
| toString | Convert Object to a human readable string. | 
Authors
License
					Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.