Skip to content

Commit 0bcb05c

Browse files
committed
Finishing d2f8fb0 from @jseyfried
1 parent f8614c3 commit 0bcb05c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/grammar/verify.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ use syntax::parse::token::{self, BinOpToken, DelimToken, Lit, Token};
3737
use syntax::parse::lexer::TokenAndSpan;
3838
use syntax_pos::Pos;
3939

40+
use syntax::symbol::Symbol;
41+
4042
fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
4143
fn id() -> token::Token {
4244
Token::Ident(ast::Ident::with_empty_ctxt(Name(0)))
@@ -158,7 +160,7 @@ fn fix(mut lit: &str) -> ast::Name {
158160
let leading_hashes = count(lit);
159161

160162
// +1/-1 to adjust for single quotes
161-
parse::token::intern(&lit[leading_hashes + 1..lit.len() - leading_hashes - 1])
163+
Symbol::intern(&lit[leading_hashes + 1..lit.len() - leading_hashes - 1])
162164
}
163165

164166
/// Assuming a char/byte literal, strip the 'b' prefix and the single quotes.
@@ -168,7 +170,7 @@ fn fixchar(mut lit: &str) -> ast::Name {
168170
lit = &lit[1..];
169171
}
170172

171-
parse::token::intern(&lit[1..lit.len() - 1])
173+
Symbol::intern(&lit[1..lit.len() - 1])
172174
}
173175

174176
fn count(lit: &str) -> usize {
@@ -196,7 +198,7 @@ fn parse_antlr_token(s: &str, tokens: &HashMap<String, token::Token>, surrogate_
196198
let not_found = format!("didn't find token {:?} in the map", toknum);
197199
let proto_tok = tokens.get(toknum).expect(&not_found[..]);
198200

199-
let nm = parse::token::intern(content);
201+
let nm = Symbol::intern(content);
200202

201203
debug!("What we got: content (`{}`), proto: {:?}", content, proto_tok);
202204

0 commit comments

Comments
 (0)