Make sure that token has a lineno before trying to use it.