Factor out token highlighting and printing.