Class SyntaxTree
- Namespace
- ICSharpCode.Decompiler.CSharp.Syntax
- Assembly
- ICSharpCode.Decompiler.dll
public class SyntaxTree : AstNode, IAnnotatable, IFreezable, INode, ICloneable
- Inheritance
-
SyntaxTree
- Implements
- Inherited Members
- Extension Methods
Constructors
SyntaxTree()
public SyntaxTree()
Fields
MemberRole
public static readonly Role<AstNode> MemberRole
Field Value
Properties
ConditionalSymbols
Gets the conditional symbols used to parse the source file. Note that this list contains the conditional symbols at the start of the first token in the file - including the ones defined in the source file.
public IList<string> ConditionalSymbols { get; }
Property Value
FileName
Gets/Sets the file name of this syntax tree.
public string FileName { get; set; }
Property Value
Members
public AstNodeCollection<AstNode> Members { get; }
Property Value
NodeType
public override NodeType NodeType { get; }
Property Value
TopExpression
Gets the expression that was on top of the parse stack. This is the only way to get an expression that isn't part of a statment. (eg. when an error follows an expression).
This is used for code completion to 'get the expression before a token - like ., <, ('.
public AstNode TopExpression { get; }
Property Value
Methods
AcceptVisitor(IAstVisitor)
public override void AcceptVisitor(IAstVisitor visitor)
Parameters
visitor
IAstVisitor
AcceptVisitor<T>(IAstVisitor<T>)
public override T AcceptVisitor<T>(IAstVisitor<T> visitor)
Parameters
visitor
IAstVisitor<T>
Returns
- T
Type Parameters
T
AcceptVisitor<T, S>(IAstVisitor<T, S>, T)
public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
Parameters
visitor
IAstVisitor<T, S>data
T
Returns
- S
Type Parameters
T
S
DoMatch(AstNode, Match)
protected override bool DoMatch(AstNode other, Match match)
Parameters
Returns
GetTypes(bool)
Gets all defined types in this syntax tree.
public IEnumerable<EntityDeclaration> GetTypes(bool includeInnerTypes = false)
Parameters
includeInnerTypes
bool
Returns
- IEnumerable<EntityDeclaration>
A list containing TypeDeclaration or DelegateDeclaration nodes.