Ejemplo n.º 1
0
        public Func <NamedDataType, NamedDataType> VisitArray(ArrayDeclarator array)
        {
            var fn = array.Declarator.Accept(this);

            return((nt) =>
            {
                nt = new NamedDataType
                {
                    Name = nt.Name,
                    DataType = new ArrayType_v1
                    {
                        ElementType = nt.DataType,
                        Length = array.Size != null
                            ? Convert.ToInt32(array.Size.Accept(eval))
                            : 0
                    }
                };
                return fn(nt);
            });
        }
Ejemplo n.º 2
0
 public string VisitArray(ArrayDeclarator array)
 {
     return(array.Declarator.Accept(this));
 }