コード例 #1
0
        /// <summary>
        /// Generates the code for a VectorConstant node.
        /// </summary>
        /// <param name="vc">The VectorConstant node.</param>
        /// <returns>String containing C# code for VectorConstant vc.</returns>
        private string GenerateVectorConstant(VectorConstant vc)
        {
            string retstr = String.Empty;

            retstr += Generate(String.Format("new {0}(", vc.Type), vc);
            retstr += GenerateNode(vc, (SYMBOL) vc.kids.Pop());
            retstr += Generate(", ");
            retstr += GenerateNode(vc, (SYMBOL) vc.kids.Pop());
            retstr += Generate(", ");
            retstr += GenerateNode(vc, (SYMBOL) vc.kids.Pop());
            retstr += Generate(")");

            return retstr;
        }