diff options
author | buraq <buraq@epfl.ch> | 2005-06-01 11:57:55 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2005-06-01 11:57:55 +0000 |
commit | e31007e5948ce8529fc50c21add5a37e5f05b7d8 (patch) | |
tree | eda4b31ac9138062a4a3204695f87705efa2727b | |
parent | 23e00d0a922e507b9ae6cefdf8a0345f7197774a (diff) | |
download | scala-e31007e5948ce8529fc50c21add5a37e5f05b7d8.tar.gz scala-e31007e5948ce8529fc50c21add5a37e5f05b7d8.tar.bz2 scala-e31007e5948ce8529fc50c21add5a37e5f05b7d8.zip |
commenting 'Match' node
-rw-r--r-- | sources/scala/tools/nsc/ast/Trees.scala | 9 |
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 */ |