public virtual AstNode Visit(MakeReference node) { throw new System.NotImplementedException(); }
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; }
public virtual AstNode Visit(MakeReference node) { throw new System.NotImplementedException(); }