diff options
author | buraq <buraq@epfl.ch> | 2004-05-25 10:29:35 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2004-05-25 10:29:35 +0000 |
commit | 0cb02ad5040dad9bc00d5a261dd9fa009ced6f0c (patch) | |
tree | 1277bd326a39cc5b7ee18a7548bd58f010dfe5b8 /sources/scala/tools/scalac/transformer/TransMatch.scala | |
parent | 4daaa21895808a2147713df3a045cb08d9211933 (diff) | |
download | scala-0cb02ad5040dad9bc00d5a261dd9fa009ced6f0c.tar.gz scala-0cb02ad5040dad9bc00d5a261dd9fa009ced6f0c.tar.bz2 scala-0cb02ad5040dad9bc00d5a261dd9fa009ced6f0c.zip |
grammar printer, matching progress, view from s...
grammar printer, matching progress, view from string to scala.xml.Text
Diffstat (limited to 'sources/scala/tools/scalac/transformer/TransMatch.scala')
-rw-r--r-- | sources/scala/tools/scalac/transformer/TransMatch.scala | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sources/scala/tools/scalac/transformer/TransMatch.scala b/sources/scala/tools/scalac/transformer/TransMatch.scala index b541ca8682..7db465b037 100644 --- a/sources/scala/tools/scalac/transformer/TransMatch.scala +++ b/sources/scala/tools/scalac/transformer/TransMatch.scala @@ -21,6 +21,7 @@ import scalac.transformer.matching.PartialMatcher ; import scalac.transformer.matching.PatternMatcher ; import scalac.transformer.matching.TestRegTraverser ; import scalac.transformer.matching.AlgebraicMatcher ; + /** A transformer for expanding match expressions into * flat sequences of .is and .as method calls * @@ -29,6 +30,9 @@ import scalac.transformer.matching.AlgebraicMatcher ; */ package scala.tools.scalac.transformer { +import matching.FullRegularTranslator ; +import matching.GrammarPrinter ; //DEBUG + class TransMatch( global:scalac_Global ) extends scalac_transformer_OwnerTransformer( global ) { @@ -41,7 +45,10 @@ class TransMatch( global:scalac_Global ) def transform( root:Tree, cases:Array[Tree$CaseDef], restpe:Type ):Tree = { if( global.newMatch ) { - throw new ApplicationError("not implemented"); + val fm = new FullRegularTranslator( global ); + val gram = fm.MakeGrammar( scala.Iterator.fromArray( cases ) ); + Console.println( GrammarPrinter.toString( gram )); + throw new ApplicationError("not impl."); }; var containsReg = false; var i = 0; |