Skip to content

Commit 53a12e4

Browse files
committed
---
yaml --- r: 2939 b: refs/heads/master c: dd58851 h: refs/heads/master i: 2937: 889664a 2935: fbbbef7 v: v3
1 parent 3b980c8 commit 53a12e4

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: ecf1bd7651d83b4bc7685e926e2761c8ab87c68f
2+
refs/heads/master: dd588519bdd7950c6a4c398f8fffd00fbd2238d3

trunk/src/comp/front/ext.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,26 @@ fn syntax_expander_table() -> hashmap[str, syntax_extension] {
2323
ret syntax_expanders;
2424
}
2525

26-
type span_err_fn = fn (span sp, str msg) -> !;
26+
type span_msg_fn = fn (span sp, str msg) -> !;
2727

2828
// Provides a limited set of services necessary for syntax extensions
2929
// to do their thing
30-
type ext_ctxt = rec(span_err_fn span_err);
30+
type ext_ctxt = rec(span_msg_fn span_err,
31+
span_msg_fn span_unimpl);
3132

3233
fn mk_ctxt(session sess) -> ext_ctxt {
33-
fn ext_span_err_(session sess, span sp, str err) -> ! {
34-
sess.span_err(sp, err);
34+
fn ext_span_err_(session sess, span sp, str msg) -> ! {
35+
sess.span_err(sp, msg);
3536
}
3637
auto ext_span_err = bind ext_span_err_(sess, _, _);
37-
ret rec(span_err = ext_span_err);
38+
39+
fn ext_span_unimpl_(session sess, span sp, str msg) -> ! {
40+
sess.span_unimpl(sp, msg);
41+
}
42+
auto ext_span_unimpl = bind ext_span_unimpl_(sess, _, _);
43+
44+
ret rec(span_err = ext_span_err,
45+
span_unimpl = ext_span_unimpl);
3846
}
3947

4048
//

0 commit comments

Comments
 (0)