Browse Source

Added String>>trimBoth, trimLeft etc and trim chunks in ChunkExporter to remove trailing whitespace etc.

Göran Krampe 13 years ago
parent
commit
6c9d71e3df
11 changed files with 128 additions and 572 deletions
  1. 4 4
      js/Compiler.js
  2. 90 0
      js/Kernel.js
  3. 3 3
      js/Parser.js
  4. 1 74
      st/Canvas.st
  5. 1 79
      st/Compiler.st
  6. 0 4
      st/Examples.st
  7. 0 111
      st/IDE.st
  8. 1 51
      st/JQuery.st
  9. 26 160
      st/Kernel.st
  10. 2 82
      st/Parser.st
  11. 0 4
      st/SUnit.st

+ 4 - 4
js/Compiler.js

@@ -1554,11 +1554,11 @@ selector: 'doIt',
 category: '',
 category: '',
 fn: function (){
 fn: function (){
 var self=this;
 var self=this;
-return smalltalk.send((function(){return smalltalk.send(smalltalk.send(smalltalk.ChunkExporter, "_new", []), "_exportCategory_", ["Parser"]);}), "_value", []);
+return smalltalk.send((function(){return smalltalk.send("abc", "_trimLeft_", ["az"]);}), "_value", []);
 return self;},
 return self;},
-source: unescape('doIt%20%5E%5BChunkExporter%20new%20exportCategory%3A%20%27Parser%27%20%5D%20value'),
-messageSends: ["value", "exportCategory:", "new"],
-referencedClasses: [smalltalk.ChunkExporter]
+source: unescape('doIt%20%5E%5B%27abc%27%20trimLeft%3A%20%27az%27%5D%20value'),
+messageSends: ["value", "trimLeft:"],
+referencedClasses: []
 }),
 }),
 smalltalk.DoIt);
 smalltalk.DoIt);
 
 

+ 90 - 0
js/Kernel.js

@@ -4263,6 +4263,96 @@ referencedClasses: []
 }),
 }),
 smalltalk.String);
 smalltalk.String);
 
 
+smalltalk.addMethod(
+'_trimLeft_',
+smalltalk.method({
+selector: 'trimLeft:',
+category: 'regular expressions',
+fn: function (separators){
+var self=this;
+return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send(smalltalk.RegularExpression, "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5E%5B"), "__comma", [separators]), "__comma", [unescape("%5D+")]), "g"]), ""]);
+return self;},
+source: unescape('trimLeft%3A%20separators%0A%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5E%5B%27%2C%20separators%2C%20%27%5D+%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27%0A'),
+messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
+referencedClasses: [smalltalk.RegularExpression]
+}),
+smalltalk.String);
+
+smalltalk.addMethod(
+'_trimRight_',
+smalltalk.method({
+selector: 'trimRight:',
+category: 'regular expressions',
+fn: function (separators){
+var self=this;
+return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send(smalltalk.RegularExpression, "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [separators]), "__comma", [unescape("%5D+%24")]), "g"]), ""]);
+return self;},
+source: unescape('trimRight%3A%20separators%0A%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5B%27%2C%20separators%2C%20%27%5D+%24%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27%0A'),
+messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
+referencedClasses: [smalltalk.RegularExpression]
+}),
+smalltalk.String);
+
+smalltalk.addMethod(
+'_trimLeft',
+smalltalk.method({
+selector: 'trimLeft',
+category: 'regular expressions',
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_trimLeft_", [unescape("%5Cs")]);
+return self;},
+source: unescape('trimLeft%0A%09%5Eself%20trimLeft%3A%20%27%5Cs%27'),
+messageSends: ["trimLeft:"],
+referencedClasses: []
+}),
+smalltalk.String);
+
+smalltalk.addMethod(
+'_trimRight',
+smalltalk.method({
+selector: 'trimRight',
+category: 'regular expressions',
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_trimRight_", [unescape("%5Cs")]);
+return self;},
+source: unescape('trimRight%0A%09%5Eself%20trimRight%3A%20%27%5Cs%27'),
+messageSends: ["trimRight:"],
+referencedClasses: []
+}),
+smalltalk.String);
+
+smalltalk.addMethod(
+'_trimBoth',
+smalltalk.method({
+selector: 'trimBoth',
+category: 'regular expressions',
+fn: function (){
+var self=this;
+return smalltalk.send(self, "_trimBoth_", [unescape("%5Cs")]);
+return self;},
+source: unescape('trimBoth%0A%09%5Eself%20trimBoth%3A%20%27%5Cs%27'),
+messageSends: ["trimBoth:"],
+referencedClasses: []
+}),
+smalltalk.String);
+
+smalltalk.addMethod(
+'_trimBoth_',
+smalltalk.method({
+selector: 'trimBoth:',
+category: 'regular expressions',
+fn: function (separators){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]);
+return self;},
+source: unescape('trimBoth%3A%20separators%0A%0A%20%20%20%20%09%5E%28self%20trimLeft%3A%20separators%29%20trimRight%3A%20separators%0A'),
+messageSends: ["trimRight:", "trimLeft:"],
+referencedClasses: []
+}),
+smalltalk.String);
+
 
 
 smalltalk.addMethod(
 smalltalk.addMethod(
 '_streamClass',
 '_streamClass',

+ 3 - 3
js/Parser.js

@@ -1560,10 +1560,10 @@ selector: 'chunkEscape:',
 category: 'not yet classified',
 category: 'not yet classified',
 fn: function (aString){
 fn: function (aString){
 var self=this;
 var self=this;
-return smalltalk.send(aString, "_replace_with_", [unescape("%21"), unescape("%21%21")]);
+return smalltalk.send(smalltalk.send(aString, "_replace_with_", [unescape("%21"), unescape("%21%21")]), "_trimBoth", []);
 return self;},
 return self;},
-source: unescape('chunkEscape%3A%20aString%0A%09%22Replace%20all%20occurrences%20of%20%21%20with%20%21%21%22%0A%0A%09%5EaString%20replace%3A%20%27%21%27%20with%3A%20%27%21%21%27%0A'),
-messageSends: ["replace:with:"],
+source: unescape('chunkEscape%3A%20aString%0A%09%22Replace%20all%20occurrences%20of%20%21%20with%20%21%21%20and%20trim%20at%20both%20ends.%22%0A%0A%09%5E%28aString%20replace%3A%20%27%21%27%20with%3A%20%27%21%21%27%29%20trimBoth%0A'),
+messageSends: ["trimBoth", "replace:with:"],
 referencedClasses: []
 referencedClasses: []
 }),
 }),
 smalltalk.ChunkExporter);
 smalltalk.ChunkExporter);

+ 1 - 74
st/Canvas.st

@@ -5,7 +5,7 @@ Object subclass: #CanvasRenderingContext
 !CanvasRenderingContext methodsFor: 'drawing arcs'!
 !CanvasRenderingContext methodsFor: 'drawing arcs'!
 
 
 arcTo: aPoint radius: aNumber startAngle: aNumber2 endAngle: aNumber3 anticlockwise: aBoolean
 arcTo: aPoint radius: aNumber startAngle: aNumber2 endAngle: aNumber3 anticlockwise: aBoolean
-	{'self.arc(aPoint._x(), aPoint._y(), aNumber, aNumber2, aNumber3, aBoolean)'} 
+	{'self.arc(aPoint._x(), aPoint._y(), aNumber, aNumber2, aNumber3, aBoolean)'}
 !
 !
 
 
 arcTo: aPoint radius: aNumber
 arcTo: aPoint radius: aNumber
@@ -78,19 +78,16 @@ Object subclass: #HTMLCanvas
 
 
 root: aTagBrush
 root: aTagBrush
     root := aTagBrush
     root := aTagBrush
-
 !
 !
 
 
 root
 root
     ^root
     ^root
-
 ! !
 ! !
 
 
 !HTMLCanvas methodsFor: 'adding'!
 !HTMLCanvas methodsFor: 'adding'!
 
 
 with: anObject
 with: anObject
     ^self root with: anObject
     ^self root with: anObject
-
 ! !
 ! !
 
 
 !HTMLCanvas methodsFor: 'initialization'!
 !HTMLCanvas methodsFor: 'initialization'!
@@ -98,144 +95,116 @@ with: anObject
 initialize
 initialize
     super initialize.
     super initialize.
     root := TagBrush fromString: 'div' canvas: self
     root := TagBrush fromString: 'div' canvas: self
-
 ! !
 ! !
 
 
 !HTMLCanvas methodsFor: 'tags'!
 !HTMLCanvas methodsFor: 'tags'!
 
 
 newTag: aString
 newTag: aString
     ^TagBrush fromString: aString canvas: self
     ^TagBrush fromString: aString canvas: self
-
 !
 !
 
 
 tag: aString
 tag: aString
     ^root addBrush: (self newTag: aString)
     ^root addBrush: (self newTag: aString)
-
 !
 !
 
 
 h1
 h1
     ^self tag: 'h1'
     ^self tag: 'h1'
-
 !
 !
 
 
 h2
 h2
     ^self tag: 'h2'
     ^self tag: 'h2'
-
 !
 !
 
 
 h3
 h3
     ^self tag: 'h3'
     ^self tag: 'h3'
-
 !
 !
 
 
 h4
 h4
     ^self tag: 'h4'
     ^self tag: 'h4'
-
 !
 !
 
 
 h5
 h5
     ^self tag: 'h5'
     ^self tag: 'h5'
-
 !
 !
 
 
 h6
 h6
     ^self tag: 'h6'
     ^self tag: 'h6'
-
 !
 !
 
 
 p
 p
     ^self tag: 'p'
     ^self tag: 'p'
-
 !
 !
 
 
 div
 div
     ^self tag: 'div'
     ^self tag: 'div'
-
 !
 !
 
 
 span
 span
     ^self tag: 'span'
     ^self tag: 'span'
-
 !
 !
 
 
 img
 img
     ^self tag: 'img'
     ^self tag: 'img'
-
 !
 !
 
 
 ul
 ul
     ^self tag: 'ul'
     ^self tag: 'ul'
-
 !
 !
 
 
 ol
 ol
     ^self tag: 'ol'
     ^self tag: 'ol'
-
 !
 !
 
 
 li
 li
     ^self tag: 'li'
     ^self tag: 'li'
-
 !
 !
 
 
 table
 table
     ^self tag: 'table'
     ^self tag: 'table'
-
 !
 !
 
 
 tr
 tr
     ^self tag: 'tr'
     ^self tag: 'tr'
-
 !
 !
 
 
 td 
 td 
     ^self tag: 'td'
     ^self tag: 'td'
-
 !
 !
 
 
 th
 th
     ^self tag: 'th'
     ^self tag: 'th'
-
 !
 !
 
 
 form
 form
     ^self tag: 'form'
     ^self tag: 'form'
-
 !
 !
 
 
 input
 input
     ^self tag: 'input'
     ^self tag: 'input'
-
 !
 !
 
 
 button
 button
     ^self tag: 'button'
     ^self tag: 'button'
-
 !
 !
 
 
 select
 select
     ^self tag: 'select'
     ^self tag: 'select'
-
 !
 !
 
 
 option
 option
     ^self tag: 'option'
     ^self tag: 'option'
-
 !
 !
 
 
 textarea
 textarea
     ^self tag: 'textarea'
     ^self tag: 'textarea'
-
 !
 !
 
 
 a
 a
     ^self tag: 'a'
     ^self tag: 'a'
-
 !
 !
 
 
 canvas
 canvas
 	^self tag: 'canvas'
 	^self tag: 'canvas'
-
 ! !
 ! !
 
 
 Object subclass: #TagBrush
 Object subclass: #TagBrush
@@ -246,7 +215,6 @@ Object subclass: #TagBrush
 
 
 element
 element
     ^element
     ^element
-
 ! !
 ! !
 
 
 !TagBrush methodsFor: 'adding'!
 !TagBrush methodsFor: 'adding'!
@@ -254,28 +222,23 @@ element
 contents: anObject
 contents: anObject
     self asJQuery empty.
     self asJQuery empty.
     self append: anObject
     self append: anObject
-
 !
 !
 
 
 addBrush: aTagBrush
 addBrush: aTagBrush
     self appendChild: aTagBrush element.
     self appendChild: aTagBrush element.
     ^aTagBrush
     ^aTagBrush
-
 !
 !
 
 
 with: anObject
 with: anObject
     self append: anObject
     self append: anObject
-
 !
 !
 
 
 append: anObject
 append: anObject
     anObject appendToBrush: self
     anObject appendToBrush: self
-
 !
 !
 
 
 appendToBrush: aTagBrush
 appendToBrush: aTagBrush
     aTagBrush addBrush: self
     aTagBrush addBrush: self
-
 !
 !
 
 
 appendBlock: aBlock
 appendBlock: aBlock
@@ -284,108 +247,88 @@ appendBlock: aBlock
     canvas root: self.
     canvas root: self.
     aBlock value: canvas.
     aBlock value: canvas.
     canvas root: root
     canvas root: root
-
 !
 !
 
 
 appendChild: anElement
 appendChild: anElement
     {'self[''@element''].appendChild(anElement)'}
     {'self[''@element''].appendChild(anElement)'}
-
 !
 !
 
 
 appendString: aString
 appendString: aString
     self appendChild: (self createTextNodeFor: aString)
     self appendChild: (self createTextNodeFor: aString)
-
 ! !
 ! !
 
 
 !TagBrush methodsFor: 'attributes'!
 !TagBrush methodsFor: 'attributes'!
 
 
 at: aString put: aValue
 at: aString put: aValue
     {'self[''@element''].setAttribute(aString, aValue)'}
     {'self[''@element''].setAttribute(aString, aValue)'}
