C# Class NVelocity.Runtime.Parser.ParserState

Show file Open project: rasmus-toftdahl-olesen/NVelocity

Private Properties

Property Type Description
ClearNodeScope void
CloseNodeScope void
CloseNodeScope void
NodeArity int
NodeCreated bool
OpenNodeScope void
ParserState System.Collections.Generic
PeekNode INode
PopNode INode
PushNode void
Reset void

Private Methods

Method Description
ClearNodeScope ( INode n ) : void
CloseNodeScope ( INode n, bool condition ) : void

A conditional node is constructed if its condition is true. All the nodes that have been pushed since the node was opened are made children of the the conditional node, which is then pushed on to the stack. If the condition is false the node is not constructed and they are left on the stack.

CloseNodeScope ( INode parentNode, int num ) : void

A definite node is constructed from a specified number of children. That number of nodes are popped from the stack and made the children of the definite node. Then the definite node is pushed on to the stack.

NodeArity ( ) : int

Returns the number of children on the stack in the current node scope.

NodeCreated ( ) : bool

Determines whether the current node was actually closed and pushed. This should only be called in the final user action of a node scope.

OpenNodeScope ( INode node ) : void
ParserState ( ) : System.Collections.Generic
PeekNode ( ) : INode

Returns the node currently on the top of the stack.

PopNode ( ) : INode

Returns the node on the top of the stack, and remove it from the stack.

PushNode ( INode n ) : void

Pushes a node on to the stack.

Reset ( ) : void

Call this to reinitialize the node stack. It is called automatically by the parser's ReInit() method.