// this is where data is initially passed to the item
 public override void Init(AstContext context, ParseTreeNode treeNode)
 {
     string sVal = treeNode.FindTokenAndGetText();
     base.Init(context, treeNode);
     var nodes = treeNode.GetMappedChildNodes();
     var functionOrProperty = AddChild("FunctionOrId", nodes[0]);
     if (functionOrProperty is SelectFunctionNode)
     {
         _TheFunction = (SelectFunctionNode)functionOrProperty;
     }
     else if (functionOrProperty is SelectPropertyNode)
     {
         _PropNode = (SelectPropertyNode)functionOrProperty;
     }
     else
     {
         throw new Exception("Unmanaged type in selectmemberaccessnode");
     }
     if (nodes.Count > 1)
     {
         var child = AddChild("Queue", nodes[1]);
         string sval = nodes[1].FindTokenAndGetText();
         if (child is LeftObjectNode)
         {
             _queue = (LeftObjectNode)child;
         }
     }
 }
        // this is where data is initially passed to the item
        public override void Init(AstContext context, ParseTreeNode treeNode)
        {
            string sVal = treeNode.FindTokenAndGetText();

            base.Init(context, treeNode);
            var nodes = treeNode.GetMappedChildNodes();
            property = treeNode;

            if (nodes.Count > 1)
            {
                var child = AddChild("Queue", nodes[1]);
                string sval = nodes[1].FindTokenAndGetText();
                if (child is LeftObjectNode)
                {
                    _queue = (LeftObjectNode)child;
                }
            }
        }
Example #3
0
        // this is where data is initially passed to the item
        public override void Init(AstContext context, ParseTreeNode treeNode)
        {
            base.Init(context, treeNode);
            var nodes = treeNode.GetMappedChildNodes();

            if (nodes.Count > 0)
            {
                if (nodes[0].AstNode != null)
                {
                    _root = (AstNode)nodes[0].AstNode;
                    AddChild("Root", nodes[0]);
                }

                if (nodes.Count > 1)
                {
                    _Queue = (LeftObjectNode)nodes[1].AstNode;
                    AddChild("Queue", nodes[1]);
                }
            }
        }