public dynamic Visit(GetArrayExpr expr)
        {
            var symbol    = expr.Namespace.Symbols.SingleOrDefault(x => x.Name == expr.Name);
            var val       = ((ContextualOperand)symbol.CodeGenField)[Visit((dynamic)expr.Index)] as ContextualOperand;
            var converted = val.Cast(expr.ValuesType.CodeGenType());

            return(converted);
        }
Exemplo n.º 2
0
        public dynamic Visit(GetArrayExpr expr)
        {
            var node = new TreeNode("Get array value")
            {
                Tag = expr.Node
            };

            node.Nodes.Add(new TreeNode($"Name: {expr.Name}"));
            node.Nodes.Add(new TreeNode($"Keys {expr.KeysType}"));
            node.Nodes.Add(new TreeNode($"Values {expr.ValuesType}"));
            node.Nodes.Add(new TreeNode("Index")
            {
                Nodes = { Visit(expr.Index) }
            });
            return(node);
        }
 public dynamic Visit(GetArrayExpr expr)
 {
     Visit((ExpressionBase)expr);
     Visit((dynamic)expr.Index);
     return(null);
 }
 public dynamic Visit(GetArrayExpr expr)
 {
     return(expr.ValuesType);
 }
 public dynamic Visit(GetArrayExpr expr)
 {
     return(expr);
 }