lily,having told she is a student,went home.这里having told充当句子什么成分

问题描述:

lily,having told she is a student,went home.这里having told充当句子什么成分
having done 不做定语,那这里做什么

having told she is a student,lily went home.
动词的现在分词做状语