Class SyntaxTreeNode
Baseic syntax tree node
Inheritance
System.Object
SyntaxTreeNode
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: SqlDotNet.Compiler
Assembly: SqlDotNet.dll
Syntax
public abstract class SyntaxTreeNode
Constructors
| Improve this Doc View SourceSyntaxTreeNode(SyntaxTreeNode, SyntaxNodeType, RawToken)
Create SyntaxTreeNode
Declaration
public SyntaxTreeNode(SyntaxTreeNode parentNode, SyntaxNodeType nodeType, RawToken token)
Parameters
Type | Name | Description |
---|---|---|
SyntaxTreeNode | parentNode | Parent-Node |
SyntaxNodeType | nodeType | SyntaxTreeNode-Type |
RawToken | token | Raw token |
Properties
| Improve this Doc View SourceChildren
Contains all syntax children of this node
Declaration
public Queue<SyntaxTreeNode> Children { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Queue<SyntaxTreeNode> |
DebugText
Get debug text
Declaration
public abstract string DebugText { get; }
Property Value
Type | Description |
---|---|
System.String |
NodeType
Type of the current tree-node
Declaration
public SyntaxNodeType NodeType { get; }
Property Value
Type | Description |
---|---|
SyntaxNodeType |
ParentNode
Parent of this Node
Declaration
public SyntaxTreeNode ParentNode { get; set; }
Property Value
Type | Description |
---|---|
SyntaxTreeNode |
Token
Token
Declaration
public RawToken Token { get; }
Property Value
Type | Description |
---|---|
RawToken |
Methods
| Improve this Doc View SourceCheckSemantic()
Proof node semantic
Declaration
public abstract void CheckSemantic()
CreateChildNode<T>(RawToken)
Create new child-node
Declaration
public T CreateChildNode<T>(RawToken token)
where T : SyntaxTreeNode
Parameters
Type | Name | Description |
---|---|---|
RawToken | token |
Returns
Type | Description |
---|---|
T | Instance of an SyntaxTreeNode |
Type Parameters
Name | Description |
---|---|
T | Generic Node-Type |
CreateChildNode<T>(RawToken, SymbolTable)
Create new child-node, and pass symbol table
Declaration
public T CreateChildNode<T>(RawToken token, SymbolTable table)
where T : SyntaxTreeNode
Parameters
Type | Name | Description |
---|---|---|
RawToken | token | |
SymbolTable | table |
Returns
Type | Description |
---|---|
T | Instance of an SyntaxTreeNode |
Type Parameters
Name | Description |
---|---|
T | Generic Node-Type |
FindChildrenBesidesOfType<T>()
Get all childres which are NOT of a specifig type
Declaration
public IList<SyntaxTreeNode> FindChildrenBesidesOfType<T>()
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<SyntaxTreeNode> | List with all children |
Type Parameters
Name | Description |
---|---|
T | Type |
FindChildrenOfType(SyntaxNodeType)
Get al children of specific TreeNodeType
Declaration
public IList<SyntaxTreeNode> FindChildrenOfType(SyntaxNodeType nodeType)
Parameters
Type | Name | Description |
---|---|---|
SyntaxNodeType | nodeType | Node-Type |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<SyntaxTreeNode> | List with all children |
FindChildrenOfType<T>()
Get all children of a specific type
Declaration
public IList<T> FindChildrenOfType<T>()
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<T> | List with all children |
Type Parameters
Name | Description |
---|---|
T | Type |
FindFirstOrDefaultByPath<P1, P2>()
Find by path
Declaration
public P2 FindFirstOrDefaultByPath<P1, P2>()
where P1 : SyntaxTreeNode where P2 : SyntaxTreeNode
Returns
Type | Description |
---|---|
P2 |
Type Parameters
Name | Description |
---|---|
P1 | |
P2 |
FindFirstOrDefaultByPath<P1, P2, P3>()
Find by path
Declaration
public P3 FindFirstOrDefaultByPath<P1, P2, P3>()
where P1 : SyntaxTreeNode where P2 : SyntaxTreeNode where P3 : SyntaxTreeNode
Returns
Type | Description |
---|---|
P3 |
Type Parameters
Name | Description |
---|---|
P1 | |
P2 | |
P3 |
FindFirstOrDefaultByPath<P1, P2, P3, P4>()
Find by path
Declaration
public P4 FindFirstOrDefaultByPath<P1, P2, P3, P4>()
where P1 : SyntaxTreeNode where P2 : SyntaxTreeNode where P3 : SyntaxTreeNode where P4 : SyntaxTreeNode
Returns
Type | Description |
---|---|
P4 |
Type Parameters
Name | Description |
---|---|
P1 | |
P2 | |
P3 | |
P4 |
FindFirstOrDefaultByPath<P1, P2, P3, P4, P5>()
Find by path
Declaration
public P5 FindFirstOrDefaultByPath<P1, P2, P3, P4, P5>()
where P1 : SyntaxTreeNode where P2 : SyntaxTreeNode where P3 : SyntaxTreeNode where P4 : SyntaxTreeNode where P5 : SyntaxTreeNode
Returns
Type | Description |
---|---|
P5 |
Type Parameters
Name | Description |
---|---|
P1 | |
P2 | |
P3 | |
P4 | |
P5 |
FindFirstOrDefaultChildrenOfType<T>()
Get the first child or null
Declaration
public T FindFirstOrDefaultChildrenOfType<T>()
Returns
Type | Description |
---|---|
T | First child or null |
Type Parameters
Name | Description |
---|---|
T | Type |