moved error code to eat_token

try to remove as much logic as possible from the scan list methods