Skip to content

Commit fd5ba19

Browse files
committed
---
yaml --- r: 39262 b: refs/heads/incoming c: 9f27bf7 h: refs/heads/master v: v3
1 parent d65eb4a commit fd5ba19

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9-
refs/heads/incoming: 65db4315abd7b65e2f22b5b07086de892368bf23
9+
refs/heads/incoming: 9f27bf7debcaa208f87ad045638070a4e2b226d9
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libsyntax/ext/quote.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use token::*;
1919
*
2020
* Quasiquoting works via token trees.
2121
*
22-
* This is registered as a expression syntax extension called quote! that lifts
22+
* This is registered as a set of expression syntax extension called quote! that lifts
2323
* its argument token-tree to an AST representing the construction of the same
2424
* token tree, with ast::tt_nonterminal nodes interpreted as antiquotes
2525
* (splices).
@@ -146,16 +146,12 @@ fn mk_span(cx: ext_ctxt, qsp: span, sp: span) -> @ast::expr {
146146
}
147147

148148
// Lift an ident to the expr that evaluates to that ident.
149-
//
150-
// NB: this identifies the interner used when re-parsing the token tree
151-
// with the interner used during initial parse. This is _wrong_ and we
152-
// should be emitting a &str here and the token type should be ok with
153-
// &static/str or &session/str. Longer-term issue.
154149
fn mk_ident(cx: ext_ctxt, sp: span, ident: ast::ident) -> @ast::expr {
155-
build::mk_struct_e(cx, sp,
156-
ids_ext(cx, ~[~"ident"]),
157-
~[{ident: id_ext(cx, ~"repr"),
158-
ex: build::mk_uint(cx, sp, ident.repr) }])
150+
let e_meth = build::mk_access(cx, sp,
151+
ids_ext(cx, ~[~"ext_cx"]),
152+
id_ext(cx, ~"ident_of"));
153+
let e_str = build::mk_uniq_str(cx, sp, cx.str_of(ident));
154+
build::mk_call_(cx, sp, e_meth, ~[e_str])
159155
}
160156

161157
fn mk_bytepos(cx: ext_ctxt, sp: span, bpos: BytePos) -> @ast::expr {

0 commit comments

Comments
 (0)