Class TParseTreeNode
- Namespace
- gudusoft.gsqlparser.nodes
- Assembly
- gudusoft.gsqlparser.dll
This class is the root class for all parse tree nodes.
Check NodeType for type of this node.
This node includes all tokens from startToken and endToken
public abstract class TParseTreeNode : Visitable
- Inheritance
-
TParseTreeNode
- Implements
- Derived
- Inherited Members
Constructors
TParseTreeNode()
public TParseTreeNode()
TParseTreeNode(EDbVendor)
public TParseTreeNode(EDbVendor dbvendor)
Parameters
dbvendorEDbVendor
Fields
_stringValue
protected string _stringValue
Field Value
dbvendor
SQL dialect of this node.
public EDbVendor dbvendor
Field Value
Properties
ColumnNo
public virtual long ColumnNo { get; }
Property Value
DummyTag
public virtual int DummyTag { get; set; }
Property Value
Gsqlparser
public virtual TGSqlParser Gsqlparser { get; set; }
Property Value
IncludingComment
public virtual bool IncludingComment { set; }
Property Value
LineNo
public virtual long LineNo { get; }
Property Value
NodeType
Set the node type for this node.
public virtual int NodeType { get; set; }
Property Value
SourceTokenList
public TSourceTokenList SourceTokenList { get; set; }
Property Value
String
String representation of this node. this String value is the same as ToString(bool) after node generated by parser. If string value is set manually later, then this value is different from ToString(bool).
public virtual string String { get; set; }
Property Value
endToken
the line number of the first character for current token.
public TSourceToken endToken { get; set; }
Property Value
startToken
public TSourceToken startToken { get; set; }
Property Value
Methods
IsIncludingOriginalTokens()
Return true when this node is built by parser.
public bool IsIncludingOriginalTokens()
Returns
IsUnderlyingTokenChanged()
Check whether tokens consist this node and it's sub-node had been modified.
public bool IsUnderlyingTokenChanged()
Returns
ToScript()
Text string of this node, return value is the same as {@link #toString()} if this node is not modified after created by parser. If this node was modified, then use this method to return string representation instead of {@link #toString()}
public string ToScript()
Returns
ToString()
String representation of parse tree node including sub parse tree node. This string was generated by collecting text from the start token of this node to the end token of this node. If this node was modified later, then use toScript() to return string representation instead.
public override string ToString()
Returns
- string
string representation of parse tree node including sub parse tree node.
ToString(bool)
public string ToString(bool isModified)
Parameters
isModifiedbool
Returns
accept(TParseTreeVisitor)
public virtual void accept(TParseTreeVisitor v)
Parameters
acceptChildren(TParseTreeVisitor)
public virtual void acceptChildren(TParseTreeVisitor v)
Parameters
addAllMyTokensToTokenList(TSourceTokenList, int)
Inserts tokens(from start token to end token ) of this parse tree node at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right .
public virtual int addAllMyTokensToTokenList(TSourceTokenList targetList, int index)
Parameters
targetListTSourceTokenListindexint
Returns
doParse(TCustomSqlStatement, ESqlClause)
analyze this node
public virtual void doParse(TCustomSqlStatement psql, ESqlClause plocation)
Parameters
psqlTCustomSqlStatementplocationESqlClause
getEndToken()
public virtual TSourceToken getEndToken()
Returns
- TSourceToken
the last token in this node
getStartToken()
public virtual TSourceToken getStartToken()
Returns
init(object)
Initialize a query tree node.
public virtual void init(object arg1)
Parameters
arg1object
init(object, object)
public virtual void init(object arg1, object arg2)
Parameters
init(object, object, object)
public virtual void init(object arg1, object arg2, object arg3)
Parameters
init(object, object, object, object)
public virtual void init(object arg1, object arg2, object arg3, object arg4)
Parameters
init(object, object, object, object, object)
public virtual void init(object arg1, object arg2, object arg3, object arg4, object arg5)
Parameters
init(object, object, object, object, object, object)
public virtual void init(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6)
Parameters
setChanged()
Tell the node that it had been modified.
public void setChanged()
setEndToken(TSourceToken)
public virtual void setEndToken(TSourceToken endToken)
Parameters
endTokenTSourceToken
setEndToken(TParseTreeNode)
public virtual void setEndToken(TParseTreeNode endNode)
Parameters
endNodeTParseTreeNode
setEndToken<T>(List<T>)
public virtual void setEndToken<T>(List<T> pList)
Parameters
pListList<T>
Type Parameters
T
setStartToken(TSourceToken)
public virtual void setStartToken(TSourceToken startToken)
Parameters
startTokenTSourceToken
setStartToken(TParseTreeNode)
public virtual void setStartToken(TParseTreeNode startNode)
Parameters
startNodeTParseTreeNode
setStartToken<T>(List<T>)
public virtual void setStartToken<T>(List<T> pList)
Parameters
pListList<T>
Type Parameters
T