support proper expansion order and tail end literals