From 0052c754cbfca7eadbdf357be6f946235585cc7b Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Mon, 20 Apr 2020 14:57:41 -0400 Subject: [PATCH] rename ident_body to be more explicit it does not include interpolation --- src/utils/strings.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/strings.rs b/src/utils/strings.rs index 7f0028c..af6433b 100644 --- a/src/utils/strings.rs +++ b/src/utils/strings.rs @@ -12,7 +12,7 @@ use crate::{Scope, Token}; use super::{as_hex, hex_char_for, is_name, is_name_start, parse_interpolation}; -fn ident_body>( +fn ident_body_no_interpolation>( toks: &mut PeekMoreIterator, unit: bool, mut span: Span, @@ -205,7 +205,7 @@ pub(crate) fn eat_ident_no_interpolation>( if toks.peek().unwrap().kind == '-' { toks.next(); text.push('-'); - text.push_str(&ident_body(toks, unit, span)?.node); + text.push_str(&ident_body_no_interpolation(toks, unit, span)?.node); return Ok(Spanned { node: text, span }); } } @@ -224,7 +224,7 @@ pub(crate) fn eat_ident_no_interpolation>( return Err(("Expected identifier.", first.pos()).into()); } - let body = ident_body(toks, unit, span)?; + let body = ident_body_no_interpolation(toks, unit, span)?; span = span.merge(body.span); text.push_str(&body.node); Ok(Spanned { node: text, span })