diff options
| author | Paul Stansifer <paul.stansifer@gmail.com> | 2014-05-11 18:55:01 -0400 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-12 19:52:29 -0700 |
| commit | 0aae5574ea74e672029c17a5598bb2045ec022bd (patch) | |
| tree | c0785fba1a7e064370d3a3348b9be7ddafd9f622 /src/libsyntax/parse | |
| parent | 16351731ac9bd1f367811ff1d5000515b8d0a5a7 (diff) | |
| download | rust-0aae5574ea74e672029c17a5598bb2045ec022bd.tar.gz rust-0aae5574ea74e672029c17a5598bb2045ec022bd.zip | |
Add some long-overdue documentation on the INTERPOLATED helper macros.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 46a8960c3be..4bc8be599ad 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -125,7 +125,11 @@ enum ItemOrViewItem { IoviViewItem(ViewItem) } -/* The expr situation is not as complex as I thought it would be. + +// Possibly accept an `INTERPOLATED` expression (a pre-parsed expression +// dropped into the token stream, which happens while parsing the +// result of macro expansion) +/* Placement of these is not as complex as I feared it would be. The important thing is to make sure that lookahead doesn't balk at INTERPOLATED tokens */ macro_rules! maybe_whole_expr ( @@ -156,6 +160,7 @@ macro_rules! maybe_whole_expr ( ) ) +// As above, but for things other than expressions macro_rules! maybe_whole ( ($p:expr, $constructor:ident) => ( { |
