C# Class NArrange.CSharp.CSharpParser

NArrange CSharp parser implementation.
Inheritance: NArrange.Core.CodeParser
Afficher le fichier Open project: MarcStan/NArrange Class Usage Examples

Méthodes protégées

Méthode Description
DoParseElements ( ) : List

Parses elements from the current point in the stream.

Private Methods

Méthode Description
CaptureTypeName ( ) : string

Captures a type name alias from the stream.

CaptureTypeName ( bool captureGeneric ) : string

Captures a type name alias from the stream.

CaptureWord ( ) : string

Captures an alias or keyword from the stream.

CaptureWord ( bool captureGeneric ) : string

Captures an alias or keyword from the stream.

EatTrailingEndOfStatement ( ) : void

Eats a trailing end of statement.

GetAccess ( StringCollection wordList ) : CodeAccess

Gets the member or type access.

GetElementType ( StringCollection wordList, ElementType &elementType, TypeElementType &typeElementType ) : void

Gets the type of the element.

GetMemberAttributes ( StringCollection wordList ) : MemberModifiers

Gets a member modifiers flags enum from the modifer word list.

GetMemberNameAndType ( StringCollection words, string &name, string &returnType ) : void

Extracts a member name.

GetOperatorType ( StringCollection wordList ) : OperatorType

Gets the operator type from the modifier list.

IsAliasBreak ( char ch ) : bool

Determines whether or not the specified char is a C# special character that signals a break in an alias.

ParseAliasList ( bool canBeInOrOutModified = false ) : string[]

Parses an alias list, such as for parameters.

ParseAttribute ( ReadOnlyCollection comments ) : AttributeElement

Parses an attribute.

ParseAttribute ( ReadOnlyCollection comments, bool nested ) : AttributeElement

Parses an attribute.

ParseBlock ( bool beginExpected, CommentedElement parentElement ) : string

Parses a member block.

ParseCommentBlock ( ) : CommentElement

Parses a comment block.

ParseCommentLine ( ) : CommentElement

Parses a comment line.

ParseComments ( ) : ReadOnlyCollection

Parses comments from the current position in the reader.

ParseConditionDirective ( string line, bool &isIf ) : ConditionDirectiveElement

Parses a condition directive.

ParseConstructor ( string memberName, CodeAccess access, MemberModifiers memberAttributes ) : ConstructorElement

Parses a constructor.

ParseDelegate ( string memberName, CodeAccess access, MemberModifiers memberAttributes, string returnType ) : DelegateElement

Parses a delegate.

ParseElements ( ICodeElement parentElement ) : List

Parses a collection of elements.

ParseEvent ( CodeAccess access, MemberModifiers memberAttributes ) : EventElement

Parses an event.

ParseField ( bool isAssignment, CodeAccess access, MemberModifiers memberAttributes, string memberName, string returnType, bool isVolatile, bool isFixed ) : FieldElement

Parses a field.

ParseInitialValue ( ) : string

Parses an initial value, such as for a field.

ParseMethod ( string memberName, CodeAccess access, MemberModifiers memberAttributes, string returnType, bool isOperator, OperatorType operatorType ) : MethodElement

Parses a method.

ParseNamespace ( ) : NamespaceElement

Parses a namespace definition.

ParseNestedText ( char beginChar, char endChar, bool beginExpected, bool trim, int initialDepth = 1, bool countBeginCharOnlyOnce = false ) : string

Parses nested text.

ParseOptionalExpression ( char assignmentSymbols ) : string

C# 6.0 feature. Will parse one statement after the expected assignmentSymbols

ParseParameters ( ) : string

Parses a parameter list.

ParseProperty ( string memberName, string returnType, CodeAccess access, MemberModifiers memberAttributes, bool isExpressionBodyProperty ) : PropertyElement

Parses a property.

ParseRegion ( string line ) : RegionElement

Parses a region from the preprocessor line.

ParseType ( CodeAccess access, TypeModifiers typeAttributes, TypeElementType elementType ) : TypeElement

Parses a type definition.

ParseTypeParameterConstraints ( IGenericElement genericElement ) : void

Parses type parameter constraints and adds them to the generic element.

ParseUsing ( ) : UsingElement

Parses a using directive code element.

PushComments ( List codeElements, List comments ) : void

Pushes the comments to the code elements collection.

TrimTrailingWhiteSpace ( StringBuilder elementBuilder ) : void

Trims the trailing white space.

TryFindAndRemoveWord ( StringCollection wordList, string word ) : bool

Tries to find and remove a word from the word list.

TryParseElement ( ICodeElement parentElement, StringBuilder elementBuilder, ReadOnlyCollection comments, ReadOnlyCollection attributes ) : ICodeElement

Tries to parse a code element.

Method Details

DoParseElements() protected méthode

Parses elements from the current point in the stream.
protected DoParseElements ( ) : List
Résultat List