Example #1
0
 public virtual AstNode Visit(MakeReference node)
 {
     throw new System.NotImplementedException();
 }
Example #2
0
        public override AstNode Visit(MakeReference node)
        {
            // Get the referenced expression.
            Expression referenced = node.GetReferencedType();
            referenced.SetHints(Expression.TypeHint);

            // Visit the referenced type.
            referenced.Accept(this);

            // Get the pointer type.
            IChelaType referencedType = referenced.GetNodeType();
            if(!referencedType.IsMetaType())
                Error(node, "expected type expression.");

            // Get the actual pointed type.
            referencedType = ExtractActualType(node, referencedType);

            // Handle incomplete types.
            if(referencedType.IsIncompleteType())
            {
                node.SetNodeType(referenced.GetNodeType());
                return node;
            }

            // Create the reference meta type.
            IChelaType referenceType = MetaType.Create(ReferenceType.Create(referencedType, node.GetFlow(), node.IsStreamReference()));

            // Set the node type.
            node.SetNodeType(referenceType);

            return node;
        }
Example #3
0
 public virtual AstNode Visit(MakeReference node)
 {
     throw new System.NotImplementedException();
 }