token_store: split out first_token_from_line() into its own function