-
 !
 !
 
 
 removeAt: aString
 removeAt: aString
     {'self[''@element''].removeAttribute(aString)'}
     {'self[''@element''].removeAttribute(aString)'}
-
 !
 !
 
 
 class: aString
 class: aString
     self at: 'class' put: aString
     self at: 'class' put: aString
-
 !
 !
 
 
 id: aString
 id: aString
     self at: 'id' put: aString
     self at: 'id' put: aString
-
 !
 !
 
 
 src: aString
 src: aString
     self  at: 'src' put: aString
     self  at: 'src' put: aString
-
 !
 !
 
 
 href: aString
 href: aString
     self at: 'href' put: aString
     self at: 'href' put: aString
-
 !
 !
 
 
 title: aString
 title: aString
     self at: 'title' put: aString
     self at: 'title' put: aString
-
 !
 !
 
 
 style: aString
 style: aString
     self at: 'style' put: aString
     self at: 'style' put: aString
-
 ! !
 ! !
 
 
 !TagBrush methodsFor: 'converting'!
 !TagBrush methodsFor: 'converting'!
 
 
 asJQuery
 asJQuery
 	{'return smalltalk.JQuery._from_(jQuery(self[''@element'']))'}
 	{'return smalltalk.JQuery._from_(jQuery(self[''@element'']))'}
-
 !
 !
 
 
 asJQueryDo: aBlock
 asJQueryDo: aBlock
     aBlock value: self asJQuery
     aBlock value: self asJQuery
-
 ! !
 ! !
 
 
 !TagBrush methodsFor: 'events'!
 !TagBrush methodsFor: 'events'!
 
 
 onKeyDown: aBlock
 onKeyDown: aBlock
     self asJQuery on: 'keydown' do: aBlock
     self asJQuery on: 'keydown' do: aBlock
-
 !
 !
 
 
 onKeyPress: aBlock
 onKeyPress: aBlock
     self asJQuery on: 'keypress' do: aBlock
     self asJQuery on: 'keypress' do: aBlock
-
 !
 !
 
 
 onKeyUp: aBlock
 onKeyUp: aBlock
     self asJQuery on: 'keyup' do: aBlock
     self asJQuery on: 'keyup' do: aBlock
-
 !
 !
 
 
 onFocus: aBlock
 onFocus: aBlock
     self asJQuery on: 'focus' do: aBlock
     self asJQuery on: 'focus' do: aBlock
-
 !
 !
 
 
 onBlur: aBlock
 onBlur: aBlock
     self asJQuery on: 'blur' do: aBlock
     self asJQuery on: 'blur' do: aBlock
-
 !
 !
 
 
 onChange: aBlock
 onChange: aBlock
     self asJQuery on: 'change' do: aBlock
     self asJQuery on: 'change' do: aBlock
-
 !
 !
 
 
 onClick: aBlock
 onClick: aBlock
     self asJQuery on: 'click' do: aBlock
     self asJQuery on: 'click' do: aBlock
-
 ! !
 ! !
 
 
 !TagBrush methodsFor: 'initialization'!
 !TagBrush methodsFor: 'initialization'!
@@ -393,19 +336,16 @@ onClick: aBlock
 initializeFromString: aString canvas: aCanvas
 initializeFromString: aString canvas: aCanvas
     element := self createElementFor: aString.
     element := self createElementFor: aString.
     canvas := aCanvas
     canvas := aCanvas
-
 ! !
 ! !
 
 
 !TagBrush methodsFor: 'private'!
 !TagBrush methodsFor: 'private'!
 
 
 createElementFor: aString
 createElementFor: aString
 	{'return document.createElement(String(aString))'}
 	{'return document.createElement(String(aString))'}
-
 !
 !
 
 
 createTextNodeFor: aString
 createTextNodeFor: aString
 	{'return document.createTextNode(String(aString))'}
 	{'return document.createTextNode(String(aString))'}
-
 ! !
 ! !
 
 
 !TagBrush class methodsFor: 'instance creation'!
 !TagBrush class methodsFor: 'instance creation'!
@@ -414,7 +354,6 @@ fromString: aString canvas: aCanvas
     ^self new
     ^self new
 	initializeFromString: aString canvas: aCanvas;
 	initializeFromString: aString canvas: aCanvas;
 	yourself
 	yourself
-
 ! !
 ! !
 
 
 Object subclass: #Widget
 Object subclass: #Widget
@@ -425,29 +364,24 @@ Object subclass: #Widget
 
 
 root
 root
     ^root
     ^root
-
 ! !
 ! !
 
 
 !Widget methodsFor: 'actions'!
 !Widget methodsFor: 'actions'!
 
 
 alert: aString
 alert: aString
     {'alert(aString)'}
     {'alert(aString)'}
-
 !
 !
 
 
 confirm: aString
 confirm: aString
     {'return window.confirm(aString)'}
     {'return window.confirm(aString)'}
-
 !
 !
 
 
 prompt: aString
 prompt: aString
     ^self prompt: aString default: ''
     ^self prompt: aString default: ''
-
 !
 !
 
 
 prompt: aString default: anotherString
 prompt: aString default: anotherString
     {'return window.prompt(aString, anotherString)'}
     {'return window.prompt(aString, anotherString)'}
-
 !
 !
 
 
 update
 update
@@ -456,20 +390,17 @@ update
     canvas root: self root.
     canvas root: self root.
     self root asJQuery empty.
     self root asJQuery empty.
     self renderOn: canvas
     self renderOn: canvas
-
 ! !
 ! !
 
 
 !Widget methodsFor: 'adding'!
 !Widget methodsFor: 'adding'!
 
 
 appendToBrush: aTagBrush
 appendToBrush: aTagBrush
     self appendToJQuery: aTagBrush asJQuery
     self appendToJQuery: aTagBrush asJQuery
-
 !
 !
 
 
 appendToJQuery: aJQuery
 appendToJQuery: aJQuery
     self render.
     self render.
     aJQuery append: self root asJQuery
     aJQuery append: self root asJQuery
-
 ! !
 ! !
 
 
 !Widget methodsFor: 'rendering'!
 !Widget methodsFor: 'rendering'!
@@ -479,12 +410,10 @@ render
     canvas := HTMLCanvas new.
     canvas := HTMLCanvas new.
     root := canvas root.
     root := canvas root.
     self renderOn: canvas
     self renderOn: canvas
-
 !
 !
 
 
 renderOn: html
 renderOn: html
     self
     self
-
 ! !
 ! !
 
 
 TagBrush subclass: #CanvasBrush
 TagBrush subclass: #CanvasBrush
@@ -515,7 +444,6 @@ canvas: aCanvas
 
 
 appendToBrush: aTagBrush
 appendToBrush: aTagBrush
     aTagBrush append: self asString
     aTagBrush append: self asString
-
 ! !
 ! !
 
 
 !BlockClosure methodsFor: '*Canvas'!
 !BlockClosure methodsFor: '*Canvas'!
@@ -528,6 +456,5 @@ appendToBrush: aTagBrush
 
 
 appendToBrush: aTagBrush
 appendToBrush: aTagBrush
     aTagBrush appendString: self
     aTagBrush appendString: self
-
 ! !
 ! !
 
 

+ 1 - 79
st/Compiler.st

@@ -6,26 +6,22 @@ Object subclass: #Node
 
 
 nodes
 nodes
 	^nodes ifNil: [nodes := Array new]
 	^nodes ifNil: [nodes := Array new]
-
 !
 !
 
 
 addNode: aNode
 addNode: aNode
 	self nodes add: aNode
 	self nodes add: aNode
-
 ! !
 ! !
 
 
 !Node methodsFor: 'building'!
 !Node methodsFor: 'building'!
 
 
 nodes: aCollection
 nodes: aCollection
 	nodes := aCollection
 	nodes := aCollection
-
 ! !
 ! !
 
 
 !Node methodsFor: 'visiting'!
 !Node methodsFor: 'visiting'!
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitNode: self
 	aVisitor visitNode: self
-
 ! !
 ! !
 
 
 Node subclass: #MethodNode
 Node subclass: #MethodNode
@@ -36,39 +32,32 @@ Node subclass: #MethodNode
 
 
 selector
 selector
 	^selector
 	^selector
-
 !
 !
 
 
 selector: aString
 selector: aString
 	selector := aString
 	selector := aString
