[svn] r6380: nemerle/trunk/macros/alias.n

d svnadmin at nemerle.org
Wed Jun 7 22:40:53 CEST 2006


Log:
Add examples for TODO.


Author: d
Date: Wed Jun  7 22:40:52 2006
New Revision: 6380

Modified:
   nemerle/trunk/macros/alias.n

Modified: nemerle/trunk/macros/alias.n
==============================================================================
--- nemerle/trunk/macros/alias.n	(original)
+++ nemerle/trunk/macros/alias.n	Wed Jun  7 22:40:52 2006
@@ -41,9 +41,9 @@
    * to be "intelligent" in it's choices (which basically means, 
    * that only reasonable possibilities are taken into account).
    *
-   * TODO: write code for aliasing non-static methods, properties 
-   *       and fields and handling attributes like public, private,
-   *       override etc.
+   * TODO: write code for aliasing non-static methods (see "not 
+   *       supported yet" below), properties and fields as well
+   *       as handling attributes like private, override etc.
    *
    ***** Example #1:
    *
@@ -83,6 +83,29 @@
    * static Nth (i : int, xs : RList ['a]) { some_code }
    * Lookup (i : int) { def xs = this; some_code }
    *
+   ***************** NOT SUPPORTED (YET) STUFF BELOW *****************
+   *
+   ***** Example #4:
+   *
+   * [Alias (F1, F2 (), F3 (x)] 
+   * public F () : t { ... }
+   *
+   * // generates the following code:
+   *
+   * public F1 : t { get { ... } }
+   * public F2 () t { ... }
+   * public static F3 (x : this) : t { ... } // [x] <-> [this]
+   *
+   ***** Example #4:
+   *
+   * [Alias (F1 (x, y), F2 (x, y, z)] 
+   * public F (x : t1, y : t2) : t3 { ... }
+   *
+   * // generates the following code:
+   *
+   * public F1 (x : t1, y : t2) : t3 { ... }
+   * public static F2 (x : t1, y : t2, z : this) : t3 { ... } // [z] <-> [this]
+   *
    */
   [Nemerle.MacroUsage (Nemerle.MacroPhase.WithTypedMembers,
                        Nemerle.MacroTargets.Method)]
@@ -188,16 +211,5 @@
       }
     else
       Message.Error ("Sorry, aliasing non-static methods are not yet supported!")
-      /* // Need to add support for 
-       *
-       * [Alias (F1, F2 (), F3 (x)] // [x] <-> [this]
-       * F () { ... }
-       *
-       * // and
-       *
-       * [Alias (F1 (x, y), F2 (x, y, z)] // [z] <-> [this]
-       * F (x, y) { ... }
-       *
-       */
   }
 }



More information about the svn mailing list