Give token an index and throw unexpected token from a common place