]> git.lizzy.rs Git - rust.git/commitdiff
Add some long-overdue documentation on the INTERPOLATED helper macros.
authorPaul Stansifer <paul.stansifer@gmail.com>
Sun, 11 May 2014 22:55:01 +0000 (18:55 -0400)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 13 May 2014 02:52:29 +0000 (19:52 -0700)
src/libsyntax/parse/parser.rs

index 46a8960c3bece5534d3a74c11fff04ae986184db..4bc8be599ad7cf1b6a87becc871ba65235136966 100644 (file)
@@ -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) => (
         {