Inline first_token.

Because it's tiny and hot.
This commit is contained in:
Nicholas Nethercote 2022-07-27 13:50:48 +10:00
parent bd23d68b41
commit b4fdf648ea

View File

@ -221,6 +221,7 @@ pub fn strip_shebang(input: &str) -> Option<usize> {
}
/// Parses the first token from the provided input string.
#[inline]
pub fn first_token(input: &str) -> Token {
debug_assert!(!input.is_empty());
Cursor::new(input).advance_token()