Skip to content

Commit 57f1421

Browse files
committed
---
yaml --- r: 8038 b: refs/heads/snap-stage3 c: e76fdeb h: refs/heads/master v: v3
1 parent aa05375 commit 57f1421

File tree

9 files changed

+14
-11
lines changed

9 files changed

+14
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 099290bc7385477ab6c9908abb3b540e8cb6956a
4+
refs/heads/snap-stage3: e76fdeb3a6411f151aafb6a48df26bc6c8f977a5
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/comp/syntax/ast.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,11 @@ enum blk_sort {
272272

273273
type mac = spanned<mac_>;
274274

275+
type mac_body_ = {str: str, span: span};
276+
type mac_body = option::t<mac_body_>;
277+
275278
enum mac_ {
276-
mac_invoc(@path, @expr, option<str>),
279+
mac_invoc(@path, @expr, mac_body),
277280
mac_embed_type(@ty),
278281
mac_embed_block(blk),
279282
mac_ellipsis,

branches/snap-stage3/src/comp/syntax/ext/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import std::map::new_str_hash;
66
import codemap;
77

88
type syntax_expander =
9-
fn@(ext_ctxt, span, @ast::expr, option<str>) -> @ast::expr;
9+
fn@(ext_ctxt, span, @ast::expr, ast::mac_body) -> @ast::expr;
1010
type macro_def = {ident: str, ext: syntax_extension};
1111
type macro_definer =
12-
fn@(ext_ctxt, span, @ast::expr, option<str>) -> macro_def;
12+
fn@(ext_ctxt, span, @ast::expr, ast::mac_body) -> macro_def;
1313

1414
enum syntax_extension {
1515
normal(syntax_expander),

branches/snap-stage3/src/comp/syntax/ext/concat_idents.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import base::*;
33
import syntax::ast;
44

55
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: @ast::expr,
6-
_body: option<str>) -> @ast::expr {
6+
_body: ast::mac_body) -> @ast::expr {
77
let args: [@ast::expr] =
88
alt arg.node {
99
ast::expr_vec(elts, _) { elts }

branches/snap-stage3/src/comp/syntax/ext/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import base::*;
1010
export expand_syntax_ext;
1111

1212
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: @ast::expr,
13-
_body: option<str>) -> @ast::expr {
13+
_body: ast::mac_body) -> @ast::expr {
1414
let args: [@ast::expr] =
1515
alt arg.node {
1616
ast::expr_vec(elts, _) { elts }

branches/snap-stage3/src/comp/syntax/ext/fmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import syntax::ext::build::*;
1414
export expand_syntax_ext;
1515

1616
fn expand_syntax_ext(cx: ext_ctxt, sp: span, arg: @ast::expr,
17-
_body: option<str>) -> @ast::expr {
17+
_body: ast::mac_body) -> @ast::expr {
1818
let args: [@ast::expr] =
1919
alt arg.node {
2020
ast::expr_vec(elts, _) { elts }

branches/snap-stage3/src/comp/syntax/ext/ident_to_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import base::*;
33
import syntax::ast;
44

55
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: @ast::expr,
6-
_body: option<str>) -> @ast::expr {
6+
_body: ast::mac_body) -> @ast::expr {
77
let args: [@ast::expr] =
88
alt arg.node {
99
ast::expr_vec(elts, _) { elts }

branches/snap-stage3/src/comp/syntax/ext/log_syntax.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import syntax::ast;
33
import std::io::writer_util;
44

55
fn expand_syntax_ext(cx: ext_ctxt, sp: codemap::span, arg: @ast::expr,
6-
_body: option<str>) -> @ast::expr {
6+
_body: ast::mac_body) -> @ast::expr {
77

88
cx.print_backtrace();
99
std::io::stdout().write_line(print::pprust::expr_to_str(arg));

branches/snap-stage3/src/comp/syntax/ext/simplext.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ fn p_t_s_r_actual_vector(cx: ext_ctxt, elts: [@expr], _repeat_after: bool,
670670
}
671671

672672
fn add_new_extension(cx: ext_ctxt, sp: span, arg: @expr,
673-
_body: option<str>) -> base::macro_def {
673+
_body: ast::mac_body) -> base::macro_def {
674674
let args: [@ast::expr] =
675675
alt arg.node {
676676
ast::expr_vec(elts, _) { elts }
@@ -754,7 +754,7 @@ fn add_new_extension(cx: ext_ctxt, sp: span, arg: @expr,
754754
ext: normal(ext)};
755755

756756
fn generic_extension(cx: ext_ctxt, sp: span, arg: @expr,
757-
_body: option<str>, clauses: [@clause]) -> @expr {
757+
_body: ast::mac_body, clauses: [@clause]) -> @expr {
758758
for c: @clause in clauses {
759759
alt use_selectors_to_bind(c.params, arg) {
760760
some(bindings) { ret transcribe(cx, bindings, c.body); }

0 commit comments

Comments
 (0)