Skip to content

Commit b925725

Browse files
committed
---
yaml --- r: 33775 b: refs/heads/snap-stage3 c: a7aecc4 h: refs/heads/master i: 33773: 7d9cbc8 33771: e74181f 33767: 3ef6424 33759: 7e2a638 v: v3
1 parent 3c5198b commit b925725

File tree

7 files changed

+451
-1
lines changed

7 files changed

+451
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8f22582e9f05c1ba36b25ad468ac75f8793f5011
4+
refs/heads/snap-stage3: a7aecc46a517c4cac0a63ffcdb2e87ebff77e281
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libsyntax/ext/base.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ fn syntax_expander_table() -> HashMap<~str, syntax_extension> {
9797
ext::log_syntax::expand_syntax_ext));
9898
syntax_expanders.insert(~"ast",
9999
builtin(ext::qquote::expand_ast));
100+
syntax_expanders.insert(~"deriving_eq",
101+
item_decorator(
102+
ext::deriving::expand_deriving_eq));
100103

101104
// Quasi-quoting expanders
102105
syntax_expanders.insert(~"quote_tokens",

branches/snap-stage3/src/libsyntax/ext/build.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,29 @@ fn mk_block(cx: ext_ctxt, sp: span,
136136
span: sp };
137137
mk_expr(cx, sp, ast::expr_block(blk))
138138
}
139+
fn mk_simple_block(cx: ext_ctxt, span: span, expr: @ast::expr) -> ast::blk {
140+
let block = {
141+
view_items: ~[],
142+
stmts: ~[],
143+
expr: Some(expr),
144+
id: cx.next_id(),
145+
rules: ast::default_blk
146+
};
147+
{ node: move block, span: span }
148+
}
139149
fn mk_copy(cx: ext_ctxt, sp: span, e: @ast::expr) -> @ast::expr {
140150
mk_expr(cx, sp, ast::expr_copy(e))
141151
}
142152
fn mk_managed(cx: ext_ctxt, sp: span, e: @ast::expr) -> @ast::expr {
143153
mk_expr(cx, sp, ast::expr_unary(ast::box(ast::m_imm), e))
144154
}
155+
fn mk_pat_ident(cx: ext_ctxt, span: span, ident: ast::ident) -> @ast::pat {
156+
let path = build::mk_raw_path(span, ~[ ident ]);
157+
let pat = ast::pat_ident(ast::bind_by_value, path, None);
158+
@{ id: cx.next_id(), node: move pat, span: span }
159+
}
160+
fn mk_bool(cx: ext_ctxt, span: span, value: bool) -> @ast::expr {
161+
let lit_expr = ast::expr_lit(@{ node: ast::lit_bool(value), span: span });
162+
build::mk_expr(cx, span, move lit_expr)
163+
}
164+

0 commit comments

Comments
 (0)