Parser Methods |
The Parser type exposes the following members.
Name | Description | |
---|---|---|
AddCompilerDirectiveParsePoint |
Add a parse-point for a compiler directive - triggers the callback when the specified token appears after the '#'.
| |
AddDocCommentParseTag |
Add a documentation comment tag for callback during parsing.
| |
AddOperatorParsePoint(String, Int32, Boolean, Boolean, ParserParseDelegate) |
Add a parse-point to the parser for an operator - the callback is triggered when the token is found.
| |
AddOperatorParsePoint(String, Int32, Int32, Boolean, Boolean, ParserParseDelegate, Type) |
Add a parse-point to the parser for an operator - the callback is triggered when the token appears in the specified context.
| |
AddParsePoint(String, ParserParseDelegate) |
Add a parse-point to the parser - the callback is triggered when the token is found.
| |
AddParsePoint(String, ParserParseDelegate, Type) |
Add a parse-point to the parser - the callback is triggered when the token appears in the specified context.
| |
AddParsePoint(String, Int32, ParserParseDelegate) |
Add a parse-point to the parser - the callback is triggered when the token is found.
| |
AddParsePoint(String, Int32, ParserParseDelegate, Type) |
Add a parse-point to the parser - the callback is triggered when the token appears in the specified context.
| |
AddUnused(CodeObject) |
Add a code object that was just parsed but not yet needed to the unused list.
| |
AddUnused(Token) |
Add a token that was just parsed but not yet needed to the unused list.
| |
AttachMessage |
Create a parser error message in connection with the specified Token and attach it to the related CodeObject.
| |
CheckForUnusedTypeRef |
Check that there appears to be an unused identifier, TypeRef, or UnresolvedRef at the specified offset.
| |
CurrentTokenIndentedLessThan |
Determine if the current token is indented less than the specified starting token.
| |
Dispose | ||
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetCurrentLine |
Get the current line of text including the EOL character.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetIdentifier |
Get the current token if it's an identifier, otherwise return null; also, advance to the next token.
| |
GetIdentifierText |
Get the text of the current token if it's an identifier, otherwise return null; also, advance to the next token.
Does NOT return the '@' verbatim prefix if there was one.
| |
GetLastPeekedTokenText |
Get the previously peeked token text at the specified index (-1 is the last peeked token, -2 the one before that, etc).
| |
GetLastUnusedNonDirective |
Get the last parsed object in the Unused list (Token or UnusedCodeObject),
skipping over any compiler directives if a non-compiler directive exists.
| |
GetNormalizationBlocker |
Get the current normalization blocker object.
| |
GetOperatorInfoForToken |
Get the OperatorInfo structure for the current token.
| |
GetToDelimiter |
Parse from just after the current token up to (but not including) the specified delimiter, returning that as a string, and
advancing to the delimiter as the next token. Stops just short of EOL if the delimiter isn't found.
If the optional 'abortDelimiter' is non-zero, the string extraction will stop if it is encountered.
| |
GetTokenToEOL |
Parse from the current token up to (but not including) the EOL, returning that as a string, and advancing to the next token.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUnused |
Get the object in the Unused list at the specified index.
| |
GetUnusedCodeObject |
Get the object in the Unused list at the specified index as a CodeObject.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MergeTokens |
Merge the specified 2nd token into the first one.
| |
MoveCommentsToPostUnused |
Move any non-EOL comments we just passed to the Post unused list.
| |
MoveCommentsToUnused |
Move any non-EOL comments we just passed to the unused list.
| |
MovePostUnusedToUnused |
Move the current post-unused list to the unused list.
| |
MoveUnusedToPostUnused |
Move the current unused list to the post-unused list.
| |
NextChar | ||
NextToken |
Get the next token, skipping comments (which are attached to the last token).
| |
NextToken(Boolean) |
Get the next token, optionally including comments.
| |
NextTokenSameLine |
Get the next token on the same line (including comments). Returns null if none.
| |
ParseCharLiteral | ||
ParseCodeBlockUntil |
Parse an embedded code block inside a documentation comment, starting with the current token, and parsing
up to the specified delimiter.
| |
ParseCodeExpressionUntil |
Parse an embedded code expression inside a documentation comment, starting with the current token, and parsing
up to the specified delimiter.
| |
ParseEmbeddedExpressionUntil |
Parse an embedded expression (such as inside an interpolated string), starting with the current token, and
parsing up to the specified delimiter(s).
| |
ParseInterpolatedString | ||
ParseInterpolatedVerbatimString | ||
ParseNextToken | ||
ParseString | ||
ParseVerbatimString | ||
PeekNextToken |
Peek ahead at the next unparsed token, skipping comments.
Peek-ahead tokens are saved in a special queue so they are still processed by NextToken().
Returns null on EOF or if a compiler directive ('#') is encountered.
| |
PeekNextTokenText |
Peek at the next token, and return the text (avoids a null ref check).
| |
PopNormalizationBlocker |
Pop the last normalization blocker object.
| |
PopUnusedList |
Restore the previous Unused list.
| |
ProcessToken |
Process the current token using the specified flags, returning a CodeObject if successful,
otherwise returns null and the unrecognized token is saved in the Unused list for later.
| |
ProcessTrailingComments | ||
PushNormalizationBlocker |
Push an object that will block EOL comment bubble-up normalization.
| |
PushUnusedList |
Push the current Unused list.
| |
RemoveLastUnused |
Remove the last object from the Unused list.
| |
RemoveLastUnusedExpression |
Remove the last object from the Unused list, converted to an Expression.
Does NOT remove tokens that aren't valid identifiers.
| |
RemoveLastUnusedExpression(Boolean) |
Remove the last object from the Unused list, converted to an Expression.
| |
RemoveLastUnusedToken |
Remove the last object from the Unused list, IF it's a Token.
| |
ResetPeekAhead |
Reset the peek ahead queue index.
| |
SaveAndNextToken |
Save the current token in the Unused list, and get the next one.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
TrackConditionalDirective |
Track multi-part compiler directives.
| |
TrackEndRegionDirective |
Track an EndRegionDirective, returning any related RegionDirective.
| |
TrackRegionDirective |
Track a RegionDirective.
| |
Unpeek |
Unpeek the specified number of tokens.
| |
UsingMoreTabsThanSpaces |
Returns true if more lines in the parsed file start with tabs than spaces.
|