Skip to content

Commit 3f94e80

Browse files
committed
---
yaml --- r: 37878 b: refs/heads/try c: 9f27bf7 h: refs/heads/master v: v3
1 parent e01be83 commit 3f94e80

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: 65db4315abd7b65e2f22b5b07086de892368bf23
5+
refs/heads/try: 9f27bf7debcaa208f87ad045638070a4e2b226d9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/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)