apply toTokens to each statement
getTypeName func