-
 !
 !
 
 
 arguments
 arguments
 	^arguments ifNil: [#()]
 	^arguments ifNil: [#()]
-
 !
 !
 
 
 arguments: aCollection
 arguments: aCollection
 	arguments := aCollection
 	arguments := aCollection
-
 !
 !
 
 
 source
 source
 	^source
 	^source
-
 !
 !
 
 
 source: aString
 source: aString
 	source := aString
 	source := aString
-
 ! !
 ! !
 
 
 !MethodNode methodsFor: 'visiting'!
 !MethodNode methodsFor: 'visiting'!
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitMethodNode: self
 	aVisitor visitMethodNode: self
-
 ! !
 ! !
 
 
 Node subclass: #SendNode
 Node subclass: #SendNode
@@ -79,32 +68,26 @@ Node subclass: #SendNode
 
 
 selector
 selector
 	^selector
 	^selector
-
 !
 !
 
 
 selector: aString
 selector: aString
 	selector := aString
 	selector := aString
-
 !
 !
 
 
 arguments
 arguments
 	^arguments ifNil: [arguments := #()]
 	^arguments ifNil: [arguments := #()]
-
 !
 !
 
 
 arguments: aCollection
 arguments: aCollection
 	arguments := aCollection
 	arguments := aCollection
-
 !
 !
 
 
 receiver
 receiver
 	^receiver
 	^receiver
-
 !
 !
 
 
 receiver: aNode
 receiver: aNode
 	receiver := aNode
 	receiver := aNode
-
 !
 !
 
 
 valueForReceiver: anObject
 valueForReceiver: anObject
@@ -115,7 +98,6 @@ valueForReceiver: anObject
 	    selector: self selector;
 	    selector: self selector;
 	    arguments: self arguments;
 	    arguments: self arguments;
 	    yourself
 	    yourself
-
 !
 !
 
 
 cascadeNodeWithMessages: aCollection
 cascadeNodeWithMessages: aCollection
@@ -128,14 +110,12 @@ cascadeNodeWithMessages: aCollection
 	    receiver: self receiver;
 	    receiver: self receiver;
 	    nodes: (Array with: first), aCollection;
 	    nodes: (Array with: first), aCollection;
 	    yourself
 	    yourself
-
 ! !
 ! !
 
 
 !SendNode methodsFor: 'visiting'!
 !SendNode methodsFor: 'visiting'!
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitSendNode: self
 	aVisitor visitSendNode: self
-
 ! !
 ! !
 
 
 Node subclass: #CascadeNode
 Node subclass: #CascadeNode
@@ -146,19 +126,16 @@ Node subclass: #CascadeNode
 
 
 receiver
 receiver
 	^receiver
 	^receiver
-
 !
 !
 
 
 receiver: aNode
 receiver: aNode
 	receiver := aNode
 	receiver := aNode
-
 ! !
 ! !
 
 
 !CascadeNode methodsFor: 'visiting'!
 !CascadeNode methodsFor: 'visiting'!
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitCascadeNode: self
 	aVisitor visitCascadeNode: self
-
 ! !
 ! !
 
 
 Node subclass: #AssignmentNode
 Node subclass: #AssignmentNode
@@ -169,29 +146,24 @@ Node subclass: #AssignmentNode
 
 
 left
 left
 	^left
 	^left
-
 !
 !
 
 
 left: aNode
 left: aNode
 	left := aNode
 	left := aNode
-
 !
 !
 
 
 right
 right
 	^right
 	^right
-
 !
 !
 
 
 right: aNode
 right: aNode
 	right := aNode
 	right := aNode
-
 ! !
 ! !
 
 
 !AssignmentNode methodsFor: 'visiting'!
 !AssignmentNode methodsFor: 'visiting'!
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitAssignmentNode: self
 	aVisitor visitAssignmentNode: self
-
 ! !
 ! !
 
 
 Node subclass: #BlockNode
 Node subclass: #BlockNode
@@ -202,19 +174,16 @@ Node subclass: #BlockNode
 
 
 parameters
 parameters
 	^parameters ifNil: [parameters := Array new]
 	^parameters ifNil: [parameters := Array new]
-
 !
 !
 
 
 parameters: aCollection
 parameters: aCollection
 	parameters := aCollection
 	parameters := aCollection
-
 ! !
 ! !
 
 
 !BlockNode methodsFor: 'visiting'!
 !BlockNode methodsFor: 'visiting'!
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitBlockNode: self
 	aVisitor visitBlockNode: self
-
 ! !
 ! !
 
 
 Node subclass: #SequenceNode
 Node subclass: #SequenceNode
@@ -225,12 +194,10 @@ Node subclass: #SequenceNode
 
 
 temps
 temps
 	^temps ifNil: [#()]
 	^temps ifNil: [#()]
-
 !
 !
 
 
 temps: aCollection
 temps: aCollection
 	temps := aCollection
 	temps := aCollection
-
 ! !
 ! !
 
 
 !SequenceNode methodsFor: 'testing'!
 !SequenceNode methodsFor: 'testing'!
@@ -240,14 +207,12 @@ asBlockSequenceNode
 	    nodes: self nodes;
 	    nodes: self nodes;
 	    temps: self temps;
 	    temps: self temps;
 	    yourself
 	    yourself
-
 ! !
 ! !
 
 
 !SequenceNode methodsFor: 'visiting'!
 !SequenceNode methodsFor: 'visiting'!
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitSequenceNode: self
 	aVisitor visitSequenceNode: self
-
 ! !
 ! !
 
 
 SequenceNode subclass: #BlockSequenceNode
 SequenceNode subclass: #BlockSequenceNode
@@ -258,7 +223,6 @@ SequenceNode subclass: #BlockSequenceNode
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitBlockSequenceNode: self
 	aVisitor visitBlockSequenceNode: self
-
 ! !
 ! !
 
 
 Node subclass: #ReturnNode
 Node subclass: #ReturnNode
@@ -269,7 +233,6 @@ Node subclass: #ReturnNode
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitReturnNode: self
 	aVisitor visitReturnNode: self
-
 ! !
 ! !
 
 
 Node subclass: #ValueNode
 Node subclass: #ValueNode
@@ -280,19 +243,16 @@ Node subclass: #ValueNode
 
 
 value
 value
 	^value
 	^value
-
 !
 !
 
 
 value: anObject
 value: anObject
 	value := anObject
 	value := anObject
-
 ! !
 ! !
 
 
 !ValueNode methodsFor: 'visiting'!
 !ValueNode methodsFor: 'visiting'!
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitValueNode: self
 	aVisitor visitValueNode: self
-
 ! !
 ! !
 
 
 ValueNode subclass: #VariableNode
 ValueNode subclass: #VariableNode
@@ -303,7 +263,6 @@ ValueNode subclass: #VariableNode
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitVariableNode: self
 	aVisitor visitVariableNode: self
-
 ! !
 ! !
 
 
 VariableNode subclass: #ClassReferenceNode
 VariableNode subclass: #ClassReferenceNode
@@ -314,7 +273,6 @@ VariableNode subclass: #ClassReferenceNode
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitClassReferenceNode: self
 	aVisitor visitClassReferenceNode: self
-
 ! !
 ! !
 
 
 Node subclass: #JSStatementNode
 Node subclass: #JSStatementNode
@@ -325,19 +283,16 @@ Node subclass: #JSStatementNode
 
 
 source
 source
 	^source ifNil: ['']
 	^source ifNil: ['']
-
 !
 !
 
 
 source: aString
 source: aString
 	source := aString
 	source := aString
-
 ! !
 ! !
 
 
 !JSStatementNode methodsFor: 'visiting'!
 !JSStatementNode methodsFor: 'visiting'!
 
 
 accept: aVisitor
 accept: aVisitor
 	aVisitor visitJSStatementNode: self
 	aVisitor visitJSStatementNode: self
-
 ! !
 ! !
 
 
 Object subclass: #NodeVisitor
 Object subclass: #NodeVisitor
@@ -348,67 +303,54 @@ Object subclass: #NodeVisitor
 
 
 visit: aNode
 visit: aNode
 	aNode accept: self
 	aNode accept: self
-
 !
 !
 
 
 visitNode: aNode
 visitNode: aNode
-
 !
 !
 
 
 visitMethodNode: aNode
 visitMethodNode: aNode
 	self visitNode: aNode
 	self visitNode: aNode
-
 !
 !
 
 
 visitSequenceNode: aNode
 visitSequenceNode: aNode
 	self visitNode: aNode
 	self visitNode: aNode
-
 !
 !
 
 
 visitBlockSequenceNode: aNode
 visitBlockSequenceNode: aNode
 	self visitSequenceNode: aNode
 	self visitSequenceNode: aNode
-
 !
 !
 
 
 visitBlockNode: aNode
 visitBlockNode: aNode
 	self visitNode: aNode
 	self visitNode: aNode
-
 !
 !
 
 
 visitReturnNode: aNode
 visitReturnNode: aNode
 	self visitNode: aNode
 	self visitNode: aNode
-
 !
 !
 
 
 visitSendNode: aNode
 visitSendNode: aNode
 	self visitNode: aNode
 	self visitNode: aNode
-
 !
 !
 
 
 visitCascadeNode: aNode
 visitCascadeNode: aNode
 	self visitNode: aNode
 	self visitNode: aNode
-
 !
 !
 
 
 visitValueNode: aNode
 visitValueNode: aNode
 	self visitNode: aNode
 	self visitNode: aNode
-
 !
 !
 
 
 visitVariableNode: aNode
 visitVariableNode: aNode
-
 !
 !
 
 
 visitAssignmentNode: aNode
 visitAssignmentNode: aNode
 	self visitNode: aNode
 	self visitNode: aNode
-
 !
 !
 
 
 visitClassReferenceNode: aNode
 visitClassReferenceNode: aNode
 	self 
 	self 
 	    nextPutAll: 'smalltalk.';
 	    nextPutAll: 'smalltalk.';
 	    nextPutAll: aNode value
 	    nextPutAll: aNode value
-
 !
 !
 
 
 visitJSStatementNode: aNode
 visitJSStatementNode: aNode
@@ -416,7 +358,6 @@ visitJSStatementNode: aNode
 	    nextPutAll: 'function(){';
 	    nextPutAll: 'function(){';
 	    nextPutAll: aNode source;
 	    nextPutAll: aNode source;
 	    nextPutAll: '})()'
 	    nextPutAll: '})()'
-
 ! !
 ! !
 
 
 NodeVisitor subclass: #Compiler
 NodeVisitor subclass: #Compiler
@@ -427,17 +368,14 @@ NodeVisitor subclass: #Compiler
 
 
 parser
 parser
 	^SmalltalkParser new
 	^SmalltalkParser new
-
 !
 !
 
 
 currentClass
 currentClass
 	^currentClass
 	^currentClass
-
 !
 !
 
 
 currentClass: aClass
 currentClass: aClass
 	currentClass := aClass
 	currentClass := aClass
-
 !
 !
 
 
 unknownVariables
 unknownVariables
@@ -472,12 +410,10 @@ classNameFor: aClass
 loadExpression: aString
 loadExpression: aString
 	DoIt addCompiledMethod: (self eval: (self compileExpression: aString)).
 	DoIt addCompiledMethod: (self eval: (self compileExpression: aString)).
 	^DoIt new doIt
 	^DoIt new doIt
-
 !
 !
 
 
 load: aString forClass: aClass
 load: aString forClass: aClass
 	^self eval: (self compile: aString forClass: aClass)
 	^self eval: (self compile: aString forClass: aClass)
-
 !
 !
 
 
 compile: aString forClass: aClass
 compile: aString forClass: aClass
@@ -488,7 +424,6 @@ compile: aString forClass: aClass
 compileExpression: aString
 compileExpression: aString
 	self currentClass: DoIt.
 	self currentClass: DoIt.
 	^self compileNode: (self parseExpression: aString)
 	^self compileNode: (self parseExpression: aString)
-
 !
 !
 
 
 eval: aString
 eval: aString
@@ -497,24 +432,20 @@ eval: aString
 
 
 compile: aString
 compile: aString
 	^self compileNode: (self parse: aString)
 	^self compileNode: (self parse: aString)
-
 !
 !
 
 
 compileNode: aNode
 compileNode: aNode
 	stream := '' writeStream.
 	stream := '' writeStream.
 	self visit: aNode.
 	self visit: aNode.
 	^stream contents
 	^stream contents
-
 !
 !
 
 
 parse: aString
 parse: aString
     ^self parser parse: aString readStream
     ^self parser parse: aString readStream
-
 !
 !
 
 
 parseExpression: aString
 parseExpression: aString
     ^self parse: 'doIt ^[', aString, '] value'
     ^self parse: 'doIt ^[', aString, '] value'
-
 !
 !
 
 
 recompile: aClass
 recompile: aClass
@@ -539,14 +470,12 @@ initialize
 	tempVariables := #().
 	tempVariables := #().
 	messageSends := #().
 	messageSends := #().
 	classReferenced := #()
 	classReferenced := #()
-
 ! !
 ! !
 
 
 !Compiler methodsFor: 'visiting'!
 !Compiler methodsFor: 'visiting'!
 
 
 visit: aNode
 visit: aNode
 	aNode accept: self
 	aNode accept: self
-
 !
 !
 
 
 visitMethodNode: aNode
 visitMethodNode: aNode
@@ -608,7 +537,6 @@ visitBlockNode: aNode
 	stream nextPutAll: '){'.
 	stream nextPutAll: '){'.
 	aNode nodes do: [:each | self visit: each].
 	aNode nodes do: [:each | self visit: each].
 	stream nextPutAll: '})'
 	stream nextPutAll: '})'
-
 !
 !
 
 
 visitSequenceNode: aNode
 visitSequenceNode: aNode
@@ -619,7 +547,6 @@ visitSequenceNode: aNode
 	    self visit: each.
 	    self visit: each.
 	    stream nextPutAll: ';']
 	    stream nextPutAll: ';']
 	    separatedBy: [stream lf]
 	    separatedBy: [stream lf]
-
 !
 !
 
 
 visitBlockSequenceNode: aNode
 visitBlockSequenceNode: aNode
@@ -640,7 +567,6 @@ visitBlockSequenceNode: aNode
 		    self visit: each.
 		    self visit: each.
 		    stream nextPutAll: ';']].
 		    stream nextPutAll: ';']].
 	nestedBlocks := nestedBlocks - 1
 	nestedBlocks := nestedBlocks - 1
-
 !
 !
 
 
 visitReturnNode: aNode
 visitReturnNode: aNode
@@ -698,19 +624,16 @@ visitCascadeNode: aNode
 	stream nextPutAll: '})('.
 	stream nextPutAll: '})('.
 	self visit: aNode receiver.
 	self visit: aNode receiver.
 	stream nextPutAll: ')'
 	stream nextPutAll: ')'
-
 !
 !
 
 
 visitValueNode: aNode
 visitValueNode: aNode
 	stream nextPutAll: aNode value asJavascript
 	stream nextPutAll: aNode value asJavascript
-
 !
 !
 
 
 visitAssignmentNode: aNode
 visitAssignmentNode: aNode
 	self visit: aNode left.
 	self visit: aNode left.
 	stream nextPutAll: '='.
 	stream nextPutAll: '='.
 	self visit: aNode right
 	self visit: aNode right
-
 !
 !
 
 
 visitClassReferenceNode: aNode
 visitClassReferenceNode: aNode
@@ -729,7 +652,6 @@ visitVariableNode: aNode
 			(self knownVariables includes: aNode value) ifFalse: [
 			(self knownVariables includes: aNode value) ifFalse: [
 				unknownVariables add: aNode value].
 				unknownVariables add: aNode value].
 			stream nextPutAll: aNode value]
 			stream nextPutAll: aNode value]
-
 !
 !
 
 
 visitJSStatementNode: aNode
 visitJSStatementNode: aNode
@@ -761,6 +683,6 @@ Object subclass: #DoIt
 
 
 !DoIt methodsFor: ''!
 !DoIt methodsFor: ''!
 
 
-doIt ^[ChunkExporter new exportCategory: 'Parser' ] value
+doIt ^['abc' trimLeft: 'az'] value
 ! !
 ! !
 
 

+ 0 - 4
st/Examples.st

@@ -19,7 +19,6 @@ decrease
 initialize
 initialize
     super initialize.
     super initialize.
     count := 0
     count := 0
-
 ! !
 ! !
 
 
 !Counter methodsFor: 'rendering'!
 !Counter methodsFor: 'rendering'!
@@ -34,7 +33,6 @@ renderOn: html
     html button
     html button
 	with: '--';
 	with: '--';
 	onClick: [self decrease]
 	onClick: [self decrease]
-
 ! !
 ! !
 
 
 Widget subclass: #Tetris
 Widget subclass: #Tetris
@@ -57,7 +55,6 @@ squares
 
 
 gluePiece: aPiece
 gluePiece: aPiece
 	aPiece glueOn: self
 	aPiece glueOn: self
-	
 !
 !
 
 
 rows
 rows
@@ -83,7 +80,6 @@ nextStep
 		ifTrue: [movingPiece position: movingPiece position + (0@1)]
 		ifTrue: [movingPiece position: movingPiece position + (0@1)]
 		ifFalse: [self newPiece].
 		ifFalse: [self newPiece].
 	self redraw
 	self redraw
-	
 !
 !
 
 
 redraw
 redraw

+ 0 - 111
st/IDE.st

@@ -6,29 +6,24 @@ Widget subclass: #TabManager
 
 
 tabs
 tabs
     ^tabs ifNil: [tabs := Array new]
     ^tabs ifNil: [tabs := Array new]
-
 ! !
 ! !
 
 
 !TabManager methodsFor: 'actions'!
 !TabManager methodsFor: 'actions'!
 
 
 updateBodyMargin
 updateBodyMargin
     self setBodyMargin: '#jtalk' asJQuery height + 27
     self setBodyMargin: '#jtalk' asJQuery height + 27
