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); } }
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); }
public void TaggedObj(TaggedObj obj) { int tagSize = Cell.Runtime.SymbObj.Get(obj.GetTagId()).stringRepr.Length; ConsumeSize(obj, 2 + tagSize + ObjSize(obj.GetInnerObj())); }