Exemplo n.º 1
0
        internal BasicNode Read(ReferenceNode referenceNode)
        {
            if (dataCounter >= data.Length)
            {
                return(RuntimeError(ERuntimeErrors.EndOfData));
            }
            var cons = data[dataCounter++];

            if (referenceNode.IsStringName)
            {
                cons = cons.ToStringConstant();
            }
            else
            {
                cons = cons.ToNumericConstant();
            }
            if (cons == null)
            {
                return(RuntimeError(ERuntimeErrors.ConversionError));
            }

            return(referenceNode.SetValue(this, cons));
        }