summaryrefslogtreecommitdiff
path: root/src/parse/tokens.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-04-24 17:52:02 +0200
committerLaurenz <laurmaedje@gmail.com>2022-04-24 18:00:36 +0200
commit2791f59ce2404d0483aee92b8231df95aa45b7a5 (patch)
tree13d4f86f8a3bd7c021dc43721f82b6ef23913e30 /src/parse/tokens.rs
parent89927d7de069169eeecfa091d6b77408b69fe188 (diff)
Clean up the parser a bit
Diffstat (limited to 'src/parse/tokens.rs')
-rw-r--r--src/parse/tokens.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/parse/tokens.rs b/src/parse/tokens.rs
index f6e1f296..4772be7f 100644
--- a/src/parse/tokens.rs
+++ b/src/parse/tokens.rs
@@ -3,7 +3,7 @@ use std::sync::Arc;
use unicode_xid::UnicodeXID;
use unscanny::Scanner;
-use super::{resolve_hex, resolve_raw, resolve_string};
+use super::resolve::{resolve_hex, resolve_raw, resolve_string};
use crate::geom::{AngleUnit, LengthUnit};
use crate::syntax::ast::{MathNode, RawNode, Unit};
use crate::syntax::{ErrorPos, NodeKind};
@@ -311,7 +311,6 @@ impl<'s> Tokens<'s> {
}
}
- #[inline]
fn hash(&mut self) -> NodeKind {
if self.s.at(is_id_start) {
let read = self.s.eat_while(is_id_continue);
@@ -661,13 +660,13 @@ pub fn is_ident(string: &str) -> bool {
/// Whether a character can start an identifier.
#[inline]
-pub fn is_id_start(c: char) -> bool {
+fn is_id_start(c: char) -> bool {
c.is_xid_start() || c == '_'
}
/// Whether a character can continue an identifier.
#[inline]
-pub fn is_id_continue(c: char) -> bool {
+fn is_id_continue(c: char) -> bool {
c.is_xid_continue() || c == '_' || c == '-'
}