# HG changeset patch # User Jan Vrany # Date 1432310790 -3600 # Node ID f59795ddcd9027d60a973e28df7a532bf0a92710 # Parent 8dc4eb06316e4ccbf5ff8d409858c1514e1382bd Added inspector representation to show PPC node tree. diff -r 8dc4eb06316e -r f59795ddcd90 compiler/PPCNode.st --- a/compiler/PPCNode.st Thu May 21 17:19:17 2015 +0100 +++ b/compiler/PPCNode.st Fri May 22 17:06:30 2015 +0100 @@ -9,6 +9,7 @@ category:'PetitCompiler-Nodes' ! + !PPCNode class methodsFor:'as yet unclassified'! new @@ -467,6 +468,33 @@ shouldExpandToLevel: 6 ! ! +!PPCNode methodsFor:'inspecting'! + +inspector2TabTree + + + ^ (self newInspector2Tab) + label:'Tree'; + priority:50; + view: [ + | list view | + + list := PluggableHierarchicalList new. + list childBlock: [ :parent | parent children ]. + list labelBlock: [ :child | child printString ]. + list root: self. + view := ScrollableView for:HierarchicalListView. + view useDefaultIcons: false. + view list: list. + view + ]; + "/ application: [ ... ]; + "/ text: [ ... ]; + yourself + + "Modified: / 22-05-2015 / 17:05:02 / Jan Vrany " +! ! + !PPCNode methodsFor:'printing'! printHashOn: aStream @@ -488,7 +516,12 @@ super printOn: aStream. aStream nextPut: $(. self printNameOn: aStream. + self isMarkedForInline ifTrue:[ + aStream nextPutAll: ' INL' + ]. aStream nextPut: $) + + "Modified: / 22-05-2015 / 15:34:50 / Jan Vrany " ! ! !PPCNode methodsFor:'testing'! @@ -542,3 +575,10 @@ visitor visitNode: self ! ! +!PPCNode class methodsFor:'documentation'! + +version_HG + + ^ '$Changeset: $' +! ! +