compiler/PPCTokenNode.st
changeset 438 20598d7ce9fa
parent 422 116d2b2af905
child 452 9f4558b3be66
--- a/compiler/PPCTokenNode.st	Tue Apr 21 17:20:11 2015 +0100
+++ b/compiler/PPCTokenNode.st	Thu Apr 30 23:43:14 2015 +0200
@@ -11,18 +11,8 @@
 
 !PPCTokenNode methodsFor:'accessing'!
 
-initialize
-	super initialize.
-!
-
-rewrite: changeStatus
-	|  |
-	super rewrite: changeStatus.
-	
-	(self allNodes anySatisfy: [ :node | node asFast ~= node ]) ifTrue: [  
-		changeStatus change.
-		self replace: child with: (child transform: [:node | node asFast]).
-	]
+prefix
+	^ #token
 !
 
 tokenClass
@@ -33,31 +23,10 @@
 tokenClass: anObject
 	
 	tokenClass := anObject
-! !
-
-!PPCTokenNode methodsFor:'as yet unclassified'!
-
-compileWith: compiler effect: effect id: id
-	|    |
-
-	compiler startMethod: id.
-	compiler addVariable: 'start'.
-	compiler addVariable: 'end'.
-	
-	compiler add: 'start := context position + 1.'.
-	compiler call: (self child compileWith: compiler).
-	compiler add: 'error ifTrue: [ ^ self ].'.	
-	compiler add: 'end := context position.'.
-	
-	compiler add: '^ ', tokenClass asString, ' on: (context collection) 
-																start: start  
-																stop: end
-																value: nil'.
- ^ compiler stopMethod.	
 !
 
-prefix
-	^ #token
+tokenType
+	^ self identityHash printString
 ! !
 
 !PPCTokenNode methodsFor:'comparing'!
@@ -71,3 +40,9 @@
 	^ super hash bitXor: tokenClass hash
 ! !
 
+!PPCTokenNode methodsFor:'visiting'!
+
+accept: visitor
+	^ visitor visitTokenNode: self
+! !
+