summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2005-06-01 11:57:55 +0000
committerburaq <buraq@epfl.ch>2005-06-01 11:57:55 +0000
commite31007e5948ce8529fc50c21add5a37e5f05b7d8 (patch)
treeeda4b31ac9138062a4a3204695f87705efa2727b
parent23e00d0a922e507b9ae6cefdf8a0345f7197774a (diff)
downloadscala-e31007e5948ce8529fc50c21add5a37e5f05b7d8.tar.gz
scala-e31007e5948ce8529fc50c21add5a37e5f05b7d8.tar.bz2
scala-e31007e5948ce8529fc50c21add5a37e5f05b7d8.zip
commenting 'Match' node
-rw-r--r--sources/scala/tools/nsc/ast/Trees.scala9
1 files changed, 8 insertions, 1 deletions
diff --git a/sources/scala/tools/nsc/ast/Trees.scala b/sources/scala/tools/nsc/ast/Trees.scala
index 6a8ce585e8..6e2fa1e14c 100644
--- a/sources/scala/tools/nsc/ast/Trees.scala
+++ b/sources/scala/tools/nsc/ast/Trees.scala
@@ -254,7 +254,14 @@ abstract class Trees: Global {
case class If(cond: Tree, thenp: Tree, elsep: Tree)
extends TermTree;
- /** Pattern matching expression */
+ /** Pattern matching expression (before TransMatch)
+ * Switch statements (after TransMatch)
+ *
+ * after TM, cases will satisfy the following constraints:
+ * - all guards are EmptyTree,
+ * - all patterns will be either Literal(x:Int) or Alternative(lit|...|lit)
+ * - except for an "otherwise" branch, which has pattern Ident(nme.WILDCARD)
+ */
case class Match(selector: Tree, cases: List[CaseDef]) extends TermTree;
/** Return expression */