Click or drag to resize

Parser Methods

The Parser type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddCompilerDirectiveParsePoint
Add a parse-point for a compiler directive - triggers the callback when the specified token appears after the '#'.
Public methodStatic memberAddDocCommentParseTag
Add a documentation comment tag for callback during parsing.
Public methodStatic memberAddOperatorParsePoint(String, Int32, Boolean, Boolean, ParserParseDelegate)
Add a parse-point to the parser for an operator - the callback is triggered when the token is found.
Public methodStatic memberAddOperatorParsePoint(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.
Public methodStatic memberAddParsePoint(String, ParserParseDelegate)
Add a parse-point to the parser - the callback is triggered when the token is found.
Public methodStatic memberAddParsePoint(String, ParserParseDelegate, Type)
Add a parse-point to the parser - the callback is triggered when the token appears in the specified context.
Public methodStatic memberAddParsePoint(String, Int32, ParserParseDelegate)
Add a parse-point to the parser - the callback is triggered when the token is found.
Public methodStatic memberAddParsePoint(String, Int32, ParserParseDelegate, Type)
Add a parse-point to the parser - the callback is triggered when the token appears in the specified context.
Public methodAddUnused(CodeObject)
Add a code object that was just parsed but not yet needed to the unused list.
Public methodAddUnused(Token)
Add a token that was just parsed but not yet needed to the unused list.
Public methodAttachMessage
Create a parser error message in connection with the specified Token and attach it to the related CodeObject.
Protected methodCheckForUnusedTypeRef
Check that there appears to be an unused identifier, TypeRef, or UnresolvedRef at the specified offset.
Public methodCurrentTokenIndentedLessThan
Determine if the current token is indented less than the specified starting token.
Public methodDispose
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetCurrentLine
Get the current line of text including the EOL character.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetIdentifier
Get the current token if it's an identifier, otherwise return null; also, advance to the next token.
Public methodGetIdentifierText
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.
Public methodGetLastPeekedTokenText
Get the previously peeked token text at the specified index (-1 is the last peeked token, -2 the one before that, etc).
Protected methodGetLastUnusedNonDirective
Get the last parsed object in the Unused list (Token or UnusedCodeObject), skipping over any compiler directives if a non-compiler directive exists.
Public methodGetNormalizationBlocker
Get the current normalization blocker object.
Public methodGetOperatorInfoForToken
Get the OperatorInfo structure for the current token.
Public methodGetToDelimiter
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.
Public methodGetTokenToEOL
Parse from the current token up to (but not including) the EOL, returning that as a string, and advancing to the next token.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUnused
Get the object in the Unused list at the specified index.
Public methodGetUnusedCodeObject
Get the object in the Unused list at the specified index as a CodeObject.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodStatic memberMergeTokens
Merge the specified 2nd token into the first one.
Public methodMoveCommentsToPostUnused
Move any non-EOL comments we just passed to the Post unused list.
Public methodMoveCommentsToUnused
Move any non-EOL comments we just passed to the unused list.
Public methodMovePostUnusedToUnused
Move the current post-unused list to the unused list.
Public methodMoveUnusedToPostUnused
Move the current unused list to the post-unused list.
Protected methodNextChar
Public methodNextToken
Get the next token, skipping comments (which are attached to the last token).
Public methodNextToken(Boolean)
Get the next token, optionally including comments.
Public methodNextTokenSameLine
Get the next token on the same line (including comments). Returns null if none.
Protected methodParseCharLiteral
Public methodParseCodeBlockUntil
Parse an embedded code block inside a documentation comment, starting with the current token, and parsing up to the specified delimiter.
Public methodParseCodeExpressionUntil
Parse an embedded code expression inside a documentation comment, starting with the current token, and parsing up to the specified delimiter.
Public methodParseEmbeddedExpressionUntil
Parse an embedded expression (such as inside an interpolated string), starting with the current token, and parsing up to the specified delimiter(s).
Protected methodParseInterpolatedString
Protected methodParseInterpolatedVerbatimString
Protected methodParseNextToken
Protected methodParseString
Protected methodParseVerbatimString
Public methodPeekNextToken
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.
Public methodPeekNextTokenText
Peek at the next token, and return the text (avoids a null ref check).
Public methodPopNormalizationBlocker
Pop the last normalization blocker object.
Public methodPopUnusedList
Restore the previous Unused list.
Public methodProcessToken
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.
Protected methodProcessTrailingComments
Public methodPushNormalizationBlocker
Push an object that will block EOL comment bubble-up normalization.
Public methodPushUnusedList
Push the current Unused list.
Public methodRemoveLastUnused
Remove the last object from the Unused list.
Public methodRemoveLastUnusedExpression
Remove the last object from the Unused list, converted to an Expression. Does NOT remove tokens that aren't valid identifiers.
Public methodRemoveLastUnusedExpression(Boolean)
Remove the last object from the Unused list, converted to an Expression.
Public methodRemoveLastUnusedToken
Remove the last object from the Unused list, IF it's a Token.
Public methodResetPeekAhead
Reset the peek ahead queue index.
Public methodSaveAndNextToken
Save the current token in the Unused list, and get the next one.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTrackConditionalDirective
Track multi-part compiler directives.
Public methodTrackEndRegionDirective
Track an EndRegionDirective, returning any related RegionDirective.
Public methodTrackRegionDirective
Track a RegionDirective.
Public methodUnpeek
Unpeek the specified number of tokens.
Public methodUsingMoreTabsThanSpaces
Returns true if more lines in the parsed file start with tabs than spaces.
Top
See Also