示例#1
0
        public void TaggedObj(TaggedObj tagObj)
        {
            ushort tag = tagObj.GetTagId();
            Obj    obj = tagObj.GetInnerObj();

            if (IsSyntacticSugaredString(tagObj))
            {
                SyntacticSugaredString(obj);
            }
            else if (obj.IsInt())
            {
                TaggedIntObj(tag, obj.GetLong());
            }
            else
            {
                StandardTaggedObj(tag, obj);
            }
        }
示例#2
0
        private bool IsSyntacticSugaredString(TaggedObj tagObj)
        {
            Obj obj = tagObj.GetInnerObj();

            if (tagObj.GetTagId() != Cell.Runtime.SymbObj.StringSymbId | !obj.IsIntSeq())
            {
                return(false);
            }
            int len = obj.GetSize();

            for (int i = 0; i < len; i++)
            {
                if (!Miscellanea.IsBMPCodePoint(obj.GetLongAt(i)))
                {
                    return(false);
                }
            }
            return(true);
        }
示例#3
0
            public void TaggedObj(TaggedObj obj)
            {
                int tagSize = Cell.Runtime.SymbObj.Get(obj.GetTagId()).stringRepr.Length;

                ConsumeSize(obj, 2 + tagSize + ObjSize(obj.GetInnerObj()));
            }