Compiler-Strom.st 633 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Smalltalk createPackage: 'Compiler-Strom'!
  2. ASTNode subclass: #StromNode
  3. instanceVariableNames: 'tag attributes children'
  4. package: 'Compiler-Strom'!
  5. !StromNode commentStamp!
  6. I represent an assignment node.!
  7. !StromNode methodsFor: 'accessing'!
  8. attributes
  9. ^ attributes
  10. !
  11. attributes: anObject
  12. attributes := anObject
  13. !
  14. children
  15. ^ children
  16. !
  17. children: anObject
  18. children := anObject
  19. !
  20. dagChildren
  21. ^ { self tag }
  22. addAll: self attributes;
  23. addAll: self children;
  24. yourself
  25. !
  26. tag
  27. ^ tag
  28. !
  29. tag: anObject
  30. tag := anObject
  31. ! !
  32. !StromNode methodsFor: 'visiting'!
  33. acceptDagVisitor: aVisitor
  34. ^ aVisitor visitDagNode: self
  35. ! !