-
 !
 !
 
 
 updatePosition
 updatePosition
     {'jQuery(''#jtalk'').css(''top'', '''''').css(''bottom'', ''27px'');'}
     {'jQuery(''#jtalk'').css(''top'', '''''').css(''bottom'', ''27px'');'}
-
 !
 !
 
 
 removeBodyMargin
 removeBodyMargin
     self setBodyMargin: 0
     self setBodyMargin: 0
-
 !
 !
 
 
 setBodyMargin: anInteger
 setBodyMargin: anInteger
     '.jtalkBody' asJQuery cssAt: 'margin-bottom' put: anInteger asString, 'px'
     '.jtalkBody' asJQuery cssAt: 'margin-bottom' put: anInteger asString, 'px'
-
 !
 !
 
 
 onResize: aBlock
 onResize: aBlock
@@ -37,12 +32,10 @@ onResize: aBlock
 	resize: aBlock,
 	resize: aBlock,
 	minHeight: 230
 	minHeight: 230
 });'}
 });'}
-
 !
 !
 
 
 onWindowResize: aBlock
 onWindowResize: aBlock
     {'jQuery(window).resize(aBlock)'}
     {'jQuery(window).resize(aBlock)'}
-
 !
 !
 
 
 open
 open
@@ -53,7 +46,6 @@ open
 	self updateBodyMargin.
 	self updateBodyMargin.
 	selectedTab root asJQuery show.
 	selectedTab root asJQuery show.
 	opened := true]
 	opened := true]
-
 !
 !
 
 
 close
 close
@@ -63,12 +55,10 @@ close
 	self removeBodyMargin.
 	self removeBodyMargin.
 	'body' asJQuery removeClass: 'jtalkBody'.
 	'body' asJQuery removeClass: 'jtalkBody'.
 	opened := false]
 	opened := false]
-
 !
 !
 
 
 newBrowserTab
 newBrowserTab
     Browser open
     Browser open
-
 !
 !
 
 
 selectTab: aWidget
 selectTab: aWidget
@@ -78,7 +68,6 @@ selectTab: aWidget
 	each root asJQuery hide].
 	each root asJQuery hide].
     aWidget root asJQuery show.
     aWidget root asJQuery show.
     self update
     self update
-
 !
 !
 
 
 closeTab: aWidget
 closeTab: aWidget
@@ -86,7 +75,6 @@ closeTab: aWidget
     self selectTab: self tabs last.
     self selectTab: self tabs last.
     aWidget root asJQuery remove.
     aWidget root asJQuery remove.
     self update
     self update
-
 ! !
 ! !
 
 
 !TabManager methodsFor: 'adding/Removing'!
 !TabManager methodsFor: 'adding/Removing'!
@@ -95,13 +83,11 @@ addTab: aWidget
     self tabs add: aWidget.
     self tabs add: aWidget.
     '#jtalk' asJQuery append: aWidget.
     '#jtalk' asJQuery append: aWidget.
     aWidget root asJQuery hide
     aWidget root asJQuery hide
-
 !
 !
 
 
 removeTab: aWidget
 removeTab: aWidget
     self tabs remove: aWidget.
     self tabs remove: aWidget.
     self update
     self update
-
 ! !
 ! !
 
 
 !TabManager methodsFor: 'initialization'!
 !TabManager methodsFor: 'initialization'!
@@ -120,7 +106,6 @@ initialize
     self 
     self 
 	onResize: [self updateBodyMargin; updatePosition];
 	onResize: [self updateBodyMargin; updatePosition];
 	onWindowResize: [self updatePosition]
 	onWindowResize: [self updatePosition]
-
 ! !
 ! !
 
 
 !TabManager methodsFor: 'rendering'!
 !TabManager methodsFor: 'rendering'!
@@ -139,7 +124,6 @@ renderOn: html
 		class: 'newtab';
 		class: 'newtab';
 		with: ' + ';
 		with: ' + ';
 		onClick: [self newBrowserTab]]
 		onClick: [self newBrowserTab]]
-
 !
 !
 
 
 renderTabFor: aWidget on: html
 renderTabFor: aWidget on: html
@@ -156,7 +140,6 @@ renderTabFor: aWidget on: html
 		class: 'close';
 		class: 'close';
 		with: 'x';
 		with: 'x';
 		onClick: [self closeTab: aWidget]]]
 		onClick: [self closeTab: aWidget]]]
-
 ! !
 ! !
 
 
 TabManager class instanceVariableNames: 'current'!
 TabManager class instanceVariableNames: 'current'!
@@ -165,12 +148,10 @@ TabManager class instanceVariableNames: 'current'!
 
 
 current
 current
     ^current ifNil: [current := super new]
     ^current ifNil: [current := super new]
-
 !
 !
 
 
 new
 new
     self shouldNotImplement
     self shouldNotImplement
-
 ! !
 ! !
 
 
 Widget subclass: #TabWidget
 Widget subclass: #TabWidget
@@ -181,7 +162,6 @@ Widget subclass: #TabWidget
 
 
 label
 label
     self subclassResponsibility
     self subclassResponsibility
-
 ! !
 ! !
 
 
 !TabWidget methodsFor: 'actions'!
 !TabWidget methodsFor: 'actions'!
@@ -190,7 +170,6 @@ open
     TabManager current
     TabManager current
 	addTab: self;
 	addTab: self;
 	selectTab: self
 	selectTab: self
-
 ! !
 ! !
 
 
 !TabWidget methodsFor: 'rendering'!
 !TabWidget methodsFor: 'rendering'!
@@ -205,29 +184,24 @@ renderOn: html
 	    html div
 	    html div
 		class: 'jt_buttons';
 		class: 'jt_buttons';
 		with: [self renderButtonsOn: html]]
 		with: [self renderButtonsOn: html]]
-
 !
 !
 
 
 renderBoxOn: html
 renderBoxOn: html
-
 !
 !
 
 
 renderButtonsOn: html
 renderButtonsOn: html
-
 ! !
 ! !
 
 
 !TabWidget methodsFor: 'testing'!
 !TabWidget methodsFor: 'testing'!
 
 
 canBeClosed
 canBeClosed
     ^false
     ^false
-
 ! !
 ! !
 
 
 !TabWidget class methodsFor: 'instance creation'!
 !TabWidget class methodsFor: 'instance creation'!
 
 
 open
 open
     ^self new open
     ^self new open
-
 ! !
 ! !
 
 
 TabWidget subclass: #Workspace
 TabWidget subclass: #Workspace
@@ -238,32 +212,26 @@ TabWidget subclass: #Workspace
 
 
 label
 label
     ^'[Workspace]'
     ^'[Workspace]'
-
 !
 !
 
 
 selection
 selection
     {'return document.selection'}
     {'return document.selection'}
-
 !
 !
 
 
 selectionStart
 selectionStart
     {'return jQuery(''.jt_workspace'')[0].selectionStart'}
     {'return jQuery(''.jt_workspace'')[0].selectionStart'}
-
 !
 !
 
 
 selectionEnd
 selectionEnd
     {'return jQuery(''.jt_workspace'')[0].selectionEnd'}
     {'return jQuery(''.jt_workspace'')[0].selectionEnd'}
-
 !
 !
 
 
 selectionStart: anInteger
 selectionStart: anInteger
     {'jQuery(''.jt_workspace'')[0].selectionStart = anInteger'}
     {'jQuery(''.jt_workspace'')[0].selectionStart = anInteger'}
-
 !
 !
 
 
 selectionEnd: anInteger
 selectionEnd: anInteger
     {'jQuery(''.jt_workspace'')[0].selectionEnd = anInteger'}
     {'jQuery(''.jt_workspace'')[0].selectionEnd = anInteger'}
-
 !
 !
 
 
 currentLine
 currentLine
@@ -276,7 +244,6 @@ currentLine
 	endLine >= self selectionStart ifTrue: [
 	endLine >= self selectionStart ifTrue: [
 	    self selectionEnd: endLine.
 	    self selectionEnd: endLine.
 	    ^each]]
 	    ^each]]
-
 ! !
 ! !
 
 
 !Workspace methodsFor: 'actions'!
 !Workspace methodsFor: 'actions'!
@@ -299,12 +266,10 @@ handleKeyDown: anEvent
 			return false;
 			return false;
 		}
 		}
 	}'}
 	}'}
-
 !
 !
 
 
 clearWorkspace
 clearWorkspace
     textarea asJQuery val: ''
     textarea asJQuery val: ''
-
 !
 !
 
 
 doIt
 doIt
@@ -319,7 +284,6 @@ doIt
 
 
 printIt
 printIt
     self print: self doIt printString
     self print: self doIt printString
-
 !
 !
 
 
 print: aString
 print: aString
@@ -331,7 +295,6 @@ print: aString
 	(textarea asJQuery val copyFrom: start + 1 to: textarea asJQuery val size)).
 	(textarea asJQuery val copyFrom: start + 1 to: textarea asJQuery val size)).
     self selectionStart: start.
     self selectionStart: start.
     self selectionEnd: start + aString size + 2
     self selectionEnd: start + aString size + 2
-
 !
 !
 
 
 eval: aString
 eval: aString
@@ -341,12 +304,10 @@ eval: aString
     node isParseFailure ifTrue: [
     node isParseFailure ifTrue: [
 	^self alert: node reason, ', position: ', node position].
 	^self alert: node reason, ', position: ', node position].
     ^compiler loadExpression: aString
     ^compiler loadExpression: aString
-
 !
 !
 
 
 inspectIt
 inspectIt
     self doIt inspect
     self doIt inspect
-
 ! !
 ! !
 
 
 !Workspace methodsFor: 'rendering'!
 !Workspace methodsFor: 'rendering'!
@@ -358,7 +319,6 @@ renderBoxOn: html
     textarea 
     textarea 
 	class: 'jt_workspace';
 	class: 'jt_workspace';
 	at: 'spellcheck' put: 'false'
 	at: 'spellcheck' put: 'false'
-
 !
 !
 
 
 renderButtonsOn: html
 renderButtonsOn: html
@@ -377,7 +337,6 @@ renderButtonsOn: html
     html button
     html button
 	with: 'Clear workspace';
 	with: 'Clear workspace';
 	onClick: [self clearWorkspace]
 	onClick: [self clearWorkspace]
-
 ! !
 ! !
 
 
 TabWidget subclass: #Transcript
 TabWidget subclass: #Transcript
@@ -388,25 +347,20 @@ TabWidget subclass: #Transcript
 
 
 label
 label
     ^'[Transcript]'
     ^'[Transcript]'
-
 ! !
 ! !
 
 
 !Transcript methodsFor: 'actions'!
 !Transcript methodsFor: 'actions'!
 
 
 show: anObject
 show: anObject
     textarea asJQuery val: textarea asJQuery val, anObject asString.
     textarea asJQuery val: textarea asJQuery val, anObject asString.
-
-
 !
 !
 
 
 cr
 cr
     textarea asJQuery val: textarea asJQuery val, String cr.
     textarea asJQuery val: textarea asJQuery val, String cr.
-
 !
 !
 
 
 clear
 clear
     textarea asJQuery val: ''
     textarea asJQuery val: ''
-
 ! !
 ! !
 
 
 !Transcript methodsFor: 'rendering'!
 !Transcript methodsFor: 'rendering'!
@@ -417,14 +371,12 @@ renderBoxOn: html
     textarea 
     textarea 
 	class: 'jt_transcript';
 	class: 'jt_transcript';
 	at: 'spellcheck' put: 'false'
 	at: 'spellcheck' put: 'false'
-
 !
 !
 
 
 renderButtonsOn: html
 renderButtonsOn: html
     html button
     html button
 	with: 'Clear transcript';
 	with: 'Clear transcript';
 	onClick: [self clear]
 	onClick: [self clear]
-
 ! !
 ! !
 
 
 Transcript class instanceVariableNames: 'current'!
 Transcript class instanceVariableNames: 'current'!
@@ -433,34 +385,28 @@ Transcript class instanceVariableNames: 'current'!
 
 
 open
 open
     self current open
     self current open
-
 !
 !
 
 
 new
 new
     self shouldNotImplement
     self shouldNotImplement
-
 !
 !
 
 
 current
 current
     ^current ifNil: [current := super new]
     ^current ifNil: [current := super new]
-
 ! !
 ! !
 
 
 !Transcript class methodsFor: 'printing'!
 !Transcript class methodsFor: 'printing'!
 
 
 show: anObject
 show: anObject
     self current show: anObject
     self current show: anObject
-
 !
 !
 
 
 cr
 cr
     self current show: String cr
     self current show: String cr
-
 !
 !
 
 
 clear
 clear
     self current clear
     self current clear
-
 ! !
 ! !
 
 
 TabWidget subclass: #Browser
 TabWidget subclass: #Browser
@@ -473,7 +419,6 @@ label
     ^selectedClass 
     ^selectedClass 
 	ifNil: ['Browser (nil)']
 	ifNil: ['Browser (nil)']
 	ifNotNil: [selectedClass name]
 	ifNotNil: [selectedClass name]
-
 !
 !
 
 
 categories
 categories
@@ -483,14 +428,12 @@ categories
 	(categories includes: each category) ifFalse: [
 	(categories includes: each category) ifFalse: [
 	    categories add: each category]].
 	    categories add: each category]].
     ^categories sort
     ^categories sort
-
 !
 !
 
 
 classes
 classes
     ^(Smalltalk current classes 
     ^(Smalltalk current classes 
 	select: [:each | each category = selectedCategory])
 	select: [:each | each category = selectedCategory])
 	sort: [:a :b | a name > b name]
 	sort: [:a :b | a name > b name]
-
 !
 !
 
 
 protocols
 protocols
@@ -521,7 +464,6 @@ methods
 	ifNotNil: [
 	ifNotNil: [
 	    klass methodDictionary values select: [:each |
 	    klass methodDictionary values select: [:each |
 		each category = selectedProtocol]]) sort: [:a :b | a selector > b selector]
 		each category = selectedProtocol]]) sort: [:a :b | a selector > b selector]
-
 !
 !
 
 
 source
 source
@@ -532,14 +474,12 @@ source
     ^selectedClass
     ^selectedClass
 	ifNil: ['']
 	ifNil: ['']
 	ifNotNil: [self classCommentSource]
 	ifNotNil: [self classCommentSource]
-
 !
 !
 
 
 methodSource
 methodSource
     ^selectedMethod
     ^selectedMethod
 	ifNil: [self dummyMethodSource]
 	ifNil: [self dummyMethodSource]
 	ifNotNil: [selectedMethod source]
 	ifNotNil: [selectedMethod source]
-
 !
 !
 
 
 dummyMethodSource
 dummyMethodSource
@@ -548,14 +488,12 @@ dummyMethodSource
 
 
 	| temporary variable names |
 	| temporary variable names |
 	statements'
 	statements'
-
 !
 !
 
 
 declarationSource
 declarationSource
     ^selectedTab = #instance
     ^selectedTab = #instance
 	ifTrue: [self classDeclarationSource]
 	ifTrue: [self classDeclarationSource]
 	ifFalse: [self metaclassDeclarationSource]
 	ifFalse: [self metaclassDeclarationSource]
-
 !
 !
 
 
 classDeclarationSource
 classDeclarationSource
@@ -577,7 +515,6 @@ classDeclarationSource
 	    nextPutAll: selectedClass category;
 	    nextPutAll: selectedClass category;
 	    nextPutAll: ''''].
 	    nextPutAll: ''''].
     ^stream contents
     ^stream contents
-
 !
 !
 
 
 metaclassDeclarationSource
 metaclassDeclarationSource
@@ -593,12 +530,10 @@ metaclassDeclarationSource
 	    separatedBy: [stream nextPutAll: ' '].
 	    separatedBy: [stream nextPutAll: ' '].
 	stream nextPutAll: ''''].
 	stream nextPutAll: ''''].
     ^stream contents
     ^stream contents
-
 !
 !
 
 
 classCommentSource
 classCommentSource
     ^selectedClass comment
     ^selectedClass comment
-
 ! !
 ! !
 
 
 !Browser methodsFor: 'actions'!
 !Browser methodsFor: 'actions'!
@@ -606,34 +541,28 @@ classCommentSource
 enableSaveButton
 enableSaveButton
     saveButton removeAt: 'disabled'.
     saveButton removeAt: 'disabled'.
     unsavedChanges := true
     unsavedChanges := true
-
 !
 !
 
 
 disableSaveButton
 disableSaveButton
     saveButton ifNotNil: [
     saveButton ifNotNil: [
 	saveButton at: 'disabled' put: true].
 	saveButton at: 'disabled' put: true].
     unsavedChanges := false
     unsavedChanges := false
-
 !
 !
 
 
 hideClassButtons
 hideClassButtons
     classButtons asJQuery hide
     classButtons asJQuery hide
-
 !
 !
 
 
 showClassButtons
 showClassButtons
     classButtons asJQuery show
     classButtons asJQuery show
-
 !
 !
 
 
 hideMethodButtons
 hideMethodButtons
     methodButtons asJQuery hide
     methodButtons asJQuery hide
-
 !
 !
 
 
 showMethodButtons
 showMethodButtons
     methodButtons asJQuery show
     methodButtons asJQuery show
-
 !
 !
 
 
 compile
 compile
@@ -644,19 +573,16 @@ compile
     (selectedProtocol notNil or: [selectedMethod notNil])
     (selectedProtocol notNil or: [selectedMethod notNil])
 	ifFalse: [self compileDefinition]
 	ifFalse: [self compileDefinition]
 	ifTrue: [self compileMethodDefinition]
 	ifTrue: [self compileMethodDefinition]
-
 !
 !
 
 
 compileClassComment
 compileClassComment
     selectedClass comment: sourceTextarea asJQuery val
     selectedClass comment: sourceTextarea asJQuery val
-
 !
 !
 
 
 compileMethodDefinition
 compileMethodDefinition
     selectedTab = #instance
     selectedTab = #instance
 	ifTrue: [self compileMethodDefinitionFor: selectedClass]
 	ifTrue: [self compileMethodDefinitionFor: selectedClass]
 	ifFalse: [self compileMethodDefinitionFor: selectedClass class]
 	ifFalse: [self compileMethodDefinitionFor: selectedClass class]
-
 !
 !
 
 
 compileMethodDefinitionFor: aClass
 compileMethodDefinitionFor: aClass
@@ -677,7 +603,6 @@ compileMethodDefinitionFor: aClass
     aClass addCompiledMethod: method.
     aClass addCompiledMethod: method.
     self updateMethodsList.
     self updateMethodsList.
     self selectMethod: method
     self selectMethod: method
-
 !
 !
 
 
 compileDefinition
 compileDefinition
@@ -686,7 +611,6 @@ compileDefinition
     self 
     self 
 	updateCategoriesList;
 	updateCategoriesList;
 	updateClassesList
 	updateClassesList
-
 !
 !
 
 
 commitCategory
 commitCategory
@@ -701,14 +625,12 @@ commitCategory
 	    at: 'data' put: (ChunkExporter new exportCategory: selectedCategory);
 	    at: 'data' put: (ChunkExporter new exportCategory: selectedCategory);
 	    at: 'error' put: [self alert: 'Commit failed!!'];
 	    at: 'error' put: [self alert: 'Commit failed!!'];
 	    send]
 	    send]
-
 !
 !
 
 
 cancelChanges
 cancelChanges
     ^unsavedChanges 
     ^unsavedChanges 
 	ifTrue: [self confirm: 'Cancel changes?']
 	ifTrue: [self confirm: 'Cancel changes?']
 	ifFalse: [true]
 	ifFalse: [true]
-
 !
 !
 
 
 removeClass
 removeClass
@@ -716,7 +638,6 @@ removeClass
 	ifTrue: [
 	ifTrue: [
 	    Smalltalk current basicDelete: selectedClass name.
 	    Smalltalk current basicDelete: selectedClass name.
 	    self selectClass: nil]
 	    self selectClass: nil]
-
 !
 !
 
 
 removeMethod
 removeMethod
@@ -727,7 +648,6 @@ removeMethod
 			ifTrue: [selectedClass removeCompiledMethod: selectedMethod]
 			ifTrue: [selectedClass removeCompiledMethod: selectedMethod]
 			ifFalse: [selectedClass class removeCompiledMethod: selectedMethod].
 			ifFalse: [selectedClass class removeCompiledMethod: selectedMethod].
 		self selectMethod: nil]]
 		self selectMethod: nil]]
-
 !
 !
 
 
 setMethodProtocol: aString
 setMethodProtocol: aString
@@ -742,7 +662,6 @@ setMethodProtocol: aString
 		    updateProtocolsList;
 		    updateProtocolsList;
 		    updateMethodsList;
 		    updateMethodsList;
 		    updateSourceAndButtons]]
 		    updateSourceAndButtons]]
-
 !
 !
 
 
 addNewProtocol
 addNewProtocol
@@ -751,7 +670,6 @@ addNewProtocol
     newProtocol notEmpty ifTrue: [
     newProtocol notEmpty ifTrue: [
 	selectedMethod category: newProtocol.
 	selectedMethod category: newProtocol.
 	self setMethodProtocol: newProtocol]
 	self setMethodProtocol: newProtocol]
-
 !
 !
 
 
 selectCategory: aCategory
 selectCategory: aCategory
@@ -764,7 +682,6 @@ selectCategory: aCategory
 	    updateProtocolsList;
 	    updateProtocolsList;
 	    updateMethodsList;
 	    updateMethodsList;
 	    updateSourceAndButtons]
 	    updateSourceAndButtons]
-
 !
 !
 
 
 selectClass: aClass
 selectClass: aClass
@@ -776,7 +693,6 @@ selectClass: aClass
 	    updateProtocolsList;
 	    updateProtocolsList;
 	    updateMethodsList;
 	    updateMethodsList;
 	    updateSourceAndButtons]
 	    updateSourceAndButtons]
-
 !
 !
 
 
 selectProtocol: aString
 selectProtocol: aString
@@ -787,7 +703,6 @@ selectProtocol: aString
 	    updateProtocolsList;
 	    updateProtocolsList;
 	    updateMethodsList;
 	    updateMethodsList;
 	    updateSourceAndButtons]
 	    updateSourceAndButtons]
-
 !
 !
 
 
 selectMethod: aMethod
 selectMethod: aMethod
@@ -797,7 +712,6 @@ selectMethod: aMethod
 	    updateProtocolsList;
 	    updateProtocolsList;
 	    updateMethodsList;
 	    updateMethodsList;
 	    updateSourceAndButtons]
 	    updateSourceAndButtons]
-
 !
 !
 
 
 selectTab: aString
 selectTab: aString
@@ -805,7 +719,6 @@ selectTab: aString
 	selectedTab := aString.
 	selectedTab := aString.
 	self selectProtocol: nil.
 	self selectProtocol: nil.
 	self updateTabsList]
 	self updateTabsList]
-
 !
 !
 
 
 renameClass
 renameClass
@@ -816,7 +729,6 @@ renameClass
 	self 
 	self 
 		updateClassesList;
 		updateClassesList;
 		updateSourceAndButtons]
 		updateSourceAndButtons]
-
 !
 !
 
 
 addInstanceVariableNamed: aString toClass: aClass
 addInstanceVariableNamed: aString toClass: aClass
@@ -838,7 +750,6 @@ initialize
     super initialize.
     super initialize.
     selectedTab := #instance.
     selectedTab := #instance.
     unsavedChanges := false
     unsavedChanges := false
-
 ! !
 ! !
 
 
 !Browser methodsFor: 'rendering'!
 !Browser methodsFor: 'rendering'!
@@ -848,7 +759,6 @@ renderBoxOn: html
 	renderTopPanelOn: html;
 	renderTopPanelOn: html;
 	renderTabsOn: html;
 	renderTabsOn: html;
 	renderBottomPanelOn: html
 	renderBottomPanelOn: html
-
 !
 !
 
 
 renderTopPanelOn: html
 renderTopPanelOn: html
@@ -870,13 +780,11 @@ renderTopPanelOn: html
 		updateProtocolsList;
 		updateProtocolsList;
 		updateMethodsList.
 		updateMethodsList.
 	    html div class: 'jt_clear']
 	    html div class: 'jt_clear']
-
 !
 !
 
 
 renderTabsOn: html
 renderTabsOn: html
     tabsList := html ul class: 'jt_tabs'.
     tabsList := html ul class: 'jt_tabs'.
     self updateTabsList.
     self updateTabsList.
-
 !
 !
 
 
 renderBottomPanelOn: html
 renderBottomPanelOn: html
@@ -888,7 +796,6 @@ renderBottomPanelOn: html
 		class: 'source';
 		class: 'source';
 		at: 'spellcheck' put: 'false'.
 		at: 'spellcheck' put: 'false'.
 	    sourceTextarea asJQuery call: 'tabby']
 	    sourceTextarea asJQuery call: 'tabby']
-
 !
 !
 
 
 renderButtonsOn: html
 renderButtonsOn: html
@@ -899,14 +806,12 @@ renderButtonsOn: html
     methodButtons := html span.
     methodButtons := html span.
     classButtons := html span.
     classButtons := html span.
     self updateSourceAndButtons
     self updateSourceAndButtons
-
 ! !
 ! !
 
 
 !Browser methodsFor: 'testing'!
 !Browser methodsFor: 'testing'!
 
 
 canBeClosed
 canBeClosed
     ^true
     ^true
-
 ! !
 ! !
 
 
 !Browser methodsFor: 'updating'!
 !Browser methodsFor: 'updating'!
@@ -923,7 +828,6 @@ updateCategoriesList
 	    li
 	    li
 		with: label;
 		with: label;
 		onClick: [self selectCategory: each]]]
 		onClick: [self selectCategory: each]]]
-
 !
 !
 
 
 updateClassesList
 updateClassesList
@@ -936,7 +840,6 @@ updateClassesList
 	    li
 	    li
 		with: each name;
 		with: each name;
 		onClick: [self selectClass: each]]]
 		onClick: [self selectClass: each]]]
-
 !
 !
 
 
 updateProtocolsList
 updateProtocolsList
@@ -948,7 +851,6 @@ updateProtocolsList
 	    li 
 	    li 
 		with: each;
 		with: each;
 		onClick: [self selectProtocol: each]]]
 		onClick: [self selectProtocol: each]]]
-
 !
 !
 
 
 updateMethodsList
 updateMethodsList
@@ -960,7 +862,6 @@ updateMethodsList
 	    li
 	    li
 		with: each selector;
 		with: each selector;
 		onClick: [self selectMethod: each]]]
 		onClick: [self selectMethod: each]]]
-
 !
 !
 
 
 updateTabsList
 updateTabsList
@@ -980,7 +881,6 @@ updateTabsList
 	li
 	li
 	    with: 'Comment';
 	    with: 'Comment';
 	    onClick: [self selectTab: #comment]]
 	    onClick: [self selectTab: #comment]]
-
 !
 !
 
 
 updateSourceAndButtons
 updateSourceAndButtons
@@ -1032,7 +932,6 @@ updateSourceAndButtons
 	    		self hideClassButtons.
 	    		self hideClassButtons.
 	    		self showMethodButtons].
 	    		self showMethodButtons].
     	sourceTextarea asJQuery val: self source
     	sourceTextarea asJQuery val: self source
-
 ! !
 ! !
 
 
 !Browser class methodsFor: 'accessing'!
 !Browser class methodsFor: 'accessing'!
@@ -1052,12 +951,10 @@ openOn: aClass
 	open;
 	open;
 	selectCategory: aClass category;
 	selectCategory: aClass category;
 	selectClass: aClass
 	selectClass: aClass
-
 !
 !
 
 
 open
 open
     self new open
     self new open
-
 ! !
 ! !
 
 
 TabWidget subclass: #Inspector
 TabWidget subclass: #Inspector
@@ -1127,7 +1024,6 @@ renderTopPanelOn: html
 		updateVariablesList;
 		updateVariablesList;
 		updateValueTextarea.
 		updateValueTextarea.
 	    html div class: 'jt_clear']
 	    html div class: 'jt_clear']
-
 !
 !
 
 
 renderBottomPanelOn: html
 renderBottomPanelOn: html
@@ -1138,7 +1034,6 @@ renderBottomPanelOn: html
 		class: 'source';
 		class: 'source';
 		at: 'spellcheck' put: 'false'.
 		at: 'spellcheck' put: 'false'.
 	    workspaceTextarea asJQuery call: 'tabby']
 	    workspaceTextarea asJQuery call: 'tabby']
-
 !
 !
 
 
 renderButtonsOn: html
 renderButtonsOn: html
@@ -1149,7 +1044,6 @@ renderButtonsOn: html
 		with: 'Dive'; 
 		with: 'Dive'; 
 		onClick: [self dive].
 		onClick: [self dive].
 	self updateButtons
 	self updateButtons
-	
 ! !
 ! !
 
 
 !Inspector methodsFor: 'testing'!
 !Inspector methodsFor: 'testing'!
@@ -1189,7 +1083,6 @@ updateButtons
 	(self selectedVariable notNil and: [(self variables at: self selectedVariable) notNil])
 	(self selectedVariable notNil and: [(self variables at: self selectedVariable) notNil])
 		ifFalse: [diveButton at: 'disabled' put: true] 
 		ifFalse: [diveButton at: 'disabled' put: true] 
 		ifTrue: [diveButton removeAt: 'disabled']
 		ifTrue: [diveButton removeAt: 'disabled']
-		
 ! !
 ! !
 
 
 !Inspector class methodsFor: 'instance creation'!
 !Inspector class methodsFor: 'instance creation'!
@@ -1394,8 +1287,6 @@ inspectOn: anInspector
 	anInspector 
 	anInspector 
 		setLabel: self printString;
 		setLabel: self printString;
 		setVariables: variables
 		setVariables: variables
-	
-	
 ! !
 ! !
 
 
 !Date methodsFor: '*IDE'!
 !Date methodsFor: '*IDE'!
@@ -1414,8 +1305,6 @@ inspectOn: anInspector
 	anInspector 
 	anInspector 
 		setLabel: self printString;
 		setLabel: self printString;
 		setVariables: variables
 		setVariables: variables
-	
-	
 ! !
 ! !
 
 
 !Collection methodsFor: '*IDE'!
 !Collection methodsFor: '*IDE'!

+ 1 - 51
st/JQuery.st

@@ -7,25 +7,21 @@ Object subclass: #JQuery
 append: anObject
 append: anObject
     "Append anObject at the end of the element."
     "Append anObject at the end of the element."
     anObject appendToJQuery: self
     anObject appendToJQuery: self
-
 !
 !
 
 
 appendElement: anElement
 appendElement: anElement
     "Append anElement at the end of the element.
     "Append anElement at the end of the element.
      Dont't call this method directly, use #append: instead"
      Dont't call this method directly, use #append: instead"
     self call: 'append' withArgument: anElement
     self call: 'append' withArgument: anElement
-
 !
 !
 
 
 appendToJQuery: aJQuery
 appendToJQuery: aJQuery
     aJQuery appendElement: jquery
     aJQuery appendElement: jquery
-
 !
 !
 
 
 contents: anObject
 contents: anObject
     self empty.
     self empty.
     self append: anObject
     self append: anObject
-
 !
 !
 
 
 empty
 empty
@@ -37,24 +33,20 @@ empty
 removeAttribute: aString
 removeAttribute: aString
     "Remove an attribute from each element in the set of matched elements."
     "Remove an attribute from each element in the set of matched elements."
     ^self call: 'removeAttribute' withArgument: aString
     ^self call: 'removeAttribute' withArgument: aString
-
 !
 !
 
 
 attr: aString
 attr: aString
     "Get the value of an attribute for the first element in the set of matched elements."
     "Get the value of an attribute for the first element in the set of matched elements."
     ^self call: 'attr' withArgument: aString
     ^self call: 'attr' withArgument: aString
-
 !
 !
 
 
 val
 val
     "Get the current value of the first element in the set of matched elements."
     "Get the current value of the first element in the set of matched elements."
     ^self call: 'val'
     ^self call: 'val'
-
 !
 !
 
 
 val: aString
 val: aString
     self call: 'val' withArgument: aString
     self call: 'val' withArgument: aString
-
 ! !
 ! !
 
 
 !JQuery methodsFor: 'css'!
 !JQuery methodsFor: 'css'!
@@ -65,158 +57,131 @@ cssAt: aString
 
 
 cssAt: aString put: anotherString
 cssAt: aString put: anotherString
     {'self[''@jquery''].css(aString, anotherString)'}
     {'self[''@jquery''].css(aString, anotherString)'}
-
 !
 !
 
 
 addClass: aString
 addClass: aString
     "Adds the specified class(es) to each of the set of matched elements."
     "Adds the specified class(es) to each of the set of matched elements."
     self call: 'addClass' withArgument: aString
     self call: 'addClass' withArgument: aString
-
 !
 !
 
 
 removeClass: aString
 removeClass: aString
     "Remove a single class, multiple classes, or all classes from each element in the set of matched elements."
     "Remove a single class, multiple classes, or all classes from each element in the set of matched elements."
     self call: 'removeClass' withArgument: aString
     self call: 'removeClass' withArgument: aString
-
 !
 !
 
 
 toggleClass: aString
 toggleClass: aString
     "Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument."
     "Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument."
     self call: 'toggleClass' withArgument: aString
     self call: 'toggleClass' withArgument: aString
-
 !
 !
 
 
 height 
 height 
     "Get the current computed height for the first element in the set of matched elements."
     "Get the current computed height for the first element in the set of matched elements."
     ^self call: 'height'
     ^self call: 'height'
-
 !
 !
 
 
 height: anInteger
 height: anInteger
     self call: 'height' withArgument: anInteger
     self call: 'height' withArgument: anInteger
-
 !
 !
 
 
 width: anInteger
 width: anInteger
     self call: 'width' withArgument: anInteger
     self call: 'width' withArgument: anInteger
-
 !
 !
 
 
 width
 width
     "Get the current computed width for the first element in the set of matched elements."
     "Get the current computed width for the first element in the set of matched elements."
     ^self call: 'width'
     ^self call: 'width'
-
 !
 !
 
 
 innerHeight
 innerHeight
     "Get the current computed height for the first element in the set of matched elements, including padding but not border."
     "Get the current computed height for the first element in the set of matched elements, including padding but not border."
     ^self call: 'innerHeight'
     ^self call: 'innerHeight'
-
 !
 !
 
 
 innerWidth
 innerWidth
     "Get the current computed width for the first element in the set of matched elements, including padding but not border."
     "Get the current computed width for the first element in the set of matched elements, including padding but not border."
     ^self call: 'innerWidth'
     ^self call: 'innerWidth'
-
 !
 !
 
 
 outerHeight
 outerHeight
     "Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin."
     "Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin."
     ^self call: 'outerHeight'
     ^self call: 'outerHeight'
-
 !
 !
 
 
 outerWidth
 outerWidth
     "Get the current computed width for the first element in the set of matched elements, including padding and border."
     "Get the current computed width for the first element in the set of matched elements, including padding and border."
     ^self call: 'outerWidth'
     ^self call: 'outerWidth'
-
 !
 !
 
 
 top
 top
     "Get the current y coordinate of the first element in the set of matched elements, relative to the offset parent."
     "Get the current y coordinate of the first element in the set of matched elements, relative to the offset parent."
     ^(self call: 'position') basicAt: 'top'
     ^(self call: 'position') basicAt: 'top'
-
 !
 !
 
 
 left
 left
     "Get the current x coordinate of the first element in the set of matched elements, relative to the offset parent."
     "Get the current x coordinate of the first element in the set of matched elements, relative to the offset parent."
     ^(self call: 'position') basicAt: 'left'
     ^(self call: 'position') basicAt: 'left'
-
 !
 !
 
 
 offsetLeft
 offsetLeft
     "Get the current coordinates of the first element in the set of matched elements, relative to the document."
     "Get the current coordinates of the first element in the set of matched elements, relative to the document."
     ^(self call: 'offset') basicAt: 'left'
     ^(self call: 'offset') basicAt: 'left'
-
 !
 !
 
 
 offsetTop
 offsetTop
     "Get the current coordinates of the first element in the set of matched elements, relative to the document."
     "Get the current coordinates of the first element in the set of matched elements, relative to the document."
     ^(self call: 'offset') basicAt: 'top'
     ^(self call: 'offset') basicAt: 'top'
-
 !
 !
 
 
 scrollLeft
 scrollLeft
     "Get the current horizontal position of the scroll bar for the first element in the set of matched elements."
     "Get the current horizontal position of the scroll bar for the first element in the set of matched elements."
     ^self call: 'scrollLeft'
     ^self call: 'scrollLeft'
-
 !
 !
 
 
 scrollTop
 scrollTop
     "Get the current vertical position of the scroll bar for the first element in the set of matched elements."
     "Get the current vertical position of the scroll bar for the first element in the set of matched elements."
     ^self call: 'scrollTop'
     ^self call: 'scrollTop'
-
 !
 !
 
 
 scrollLeft: anInteger
 scrollLeft: anInteger
     self call: 'scrollLeft' withArgument: anInteger
     self call: 'scrollLeft' withArgument: anInteger
-
 !
 !
 
 
 scrollTop: anInteger
 scrollTop: anInteger
     self call: 'scrollTop' withArgument: anInteger
     self call: 'scrollTop' withArgument: anInteger
-
 ! !
 ! !
 
 
 !JQuery methodsFor: 'events'!
 !JQuery methodsFor: 'events'!
 
 
 focus
 focus
     self call: 'focus'
     self call: 'focus'
-
 !
 !
 
 
 show
 show
     self call: 'show'
     self call: 'show'
-
 !
 !
 
 
 hide
 hide
     self call: 'hide'
     self call: 'hide'
-
 !
 !
 
 
 remove
 remove
     self call: 'remove'
     self call: 'remove'
-
 !
 !
 
 
 on: anEventString do: aBlock
 on: anEventString do: aBlock
     "Attach aBlock for anEventString on the element"
     "Attach aBlock for anEventString on the element"
     {'self[''@jquery''].bind(anEventString, function(e){aBlock(e, self)})'}
     {'self[''@jquery''].bind(anEventString, function(e){aBlock(e, self)})'}
-
 !
 !
 
 
 removeEvents: aString
 removeEvents: aString
     "Unbind all handlers attached to the event aString"
     "Unbind all handlers attached to the event aString"
     self call: 'unbind' withArgument: aString
     self call: 'unbind' withArgument: aString
-
 ! !
 ! !
 
 
 !JQuery methodsFor: 'initialization'!
 !JQuery methodsFor: 'initialization'!
 
 
 initializeWithJQueryObject: anObject
 initializeWithJQueryObject: anObject
     jquery := anObject
     jquery := anObject
-
 ! !
 ! !
 
 
 !JQuery methodsFor: 'private'!
 !JQuery methodsFor: 'private'!
@@ -234,7 +199,6 @@ call: aString withArgument: anObject
 hasClass: aString
 hasClass: aString
     "Determine whether any of the matched elements are assigned the given class."
     "Determine whether any of the matched elements are assigned the given class."
     ^self call: 'hasClass' withArgument: aString
     ^self call: 'hasClass' withArgument: aString
-
 ! !
 ! !
 
 
 !JQuery class methodsFor: 'instance creation'!
 !JQuery class methodsFor: 'instance creation'!
@@ -243,14 +207,12 @@ fromString: aString
     | newJQuery |
     | newJQuery |
     {'newJQuery = jQuery(String(aString))'}.
     {'newJQuery = jQuery(String(aString))'}.
     ^self from: newJQuery
     ^self from: newJQuery
-
 !
 !
 
 
 from: anObject
 from: anObject
     ^self new
     ^self new
 	initializeWithJQueryObject: anObject;
 	initializeWithJQueryObject: anObject;
 	yourself
 	yourself
-
 !
 !
 
 
 window
 window
@@ -272,36 +234,30 @@ Object subclass: #Ajax
 instance variable names:
 instance variable names:
 - settings  A set of key/value pairs that configure the Ajax request. All settings are optional.
 - settings  A set of key/value pairs that configure the Ajax request. All settings are optional.
 
 
-Full list of settings options at http://api.jquery.com/jQuery.ajax/
-!
+Full list of settings options at http://api.jquery.com/jQuery.ajax/!
 
 
 !Ajax methodsFor: 'accessing'!
 !Ajax methodsFor: 'accessing'!
 
 
 at: aKey
 at: aKey
     ^settings at: aKey ifAbsent: [nil]
     ^settings at: aKey ifAbsent: [nil]
-
 !
 !
 
 
 at: aKey put: aValue
 at: aKey put: aValue
     settings at: aKey put: aValue
     settings at: aKey put: aValue
-
 !
 !
 
 
 url
 url
     ^self at: 'url'
     ^self at: 'url'
-
 !
 !
 
 
 url: aString
 url: aString
     self at: 'url' put: aString
     self at: 'url' put: aString
-
 ! !
 ! !
 
 
 !Ajax methodsFor: 'actions'!
 !Ajax methodsFor: 'actions'!
 
 
 send
 send
     {'jQuery.ajax(self[''@settings''])'}
     {'jQuery.ajax(self[''@settings''])'}
-
 ! !
 ! !
 
 
 !Ajax methodsFor: 'initialization'!
 !Ajax methodsFor: 'initialization'!
@@ -309,7 +265,6 @@ send
 initialize
 initialize
     super initialize.
     super initialize.
     settings := Dictionary new
     settings := Dictionary new
-
 ! !
 ! !
 
 
 !Ajax class methodsFor: 'instance creation'!
 !Ajax class methodsFor: 'instance creation'!
@@ -318,7 +273,6 @@ url: aString
     ^self new
     ^self new
 	url: aString;
 	url: aString;
 	yourself
 	yourself
-
 ! !
 ! !
 
 
 !BlockClosure methodsFor: '*JQuery'!
 !BlockClosure methodsFor: '*JQuery'!
@@ -328,25 +282,21 @@ appendToJQuery: aJQuery
 	canvas := HTMLCanvas new.
 	canvas := HTMLCanvas new.
 	self value: canvas.
 	self value: canvas.
 	aJQuery append: canvas
 	aJQuery append: canvas
-
 ! !
 ! !
 
 
 !String methodsFor: '*JQuery'!
 !String methodsFor: '*JQuery'!
 
 
 asJQuery
 asJQuery
     ^JQuery fromString: self
     ^JQuery fromString: self
-
 !
 !
 
 
 appendToJQuery: aJQuery
 appendToJQuery: aJQuery
     {'aJQuery._appendElement_(String(self))'}
     {'aJQuery._appendElement_(String(self))'}
-
 ! !
 ! !
 
 
 !HTMLCanvas methodsFor: '*JQuery'!
 !HTMLCanvas methodsFor: '*JQuery'!
 
 
 appendToJQuery: aJQuery
 appendToJQuery: aJQuery
     aJQuery appendElement: root element
     aJQuery appendElement: root element
-
 ! !
 ! !
 
 

File diff suppressed because it is too large
+ 26 - 160
st/Kernel.st


+ 2 - 82
st/Parser.st

@@ -6,61 +6,50 @@ Object subclass: #PPParser
 
 
 memo
 memo
 	^memo
 	^memo
-
 ! !
 ! !
 
 
 !PPParser methodsFor: 'initialization'!
 !PPParser methodsFor: 'initialization'!
 
 
 initialize
 initialize
 	memo := Dictionary new
 	memo := Dictionary new
-
 ! !
 ! !
 
 
 !PPParser methodsFor: 'operations'!
 !PPParser methodsFor: 'operations'!
 
 
 flatten
 flatten
 	^PPFlattenParser on: self
 	^PPFlattenParser on: self
-
 !
 !
 
 
 withSource
 withSource
 	^PPSourceParser on: self
 	^PPSourceParser on: self
-
 !
 !
 
 
 ==> aBlock
 ==> aBlock
 	^PPActionParser on: self block: aBlock
 	^PPActionParser on: self block: aBlock
-
 !
 !
 
 
 , aParser
 , aParser
 	^PPSequenceParser with: self with: aParser
 	^PPSequenceParser with: self with: aParser
-
 !
 !
 
 
 / aParser
 / aParser
 	^PPChoiceParser with: self with: aParser
 	^PPChoiceParser with: self with: aParser
-
 !
 !
 
 
 plus
 plus
 	^PPRepeatingParser on: self min: 1
 	^PPRepeatingParser on: self min: 1
-
 !
 !
 
 
 star
 star
 	^PPRepeatingParser on: self min: 0
 	^PPRepeatingParser on: self min: 0
-
 !
 !
 
 
 not
 not
 	^PPNotParser on: self
 	^PPNotParser on: self
-
 !
 !
 
 
 optional
 optional
 	^self / PPEpsilonParser new
 	^self / PPEpsilonParser new
-
 !
 !
 
 
 memoizedParse: aStream
 memoizedParse: aStream
@@ -75,14 +64,12 @@ memoizedParse: aStream
 		end := aStream position.
 		end := aStream position.
 		self memo at: start put: (Array with: node with: end).
 		self memo at: start put: (Array with: node with: end).
 		node]
 		node]
-
 ! !
 ! !
 
 
 !PPParser methodsFor: 'parsing'!
 !PPParser methodsFor: 'parsing'!
 
 
 parse: aStream
 parse: aStream
 	self subclassResponsibility
 	self subclassResponsibility
-
 !
 !
 
 
 parseAll: aStream
 parseAll: aStream
@@ -91,7 +78,6 @@ parseAll: aStream
 	^result isParseFailure 
 	^result isParseFailure 
 	    ifTrue: [self error: (result messageFor: aStream contents)]
 	    ifTrue: [self error: (result messageFor: aStream contents)]
 	    ifFalse: [result first]
 	    ifFalse: [result first]
-
 ! !
 ! !
 
 
 PPParser subclass: #PPEOFParser
 PPParser subclass: #PPEOFParser
@@ -105,7 +91,6 @@ parse: aStream
 	    ifFalse: [
 	    ifFalse: [
 		PPFailure new reason: aStream contents, String lf, '---------------', String lf, 'EOF expected' at: aStream position]
 		PPFailure new reason: aStream contents, String lf, '---------------', String lf, 'EOF expected' at: aStream position]
 	    ifTrue: [nil]
 	    ifTrue: [nil]
-
 ! !
 ! !
 
 
 PPParser subclass: #PPAnyParser
 PPParser subclass: #PPAnyParser
@@ -119,7 +104,6 @@ parse: aStream
 	    ifTrue: [PPFailure new
 	    ifTrue: [PPFailure new
 			 reason: 'did not expect EOF' at: aStream position]
 			 reason: 'did not expect EOF' at: aStream position]
 	    ifFalse: [aStream next]
 	    ifFalse: [aStream next]
-
 ! !
 ! !
 
 
 PPParser subclass: #PPEpsilonParser
 PPParser subclass: #PPEpsilonParser
@@ -130,7 +114,6 @@ PPParser subclass: #PPEpsilonParser
 
 
 parse: aStream
 parse: aStream
 	^nil
 	^nil
-
 ! !
 ! !
 
 
 PPParser subclass: #PPStringParser
 PPParser subclass: #PPStringParser
@@ -141,12 +124,10 @@ PPParser subclass: #PPStringParser
 
 
 string
 string
 	^string
 	^string
-
 !
 !
 
 
 string: aString
 string: aString
 	string := aString
 	string := aString
-
 ! !
 ! !
 
 
 !PPStringParser methodsFor: 'parsing'!
 !PPStringParser methodsFor: 'parsing'!
@@ -160,7 +141,6 @@ parse: aStream
 	    ifFalse: [
 	    ifFalse: [
 		aStream position: position.
 		aStream position: position.
 		PPFailure new reason: 'Expected ', self string, ' but got ', (result at: position) printString; yourself]
 		PPFailure new reason: 'Expected ', self string, ' but got ', (result at: position) printString; yourself]
-
 ! !
 ! !
 
 
 PPParser subclass: #PPCharacterParser
 PPParser subclass: #PPCharacterParser
@@ -171,7 +151,6 @@ PPParser subclass: #PPCharacterParser
 
 
 string: aString
 string: aString
 	regexp := RegularExpression fromString: '[', aString, ']'
 	regexp := RegularExpression fromString: '[', aString, ']'
-
 ! !
 ! !
 
 
 !PPCharacterParser methodsFor: 'parsing'!
 !PPCharacterParser methodsFor: 'parsing'!
@@ -180,14 +159,12 @@ parse: aStream
 	^(aStream peek notNil and: [self match: aStream peek])
 	^(aStream peek notNil and: [self match: aStream peek])
 	    ifTrue: [aStream next]
 	    ifTrue: [aStream next]
 	    ifFalse: [PPFailure new reason: 'Could not match' at: aStream position]
 	    ifFalse: [PPFailure new reason: 'Could not match' at: aStream position]
-
 ! !
 ! !
 
 
 !PPCharacterParser methodsFor: 'private'!
 !PPCharacterParser methodsFor: 'private'!
 
 
 match: aString
 match: aString
 	^aString match: regexp
 	^aString match: regexp
-
 ! !
 ! !
 
 
 PPParser subclass: #PPListParser
 PPParser subclass: #PPListParser
@@ -198,19 +175,16 @@ PPParser subclass: #PPListParser
 
 
 parsers
 parsers
 	^parsers ifNil: [#()]
 	^parsers ifNil: [#()]
-
 !
 !
 
 
 parsers: aCollection
 parsers: aCollection
 	parsers := aCollection
 	parsers := aCollection
-
 ! !
 ! !
 
 
 !PPListParser methodsFor: 'copying'!
 !PPListParser methodsFor: 'copying'!
 
 
 copyWith: aParser
 copyWith: aParser
 	^self class withAll: (self parsers copyWith: aParser)
 	^self class withAll: (self parsers copyWith: aParser)
-
 ! !
 ! !
 
 
 !PPListParser class methodsFor: 'instance creation'!
 !PPListParser class methodsFor: 'instance creation'!
@@ -219,12 +193,10 @@ withAll: aCollection
 	    ^self new
 	    ^self new
 		parsers: aCollection;
 		parsers: aCollection;
 		yourself
 		yourself
-
 !
 !
 
 
 with: aParser with: anotherParser
 with: aParser with: anotherParser
 	    ^self withAll: (Array with: aParser with: anotherParser)
 	    ^self withAll: (Array with: aParser with: anotherParser)
-
 ! !
 ! !
 
 
 PPListParser subclass: #PPSequenceParser
 PPListParser subclass: #PPSequenceParser
@@ -235,7 +207,6 @@ PPListParser subclass: #PPSequenceParser
 
 
 , aRule
 , aRule
 	^self copyWith: aRule
 	^self copyWith: aRule
-
 ! !
 ! !
 
 
 !PPSequenceParser methodsFor: 'parsing'!
 !PPSequenceParser methodsFor: 'parsing'!
@@ -253,7 +224,6 @@ parse: aStream
 	^element isParseFailure
 	^element isParseFailure
 	    ifFalse: [elements]
 	    ifFalse: [elements]
 	    ifTrue: [aStream position: start. element]
 	    ifTrue: [aStream position: start. element]
-
 ! !
 ! !
 
 
 PPListParser subclass: #PPChoiceParser
 PPListParser subclass: #PPChoiceParser
@@ -264,7 +234,6 @@ PPListParser subclass: #PPChoiceParser
 
 
 / aRule
 / aRule
 	^self copyWith: aRule
 	^self copyWith: aRule
-
 ! !
 ! !
 
 
 !PPChoiceParser methodsFor: 'parsing'!
 !PPChoiceParser methodsFor: 'parsing'!
@@ -277,7 +246,6 @@ parse: aStream
 		result isParseFailure not]
 		result isParseFailure not]
 	    ifNone: [].
 	    ifNone: [].
 	^result
 	^result
-
 ! !
 ! !
 
 
 PPParser subclass: #PPDelegateParser
 PPParser subclass: #PPDelegateParser
@@ -288,19 +256,16 @@ PPParser subclass: #PPDelegateParser
 
 
 parser
 parser
 	^parser
 	^parser
-
 !
 !
 
 
 parser: aParser
 parser: aParser
 	parser := aParser
 	parser := aParser
-
 ! !
 ! !
 
 
 !PPDelegateParser methodsFor: 'parsing'!
 !PPDelegateParser methodsFor: 'parsing'!
 
 
 parse: aStream
 parse: aStream
 	^self parser memoizedParse: aStream
 	^self parser memoizedParse: aStream
-
 ! !
 ! !
 
 
 !PPDelegateParser class methodsFor: 'instance creation'!
 !PPDelegateParser class methodsFor: 'instance creation'!
@@ -309,7 +274,6 @@ on: aParser
 	    ^self new
 	    ^self new
 		parser: aParser;
 		parser: aParser;
 		yourself
 		yourself
-
 ! !
 ! !
 
 
 PPDelegateParser subclass: #PPAndParser
 PPDelegateParser subclass: #PPAndParser
@@ -320,7 +284,6 @@ PPDelegateParser subclass: #PPAndParser
 
 
 parse: aStream
 parse: aStream
 	^self basicParse: aStream
 	^self basicParse: aStream
-
 !
 !
 
 
 basicParse: aStream
 basicParse: aStream
@@ -329,7 +292,6 @@ basicParse: aStream
 	element := self parser memoizedParse: aStream.
 	element := self parser memoizedParse: aStream.
 	aStream position: position.
 	aStream position: position.
 	^element
 	^element
-
 ! !
 ! !
 
 
 PPAndParser subclass: #PPNotParser
 PPAndParser subclass: #PPNotParser
@@ -344,7 +306,6 @@ parse: aStream
 	^element isParseFailure 
 	^element isParseFailure 
 	    ifTrue: [nil]
 	    ifTrue: [nil]
 	    ifFalse: [PPFailure reason: element at: aStream position]
 	    ifFalse: [PPFailure reason: element at: aStream position]
-
 ! !
 ! !
 
 
 PPDelegateParser subclass: #PPActionParser
 PPDelegateParser subclass: #PPActionParser
@@ -355,12 +316,10 @@ PPDelegateParser subclass: #PPActionParser
 
 
 block
 block
 	^block
 	^block
-
 !
 !
 
 
 block: aBlock
 block: aBlock
 	block := aBlock
 	block := aBlock
-
 ! !
 ! !
 
 
 !PPActionParser methodsFor: 'parsing'!
 !PPActionParser methodsFor: 'parsing'!
@@ -371,7 +330,6 @@ parse: aStream
 	^element isParseFailure
 	^element isParseFailure
 	    ifFalse: [self block value: element]
 	    ifFalse: [self block value: element]
 	    ifTrue: [element]
 	    ifTrue: [element]
-
 ! !
 ! !
 
 
 !PPActionParser class methodsFor: 'instance creation'!
 !PPActionParser class methodsFor: 'instance creation'!
@@ -381,7 +339,6 @@ on: aParser block: aBlock
 		parser: aParser;
 		parser: aParser;
 		block: aBlock;
 		block: aBlock;
 		yourself
 		yourself
-
 ! !
 ! !
 
 
 PPDelegateParser subclass: #PPFlattenParser
 PPDelegateParser subclass: #PPFlattenParser
@@ -399,7 +356,6 @@ parse: aStream
 	    ifFalse: [aStream collection 
 	    ifFalse: [aStream collection 
 		copyFrom: start + 1 
 		copyFrom: start + 1 
 		to: aStream position]
 		to: aStream position]
-
 ! !
 ! !
 
 
 PPDelegateParser subclass: #PPSourceParser
 PPDelegateParser subclass: #PPSourceParser
@@ -416,7 +372,6 @@ parse: aStream
 		ifTrue: [element]
 		ifTrue: [element]
 		ifFalse: [result := aStream collection copyFrom: start + 1 to: aStream position.
 		ifFalse: [result := aStream collection copyFrom: start + 1 to: aStream position.
 			Array with: element with: result].
 			Array with: element with: result].
-
 ! !
 ! !
 
 
 PPDelegateParser subclass: #PPRepeatingParser
 PPDelegateParser subclass: #PPRepeatingParser
@@ -427,12 +382,10 @@ PPDelegateParser subclass: #PPRepeatingParser
 
 
 min
 min
 	^min
 	^min
-
 !
 !
 
 
 min: aNumber
 min: aNumber
 	min := aNumber
 	min := aNumber
-
 ! !
 ! !
 
 
 !PPRepeatingParser methodsFor: 'parsing'!
 !PPRepeatingParser methodsFor: 'parsing'!
@@ -455,7 +408,6 @@ parse: aStream
 				ifFalse: [elements addLast: element]].
 				ifFalse: [elements addLast: element]].
 				elements]
 				elements]
 		ifNotNil: [failure].
 		ifNotNil: [failure].
-
 ! !
 ! !
 
 
 !PPRepeatingParser class methodsFor: 'instance creation'!
 !PPRepeatingParser class methodsFor: 'instance creation'!
@@ -465,7 +417,6 @@ on: aParser min: aNumber
 		parser: aParser;
 		parser: aParser;
 		min: aNumber;
 		min: aNumber;
 		yourself
 		yourself
-
 ! !
 ! !
 
 
 Object subclass: #PPFailure
 Object subclass: #PPFailure
@@ -476,29 +427,24 @@ Object subclass: #PPFailure
 
 
 position
 position
 	^position ifNil: [0]
 	^position ifNil: [0]
-
 !
 !
 
 
 position: aNumber
 position: aNumber
 	position := aNumber
 	position := aNumber
-
 !
 !
 
 
 reason
 reason
 	^reason ifNil: ['']
 	^reason ifNil: ['']
-
 !
 !
 
 
 reason: aString
 reason: aString
 	reason := aString
 	reason := aString
-
 !
 !
 
 
 reason: aString at: anInteger
 reason: aString at: anInteger
 	self 
 	self 
 	    reason: aString; 
 	    reason: aString; 
 	    position: anInteger
 	    position: anInteger
-
 !
 !
 
 
 accept: aVisitor
 accept: aVisitor
@@ -509,7 +455,6 @@ accept: aVisitor
 
 
 isParseFailure
 isParseFailure
 	^true
 	^true
-
 !
 !
 
 
 asString
 asString
@@ -522,7 +467,6 @@ reason: aString at: anInteger
 	    ^self new
 	    ^self new
 		reason: aString at: anInteger;
 		reason: aString at: anInteger;
 		yourself
 		yourself
-
 ! !
 ! !
 
 
 Object subclass: #SmalltalkParser
 Object subclass: #SmalltalkParser
@@ -694,14 +638,12 @@ parser
 		    yourself].
 		    yourself].
 	
 	
 	^method, PPEOFParser new ==> [:node | node first]
 	^method, PPEOFParser new ==> [:node | node first]
-
 ! !
 ! !
 
 
 !SmalltalkParser methodsFor: 'parsing'!
 !SmalltalkParser methodsFor: 'parsing'!
 
 
 parse: aStream
 parse: aStream
 	^self parser parse: aStream
 	^self parser parse: aStream
-
 ! !
 ! !
 
 
 !SmalltalkParser class methodsFor: 'instance creation'!
 !SmalltalkParser class methodsFor: 'instance creation'!
@@ -709,7 +651,6 @@ parse: aStream
 parse: aStream
 parse: aStream
 	    ^self new
 	    ^self new
 		parse: aStream
 		parse: aStream
-
 ! !
 ! !
 
 
 Object subclass: #Chunk
 Object subclass: #Chunk
@@ -720,24 +661,20 @@ Object subclass: #Chunk
 
 
 contents
 contents
 	^contents ifNil: ['']
 	^contents ifNil: ['']
-
 !
 !
 
 
 contents: aString
 contents: aString
 	contents := aString
 	contents := aString
-
 ! !
 ! !
 
 
 !Chunk methodsFor: 'testing'!
 !Chunk methodsFor: 'testing'!
 
 
 isEmptyChunk
 isEmptyChunk
 	^false
 	^false
-
 !
 !
 
 
 isInstructionChunk
 isInstructionChunk
 	^false
 	^false
-
 ! !
 ! !
 
 
 Chunk subclass: #InstructionChunk
 Chunk subclass: #InstructionChunk
@@ -748,7 +685,6 @@ Chunk subclass: #InstructionChunk
 
 
 isInstructionChunk
 isInstructionChunk
 	^true
 	^true
-
 ! !
 ! !
 
 
 Chunk subclass: #EmptyChunk
 Chunk subclass: #EmptyChunk
@@ -759,7 +695,6 @@ Chunk subclass: #EmptyChunk
 
 
 isEmptyChunk
 isEmptyChunk
 	^true
 	^true
-
 ! !
 ! !
 
 
 Object subclass: #ChunkParser
 Object subclass: #ChunkParser
@@ -772,7 +707,6 @@ instructionChunk
 	^instructionChunk ifNil: [
 	^instructionChunk ifNil: [
 	    instructionChunk := self ws, '!!' asParser, self chunk
 	    instructionChunk := self ws, '!!' asParser, self chunk
 	    ==> [:node | InstructionChunk new contents: node last contents]]
 	    ==> [:node | InstructionChunk new contents: node last contents]]
-
 ! !
 ! !
 
 
 !ChunkParser methodsFor: 'accessing'!
 !ChunkParser methodsFor: 'accessing'!
@@ -780,32 +714,26 @@ instructionChunk
 parser
 parser
 	^parser ifNil: [
 	^parser ifNil: [
 	    parser := self instructionChunk / self emptyChunk / self chunk / self eof]
 	    parser := self instructionChunk / self emptyChunk / self chunk / self eof]
-
 !
 !
 
 
 eof
 eof
 	^eof ifNil: [eof := self ws, PPEOFParser new ==> [:node | nil]]
 	^eof ifNil: [eof := self ws, PPEOFParser new ==> [:node | nil]]
-
 !
 !
 
 
 separator
 separator
 	^separator ifNil: [separator := (String cr, String space, String lf, String tab) asChoiceParser]
 	^separator ifNil: [separator := (String cr, String space, String lf, String tab) asChoiceParser]
-
 !
 !
 
 
 ws
 ws
 	^ws ifNil: [ws := self separator star]
 	^ws ifNil: [ws := self separator star]
-
 !
 !
 
 
 chunk
 chunk
 	^chunk ifNil: [chunk := self ws, ('!!!!' asParser / ('!!' asParser not, PPAnyParser new)) plus flatten, '!!' asParser ==> [:node | Chunk new contents: (node second replace: '!!!!' with: '!!')]]
 	^chunk ifNil: [chunk := self ws, ('!!!!' asParser / ('!!' asParser not, PPAnyParser new)) plus flatten, '!!' asParser ==> [:node | Chunk new contents: (node second replace: '!!!!' with: '!!')]]
-
 !
 !
 
 
 emptyChunk
 emptyChunk
 	^emptyChunk ifNil: [emptyChunk := self separator plus, '!!' asParser, self ws ==> [:node | EmptyChunk new]]
 	^emptyChunk ifNil: [emptyChunk := self separator plus, '!!' asParser, self ws ==> [:node | EmptyChunk new]]
-
 ! !
 ! !
 
 
 Object subclass: #Importer
 Object subclass: #Importer
@@ -816,7 +744,6 @@ Object subclass: #Importer
 
 
 chunkParser
 chunkParser
 	^chunkParser ifNil: [chunkParser := ChunkParser new parser]
 	^chunkParser ifNil: [chunkParser := ChunkParser new parser]
-
 ! !
 ! !
 
 
 !Importer methodsFor: 'fileIn'!
 !Importer methodsFor: 'fileIn'!
@@ -831,7 +758,6 @@ import: aStream
 					 scanFrom: aStream]
 					 scanFrom: aStream]
 		    ifFalse: [Compiler new loadExpression: nextChunk contents].
 		    ifFalse: [Compiler new loadExpression: nextChunk contents].
 		self import: aStream]]
 		self import: aStream]]
-
 ! !
 ! !
 
 
 Object subclass: #Exporter
 Object subclass: #Exporter
@@ -858,7 +784,6 @@ export: aClass
 	self exportMetaDefinitionOf: aClass on: stream.
 	self exportMetaDefinitionOf: aClass on: stream.
 	self exportMethodsOf: aClass class on: stream.
 	self exportMethodsOf: aClass class on: stream.
 	^stream contents
 	^stream contents
-
 ! !
 ! !
 
 
 !Exporter methodsFor: 'private'!
 !Exporter methodsFor: 'private'!
@@ -884,7 +809,6 @@ exportDefinitionOf: aClass on: aStream
 		nextPutAll: '.comment=';
 		nextPutAll: '.comment=';
 		nextPutAll: 'unescape(''', aClass comment escaped, ''')'].
 		nextPutAll: 'unescape(''', aClass comment escaped, ''')'].
 	aStream lf
 	aStream lf
-
 !
 !
 
 
 exportMetaDefinitionOf: aClass on: aStream
 exportMetaDefinitionOf: aClass on: aStream
@@ -896,7 +820,6 @@ exportMetaDefinitionOf: aClass on: aStream
 		do: [:each | aStream nextPutAll: '''', each, '''']
 		do: [:each | aStream nextPutAll: '''', each, '''']
 		separatedBy: [aStream nextPutAll: ','].
 		separatedBy: [aStream nextPutAll: ','].
 	    aStream nextPutAll: '];', String lf]
 	    aStream nextPutAll: '];', String lf]
-
 !
 !
 
 
 exportMethodsOf: aClass on: aStream
 exportMethodsOf: aClass on: aStream
@@ -913,7 +836,6 @@ classNameFor: aClass
 		aClass isNil
 		aClass isNil
 		    ifTrue: ['nil']
 		    ifTrue: ['nil']
 		    ifFalse: [aClass name]]
 		    ifFalse: [aClass name]]
-
 !
 !
 
 
 exportMethod: aMethod of: aClass on: aStream
 exportMethod: aMethod of: aClass on: aStream
@@ -968,7 +890,6 @@ exportDefinitionOf: aClass on: aStream
 		nextPutAll: '!!', (self classNameFor: aClass), ' commentStamp!!';lf;
 		nextPutAll: '!!', (self classNameFor: aClass), ' commentStamp!!';lf;
 		nextPutAll: (self chunkEscape: aClass comment), '!!';lf].
 		nextPutAll: (self chunkEscape: aClass comment), '!!';lf].
 	aStream lf
 	aStream lf
-
 !
 !
 
 
 exportMethod: aMethod of: aClass on: aStream
 exportMethod: aMethod of: aClass on: aStream
@@ -1011,10 +932,9 @@ classNameFor: aClass
 !
 !
 
 
 chunkEscape: aString
 chunkEscape: aString
-	"Replace all occurrences of !! with !!!!"
-
-	^aString replace: '!!' with: '!!!!'
+	"Replace all occurrences of !! with !!!! and trim at both ends."
 
 
+	^(aString replace: '!!' with: '!!!!') trimBoth
 !
 !
 
 
 exportCategoryExtensions: aString on: aStream
 exportCategoryExtensions: aString on: aStream

+ 0 - 4
st/SUnit.st

@@ -76,7 +76,6 @@ TestCase subclass: #ExampleTest
 
 
 testFailure
 testFailure
 	self deny: true
 	self deny: true
-	
 !
 !
 
 
 testPasses
 testPasses
@@ -131,7 +130,6 @@ TabWidget subclass: #TestRunner
 
 
 label
 label
     ^'[Test runner]'
     ^'[Test runner]'
-
 !
 !
 
 
 categories
 categories
@@ -274,7 +272,6 @@ renderButtonsOn: html
     html button
     html button
 	with: 'Run selected';
 	with: 'Run selected';
 	onClick: [self run: (self selectedClasses collect: [:each | each new])]
 	onClick: [self run: (self selectedClasses collect: [:each | each new])]
-
 !
 !
 
 
 renderCategoriesOn: html
 renderCategoriesOn: html
@@ -313,7 +310,6 @@ renderErrorsOn: html
 
 
 canBeClosed
 canBeClosed
     ^true
     ^true
-
 !
 !
 
 
 isSelectedClass: aClass
 isSelectedClass: aClass

Some files were not shown because too many files changed in this diff