Changed token_number to enum

Also added a comment explaining why token_number can be negative,
and also cleared error in match_error because it was retaining token buffer data.