flatten rustc_lexer::character_properties module
On the call site, `rustc_lexer::is_whitespace` reads much better than `character_properties::is_whitespace`.
This commit is contained in:
parent
a0c186c34f
commit
206fe8e1c3
7 changed files with 82 additions and 86 deletions
|
@ -6,7 +6,6 @@ use crate::tokenstream::{self, DelimSpan, IsJoint::*, TokenStream, TreeAndJoint}
|
|||
|
||||
use errors::{Diagnostic, DiagnosticBuilder};
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_lexer::character_properties::{is_id_start, is_id_continue};
|
||||
use syntax_pos::{BytePos, FileName, MultiSpan, Pos, SourceFile, Span};
|
||||
use syntax_pos::symbol::{kw, sym, Symbol};
|
||||
|
||||
|
@ -323,7 +322,7 @@ impl Ident {
|
|||
fn is_valid(string: &str) -> bool {
|
||||
let mut chars = string.chars();
|
||||
if let Some(start) = chars.next() {
|
||||
is_id_start(start) && chars.all(is_id_continue)
|
||||
rustc_lexer::is_id_start(start) && chars.all(rustc_lexer::is_id_continue)
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue