protected internal void SerializeNode(StringBuilder buf, object t) { int ID = adaptor.GetUniqueID(t); string text = adaptor.GetNodeText(t); int type = adaptor.GetNodeType(t); buf.Append("\t"); buf.Append(ID); buf.Append("\t"); buf.Append(type); IToken token = adaptor.GetToken(t); int line = -1; int pos = -1; if (token != null) { line = token.Line; pos = token.CharPositionInLine; } buf.Append("\t"); buf.Append(line); buf.Append("\t"); buf.Append(pos); int tokenIndex = adaptor.GetTokenStartIndex(t); buf.Append("\t"); buf.Append(tokenIndex); SerializeText(buf, text); }
public virtual int GetTokenStartIndex(object t) { return(adaptor.GetTokenStartIndex(t)); }