File tree Expand file tree Collapse file tree 4 files changed +8
-11
lines changed
branches/snap-stage3/src/libsyntax/parse Expand file tree Collapse file tree 4 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 4c6bf4872012c010f84dc7fa2cdfe87522533f89
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 32f97cc891a6a2857338b4fcc7bb022e609eac1c
4
+ refs/heads/snap-stage3: 876fce2751c9d58fd803672809a8ad2cf2814504
5
5
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
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