--- a/gui/PPParserDebuggerResult.st Wed Mar 05 00:34:06 2014 +0100
+++ b/gui/PPParserDebuggerResult.st Wed Mar 05 00:58:31 2014 +0100
@@ -10,27 +10,31 @@
!PPParserDebuggerResult class methodsFor:'instance creation'!
+new
+ ^ self basicNew initialize
+!
+
parse: aStream with: parser
- | root newParser |
- root := self new.
- newParser := parser transform: [:each |
- each name isNil
- ifTrue: [ each ]
- ifFalse: [
- each >=> [:stream :continuation |
- | result child |
- child := PPParserDebuggerResult new
- parser: each;
- parent: root.
- root := root children add: child.
- child start: stream position + 1.
- result := continuation value.
- child end: stream position.
- root result: result.
- root := root parent.
- result ]]].
- newParser parse: aStream.
- ^ root children first
+ | root newParser |
+ root := self new.
+ newParser := parser transform: [:each |
+ each name isNil
+ ifTrue: [ each ]
+ ifFalse: [
+ each >=> [:stream :continuation |
+ | result child |
+ child := PPParserDebuggerResult new
+ parser: each;
+ parent: root.
+ root := root children add: child.
+ child start: stream position + 1.
+ result := continuation value.
+ child end: stream position.
+ root result: result.
+ root := root parent.
+ result ]]].
+ newParser parse: aStream.
+ ^ root children first
! !
!PPParserDebuggerResult methodsFor:'accessing'!
@@ -107,10 +111,10 @@
!PPParserDebuggerResult class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/goodies/petitparser/gui/PPParserDebuggerResult.st,v 1.1 2014-03-04 21:14:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/petitparser/gui/PPParserDebuggerResult.st,v 1.2 2014-03-04 23:58:31 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/goodies/petitparser/gui/PPParserDebuggerResult.st,v 1.1 2014-03-04 21:14:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/goodies/petitparser/gui/PPParserDebuggerResult.st,v 1.2 2014-03-04 23:58:31 cg Exp $'
! !