C# Class StyleCop.CSharp.CodeLexer

Breaks the components of a C# code file down into individual symbols.
Mostra file Open project: Visual-Stylecop/Visual-StyleCop Class Usage Examples

Private Properties

Property Type Description
AdvanceToEndOfLine void
CheckForConditionalCompilationDirective void
CodeLexer System
CodeLocationFromMarker CodeLocation
CreateAndMovePastSymbol StyleCop.CSharp.Symbol
DecodeEscapedText string
EvaluateConditionalDirectiveExpression bool
FindNextEndOfLine int
GetComment StyleCop.CSharp.Symbol
GetDecimalFraction int
GetDecimalLiteral int
GetDefinePreprocessorDirective void
GetHexidecimalIntegerLiteral int
GetIntegerTypeSuffix int
GetLiteral StyleCop.CSharp.Symbol
GetLiteralKeyword StyleCop.CSharp.Symbol
GetLiteralString StyleCop.CSharp.Symbol
GetMultiLineComment StyleCop.CSharp.Symbol
GetNewLine StyleCop.CSharp.Symbol
GetNumber StyleCop.CSharp.Symbol
GetOperatorSymbol StyleCop.CSharp.Symbol
GetOtherSymbol StyleCop.CSharp.Symbol
GetOtherSymbolType SymbolType
GetPositiveNumber int
GetPreprocessorDirectiveSymbol StyleCop.CSharp.Symbol
GetRealLiteralExponent int
GetRealLiteralTrailingCharacters int
GetSingleLineComment StyleCop.CSharp.Symbol
GetString StyleCop.CSharp.Symbol
GetSymbol StyleCop.CSharp.Symbol
GetSymbols List
GetUndefinePreprocessorDirective void
GetWhitespace StyleCop.CSharp.Symbol
GetXmlHeaderLine StyleCop.CSharp.Symbol
IsEndOfString int
IsHexadecimalChar bool
IsLetterEncoded bool
IsLetterExtended bool
ReadToEndOfOtherSymbol void
SetEvaluatingSymbolsForIfElifElse void

Private Methods

Method Description
AdvanceToEndOfLine ( StringBuilder text ) : void

Advances to the next end of line character and adds all characters to the given text buffer.

CheckForConditionalCompilationDirective ( List symbols, SourceCode sourceCode, StyleCop.CSharp.Symbol preprocessorSymbol, Configuration configuration ) : void

Checks the given preprocessor symbol to determine whether it is a conditional preprocessor directive. If so, determines whether we should skip past code which is out of scope.

CodeLexer ( StyleCop.CSharp.CsParser parser, SourceCode source, CodeReader codeReader ) : System

Initializes a new instance of the CodeLexer class.

CodeLocationFromMarker ( MarkerData marker ) : CodeLocation

Creates a CodeLocation from the given marker.

CreateAndMovePastSymbol ( string text, SymbolType type ) : StyleCop.CSharp.Symbol

Reads, creates, and moves past a symbol.

DecodeEscapedText ( string text, bool allowRemoveAt ) : string

Decodes escaping characters in specified text.

EvaluateConditionalDirectiveExpression ( SourceCode sourceCode, Expression expression, Configuration configuration ) : bool

Evaluates an expression from within a conditional compilation directive to determine whether it resolves to true or false.

FindNextEndOfLine ( ) : int

Finds the offset index of the next end-of-line character.

GetComment ( ) : StyleCop.CSharp.Symbol

Gets the next comment.

GetDecimalFraction ( int index ) : int

Gets the decimal digits that appear after a decimal point in a real literal.

GetDecimalLiteral ( int index ) : int

Extracts a decimal integer literal from the code.

GetDefinePreprocessorDirective ( SourceCode sourceCode, StyleCop.CSharp.Symbol preprocessorSymbol, int startIndex ) : void

Gets a define preprocessor directive from the code.

GetHexidecimalIntegerLiteral ( int index ) : int

Extracts a hexidecimal integer literal from the code.

GetIntegerTypeSuffix ( int index ) : int

Gets the type suffix tacked onto the end of an integer literal.

GetLiteral ( ) : StyleCop.CSharp.Symbol

Gets the next literal from the code.

GetLiteralKeyword ( StringBuilder text ) : StyleCop.CSharp.Symbol

Gets the next literal keyword token from the code.

GetLiteralString ( StringBuilder text ) : StyleCop.CSharp.Symbol

Gets the next literal string from the code.

GetMultiLineComment ( StringBuilder text ) : StyleCop.CSharp.Symbol

Gets the next multi-line comment.

GetNewLine ( ) : StyleCop.CSharp.Symbol
GetNumber ( ) : StyleCop.CSharp.Symbol

Gets the next number.

GetOperatorSymbol ( char character ) : StyleCop.CSharp.Symbol
GetOtherSymbol ( SourceCode sourceCode ) : StyleCop.CSharp.Symbol

Gets an unknown symbol type.

GetOtherSymbolType ( string text ) : SymbolType
GetPositiveNumber ( int index ) : int

Extracts the body of a positive number from the code.

GetPreprocessorDirectiveSymbol ( List symbols, SourceCode sourceCode, Configuration configuration ) : StyleCop.CSharp.Symbol

Gets the next preprocessor directive keyword.

GetRealLiteralExponent ( int index ) : int

Gets an exponent at the end of a real literal number.

GetRealLiteralTrailingCharacters ( int index, bool requiresDecimalPoint ) : int

Gets the characters trailing behind a real literal number, if there are any.

GetSingleLineComment ( StringBuilder text ) : StyleCop.CSharp.Symbol

Gets the next single line comment from the code.

GetString ( ) : StyleCop.CSharp.Symbol

Gets the next string from the code.

GetSymbol ( List symbols, SourceCode sourceCode, Configuration configuration ) : StyleCop.CSharp.Symbol
GetSymbols ( SourceCode sourceCode, Configuration configuration ) : List

Gets the list of symbols from the code file.

GetUndefinePreprocessorDirective ( SourceCode sourceCode, StyleCop.CSharp.Symbol preprocessorSymbol, int startIndex ) : void

Gets an undefine preprocessor directive from the code.

GetWhitespace ( ) : StyleCop.CSharp.Symbol

Gets the next whitespace stream.

GetXmlHeaderLine ( StringBuilder text ) : StyleCop.CSharp.Symbol

Gets the next Xml header line from the code.

IsEndOfString ( int startSearchIndex ) : int

Determines whether [is end of string].

IsHexadecimalChar ( char character ) : bool

Indicates whether specified character can be used as hexadecimal digit.

IsLetterEncoded ( char sequence, char &character ) : bool

Indicates whether specified character sequence represents encoded character value.

IsLetterExtended ( char character ) : bool

Indicates whether the character is considered a letter for the purposes of keywords and type names.

ReadToEndOfOtherSymbol ( StringBuilder text ) : void

Gathers all the characters up to the last index of an unknown word.

SetEvaluatingSymbolsForIfElifElse ( SourceCode sourceCode, StyleCop.CSharp.Symbol preprocessorSymbol, Configuration configuration, int startIndex, string type ) : void

Extracts an if, endif, or else directive.