コード例 #1
0
ファイル: ArmadaExpr.cs プロジェクト: ScriptBox21/MS-Armada
 public override Expression GetStoreBufferLocationInfo(ref List <Expression> fields)
 {
     if (parent.NoTSO())
     {
         return(null);
     }
     if (parent is GlobalsArmadaLValue)
     {
         return(AH.MakeNameSegment($"Armada_GlobalStaticVar_{fieldName}", "Armada_GlobalStaticVar"));
     }
     else if (!(parent.Type is UserDefinedType))
     {
         return(null);
     }
     else
     {
         var ut  = (UserDefinedType)parent.Type;
         var ret = parent.GetStoreBufferLocationInfo(ref fields);
         if (ret == null)
         {
             return(null);
         }
         var struct_field_type = AH.MakeNameSegment($"Armada_FieldType_{ut.Name}'{fieldName}", "Armada_FieldType");
         var field             = AH.MakeApply1("Armada_FieldStruct", struct_field_type, "Armada_Field");
         fields.Add(field);
         return(ret);
     }
 }
コード例 #2
0
 public override string GetStoreBufferLocationInfo(ref List <string> fields)
 {
     if (parent.NoTSO())
     {
         return(null);
     }
     if (parent is GlobalsArmadaLValue)
     {
         return($"Armada_GlobalStaticVar_{fieldName}");
     }
     else if (!(parent.Type is UserDefinedType))
     {
         return(null);
     }
     else
     {
         var ut  = (UserDefinedType)parent.Type;
         var ret = parent.GetStoreBufferLocationInfo(ref fields);
         if (ret == null)
         {
             return(null);
         }
         fields.Add($"{fieldPos}");
         return(ret);
     }
 }
コード例 #3
0
        public override string GetStoreBufferLocationInfo(ref List <string> fields)
        {
            if (parent.NoTSO())
            {
                return(null);
            }

            var ret = parent.GetStoreBufferLocationInfo(ref fields);

            if (ret == null)
            {
                return(null);
            }

            fields.Add(index);
            return(ret);
        }
コード例 #4
0
ファイル: ArmadaExpr.cs プロジェクト: ScriptBox21/MS-Armada
        public override Expression GetStoreBufferLocationInfo(ref List <Expression> fields)
        {
            if (parent.NoTSO())
            {
                return(null);
            }

            var ret = parent.GetStoreBufferLocationInfo(ref fields);

            if (ret == null)
            {
                return(null);
            }

            var field = AH.MakeApply1("Armada_FieldArrayIndex", index, "Armada_Field");

            fields.Add(field);
            return(ret);
        }