예제 #1
0
        public override void GenerateForBranch(Generator generator, int branch)
        {
            var valContainer = new StringToValue {
                TypeName = Type, StringVal = Value
            };

            generator.AddOp(GenCodes.Push, 2,
                            ByteConverter.New()
                            .CastInt32(LanguageSymbols.Instance.GetTypeSize(Type))
                            .CastValueContainer(valContainer)
                            .Bytes);
        }
예제 #2
0
        /// <summary>
        /// StringToValue to bytes
        /// </summary>
        /// <param name="val"></param>
        /// <returns></returns>
        public ByteConverter CastValueContainer(StringToValue val)
        {
            val.WriteBytes(this);

            return(this);
        }