summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 0df61a7f044..925934d165f 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1321,6 +1321,14 @@ impl Parser {
         };
     }
 
+    fn parse_all_token_trees() -> ~[token_tree] {
+        let tts = DVec();
+        while self.token != token::EOF {
+            tts.push(self.parse_token_tree());
+        }
+        tts.get()
+    }
+
     fn parse_matchers() -> ~[matcher] {
         // unification of matchers and token_trees would vastly improve
         // the interpolation of matchers