public override ImperativeNode ToFunctionCall()
            {
                var keys = new ExprListNode
                {
                    Exprs = this.keys
                };

                var values = new ExprListNode
                {
                    Exprs = this.values
                };

                var f = new IdentifierListNode
                {
                    LeftNode  = new IdentifierNode(DictionaryTypeName),
                    Optr      = Operator.dot,
                    RightNode = new FunctionCallNode
                    {
                        Function        = new IdentifierNode(DictionaryByKeysValuesName),
                        FormalArguments = new List <ImperativeNode> {
                            keys, values
                        }
                    }
                };

                f.col     = this.col;
                f.line    = this.line;
                f.endCol  = this.endCol;
                f.endLine = this.endLine;

                return(f);
            }
Exemple #2
0
 public ImperativeNode BuildIdentList(ImperativeNode leftNode, ImperativeNode rightNode)
 {
     var identList = new IdentifierListNode();
     identList.LeftNode = leftNode;
     identList.RightNode = rightNode;
     identList.Optr = ProtoCore.DSASM.Operator.dot;
     return identList;
 }
Exemple #3
0
 public IdentifierListNode(IdentifierListNode rhs) : base(rhs)
 {
     Optr      = rhs.Optr;
     LeftNode  = ProtoCore.Utils.NodeUtils.Clone(rhs.LeftNode);
     RightNode = ProtoCore.Utils.NodeUtils.Clone(rhs.RightNode);
 }
Exemple #4
0
 public IdentifierListNode(IdentifierListNode rhs)
     : base(rhs)
 {
     Optr = rhs.Optr;
     LeftNode = ProtoCore.Utils.NodeUtils.Clone(rhs.LeftNode);
     RightNode = ProtoCore.Utils.NodeUtils.Clone(rhs.RightNode);
 }
 public override ImperativeNode VisitIdentifierListNode(IdentifierListNode node)
 {
     node.LeftNode = node.LeftNode.Accept(this);
     return node;
 }