File tree 3 files changed +7
-10
lines changed
3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -868,7 +868,6 @@ fn consume_whitespace(rdr: @mut StringReader) {
868
868
mod test {
869
869
use super :: * ;
870
870
871
- use ast;
872
871
use codemap:: { BytePos , CodeMap , Span } ;
873
872
use diagnostic;
874
873
use parse:: token;
Original file line number Diff line number Diff line change @@ -324,17 +324,10 @@ mod test {
324
324
use abi;
325
325
use parse:: parser:: Parser ;
326
326
use parse:: token:: { str_to_ident} ;
327
- use util:: parser_testing:: { string_to_tts_and_sess , string_to_parser} ;
327
+ use util:: parser_testing:: { string_to_tts , string_to_parser} ;
328
328
use util:: parser_testing:: { string_to_expr, string_to_item} ;
329
329
use util:: parser_testing:: string_to_stmt;
330
330
331
- // map a string to tts, return the tt without its parsesess
332
- fn string_to_tts_only ( source_str : @str ) -> ~[ ast:: token_tree ] {
333
- let ( tts, _ps) = string_to_tts_and_sess ( source_str) ;
334
- tts
335
- }
336
-
337
-
338
331
#[ cfg( test) ] fn to_json_str < E : Encodable < extra:: json:: Encoder > > ( val : @E ) -> ~str {
339
332
do io:: with_str_writer |writer| {
340
333
let mut encoder = extra:: json:: Encoder ( writer) ;
@@ -396,7 +389,7 @@ mod test {
396
389
}
397
390
398
391
#[ test] fn string_to_tts_1 ( ) {
399
- let ( tts, _ps ) = string_to_tts_and_sess ( @"fn a ( b : int) { b; } ") ;
392
+ let tts = string_to_tts ( @"fn a ( b : int) { b; } ") ;
400
393
assert_eq ! ( to_json_str( @tts) ,
401
394
~"[ \
402
395
{ \
Original file line number Diff line number Diff line change @@ -2035,6 +2035,11 @@ impl Parser {
2035
2035
2036
2036
// parse a single token tree from the input.
2037
2037
pub fn parse_token_tree ( & self ) -> token_tree {
2038
+ // FIXME #6994: currently, this is too eager. It
2039
+ // parses token trees but also identifies tt_seq's
2040
+ // and tt_nonterminals; it's too early to know yet
2041
+ // whether something will be a nonterminal or a seq
2042
+ // yet.
2038
2043
maybe_whole ! ( deref self , nt_tt) ;
2039
2044
2040
2045
// this is the fall-through for the 'match' below.
You can’t perform that action at this time.
0 commit comments