Beispiel #1
0
        protected override bool Visit(ASTArrayType node)
        {
            if (!Visit(node.Child))
            {
                return(false);
            }

            var childType = node.Child.TypeInfo;

            if (!(childType is TypeType c) || c.Type.Equals(Cache.GetUnknown()))
            {
                Error(node.Position, "Can only construct and array type, for compile time known types.");
                return(true);
            }

            node.TypeInfo = Cache.GetType(Cache.GetArray(c.Type));
            return(true);
        }
Beispiel #2
0
 protected override bool Visit(ASTArrayType node)
 {
     throw new NotImplementedException();
 }
Beispiel #3
0
 protected abstract bool Visit(ASTArrayType node);