changed to original tree version
1 parent 264467f commit 4fe54502a1836e47b2332662f336779eb8c23288
@glproj03 glproj03 authored on 29 Nov 2005
Showing 1 changed file
View
37
sources/zweic/Tree.scala
abstract class Tree {
 
/**
* The source code position of this tree node.
* Has to be set explicitly woth the setPos method
* Has to be set explicitly with the setPos method
*/
private var p: Int = Position.UNDEFINED;
def pos: Int = p;
def setPos(p: Int): this.type = { this.p = p; this }
 
/**
* A common superclass for all definitions
*/
abstract class Def extends Tree {
def name: Name;
}
abstract class Def extends Tree;
 
/**
* D = ClassDef name [ name ] { M }
*/
abstract case class ClassDef( ) extends Def {};
//TODO
case class ClassDef(
// ... à compléter ...
)
extends Def;
 
 
/**
* A common superclass for member definitions
*/
 
/**
* M = FieldDecl name T
*/
abstract case class FieldDecl( ) extends Member;
//TODO
case class FieldDecl(
// ... à compléter ...
)
extends Member;
 
 
/**
* D = MethodDecl name { name T } T E
*/
abstract case class MethodDef( ) extends Member
case class MethodDef(
// ... à compléter ...
)
extends Member
{
val self: Name = Name("this");
}
//TODO
 
//############################################################################
// Tree nodes for types