void StartCommentable(IHasComment aCommentable) { if (iLastCommentToken != null) { aCommentable.RawComment = iLastCommentToken.Content; iLastCommentToken = null; } iLastCommentable = aCommentable; }
void AddComment(Token aCommentToken) { if (BackwardsCommentRegex.IsMatch(aCommentToken.Content)) { if (iLastCommentable != null) { iLastCommentable.RawComment = aCommentToken.Content; } iLastCommentToken = null; } else if (ForwardsCommentRegex.IsMatch(aCommentToken.Content)) { iLastCommentable = null; iLastCommentToken = aCommentToken; } }
void EndCommentable(IHasComment aCommentable) { iLastCommentToken = null; iLastCommentable = aCommentable; }