From 4b1f4936e29a9d2b3253817487cfbaff6bbbd2c0 Mon Sep 17 00:00:00 2001 From: michelou Date: Mon, 7 Jul 2003 07:32:04 +0000 Subject: indentation + javadoc comments --- .../matching/FreshVariableTraverser.java | 74 ++++++++++++++-------- 1 file changed, 49 insertions(+), 25 deletions(-) diff --git a/sources/scalac/transformer/matching/FreshVariableTraverser.java b/sources/scalac/transformer/matching/FreshVariableTraverser.java index 7010aae5da..870b6e8779 100644 --- a/sources/scalac/transformer/matching/FreshVariableTraverser.java +++ b/sources/scalac/transformer/matching/FreshVariableTraverser.java @@ -1,46 +1,70 @@ -package scalac.transformer.matching ; +/* ____ ____ ____ ____ ______ *\ +** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala ** +** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL ** +** /_____/\____/\___/\____/____/ ** +\* */ -import scalac.ast.Traverser ; +// $Id$ + + +package scalac.transformer.matching; + +import scalac.ast.Traverser; import scalac.ast.Tree; import Tree.Ident; import Tree.Bind; import scalac.util.Name; -import scalac.util.FreshNameCreator ; +import scalac.util.FreshNameCreator; -import scalac.symtab.* ; +import scalac.symtab.*; import java.util.HashMap; import java.util.Vector; + +/** A tree traverser for handling fresh variables + * @author Burak Emir + * @version 1.0 + */ class FreshVariableTraverser extends VariableTraverser { - int pos; - Symbol owner; - FreshNameCreator fresh; + int pos; + Symbol owner; + FreshNameCreator fresh; - public HashMap helpMap ; + /** + */ + public HashMap helpMap; - public FreshVariableTraverser( int pos, - Symbol owner, - FreshNameCreator fresh) { - this.pos = pos; - this.owner = owner; - this.fresh = fresh; + /** + * @param pos + * @param owner + * @param fresh + */ + public FreshVariableTraverser(int pos, + Symbol owner, + FreshNameCreator fresh) { + this.pos = pos; + this.owner = owner; + this.fresh = fresh; - helpMap = new HashMap(); - } + helpMap = new HashMap(); + } - void handleVariableSymbol( Symbol sym ) { - Symbol helpVar = new TermSymbol( pos, - fresh.newName( sym.name - .toString() ), - owner, - 0) - .setType( sym.type() ); + /** + * @param sym + */ + void handleVariableSymbol(Symbol sym) { + Symbol helpVar = + new TermSymbol(pos, + fresh.newName(sym.name.toString()), + owner, + 0); + helpVar.setType(sym.type()); - helpMap.put( sym, helpVar ); - } + helpMap.put(sym, helpVar); + } } -- cgit v1.2.3