File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
branches/try/src/libsyntax/parse/lexer Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: da4e4e4e0a7778a85748aa4a303b13f603e96b4b
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 8ddd286ea4ba4384a0dc9eae393ed515460a986e
5
- refs/heads/try: 47fe8aa6bfaa18d42561801dc230d2043b984b76
5
+ refs/heads/try: c8a02527ae6364175c31a5447dd4e21bb6ac3488
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -217,6 +217,20 @@ impl<'a> StringReader<'a> {
217
217
self . with_str_from_to ( start, self . last_pos , f)
218
218
}
219
219
220
+ /// Create an Ident from a given offset to the current offset, each
221
+ /// adjusted 1 towards each other (assumes that on either side there is a
222
+ /// single-byte delimiter).
223
+ pub fn ident_from ( & self , start : BytePos ) -> ast:: Ident {
224
+ debug ! ( "taking an ident from {} to {}" , start, self . last_pos) ;
225
+ self . with_str_from ( start, str_to_ident)
226
+ }
227
+
228
+ /// As ident_from, with an explicit endpoint.
229
+ pub fn ident_from_to ( & self , start : BytePos , end : BytePos ) -> ast:: Ident {
230
+ debug ! ( "taking an ident from {} to {}" , start, end) ;
231
+ self . with_str_from_to ( start, end, str_to_ident)
232
+ }
233
+
220
234
/// Calls `f` with a string slice of the source text spanning from `start`
221
235
/// up to but excluding `end`.
222
236
fn with_str_from_to < T > ( & self , start : BytePos , end : BytePos , f: |s: & str | -> T ) -> T {
You can’t perform that action at this time.
0 commit comments