Click or drag to resize

BaseTreeAdaptor Methods

The BaseTreeAdaptor type exposes the following members.

Methods
  NameDescription
Public methodAddChild
Add a child to the tree t. If child is a flat tree (a list), make all in list children of t. Warning: if t has no children, but child does and child isNil then you can decide it is ok to move children to t via t.children = child.children; i.e., without copying the array. Just make sure that this is consistent with have the user will build ASTs.
Public methodBecomeRoot(Object, Object)
If oldRoot is a nil root, just copy or move the children to newRoot. If not a nil root, make oldRoot a child of newRoot.
Public methodBecomeRoot(IToken, Object)
Public methodCreate(IToken)
Public methodCreate(Int32, IToken)
Public methodCreate(Int32, String)
Public methodCreate(IToken, String)
Public methodCreate(Int32, IToken, String)
Public methodCreateToken(IToken)
Tell me how to create a token for use with imaginary token nodes. For example, there is probably no input symbol associated with imaginary token DECL, but you need to create it as a payload or whatever for the DECL node as in ^(DECL type ID).
Public methodCreateToken(Int32, String)
Tell me how to create a token for use with imaginary token nodes. For example, there is probably no input symbol associated with imaginary token DECL, but you need to create it as a payload or whatever for the DECL node as in ^(DECL type ID).
Public methodDeleteChild
Public methodDupNode(Object)
Duplicate a node. This is part of the factory; override if you want another kind of node to be built.
Public methodDupNode(Int32, Object)
Public methodDupNode(Object, String)
Public methodDupNode(Int32, Object, String)
Public methodDupTree(Object)
Public methodDupTree(Object, Object)
This is generic in the sense that it will work with any kind of tree (not just ITree interface). It invokes the adaptor routines not the tree node routines to do the construction.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodErrorNode
Create tree node that holds the start and stop tokens associated with an error.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetChild
Public methodGetChildCount
Public methodGetChildIndex
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetParent
Public methodGetText
Public methodGetToken
Public methodGetTokenStartIndex
Public methodGetTokenStopIndex
Protected methodGetTree
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetType(Object)
Public methodGetUniqueID
Public methodIsNil
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNil
Public methodReplaceChildren
Public methodRulePostProcessing
Transform ^(nil x) to x and nil to null
Public methodSetChild
Public methodSetChildIndex
Public methodSetParent
Public methodSetText
Public methodSetTokenBoundaries
Track start/stop token for subtree root created for a rule. Only works with Tree nodes. For rules that match nothing, seems like this will yield start=i and stop=i-1 in a nil node. Might be useful info so I'll not force to be i..i.
Public methodSetType
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also