Skip to content

Commit

Permalink
st: only insert new comments at statement level
Browse files Browse the repository at this point in the history
It should not be possible to insert a comment as a message argument (SyntaxError) or receiver (MessageNotUnderstood: SBLabel>>guessedClass) like it was before.
  • Loading branch information
LinqLover committed Sep 1, 2022
1 parent 2b4049c commit c3c5848
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions .squot
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
OrderedDictionary {
'packages/Sandblocks-Representation' : #SquotTonelSerializer,
'packages/Sandblocks-Explorer' : #SquotTonelSerializer,
'packages/Sandblocks-Compiler' : #SquotTonelSerializer,
'packages/Sandblocks-Tutorial' : #SquotTonelSerializer,
'packages/Sandblocks-Watch' : #SquotTonelSerializer,
'packages/BaselineOfSandblocks' : #SquotTonelSerializer,
'packages/Sandblocks-Core' : #SquotTonelSerializer,
'packages/Sandblocks-Drawing' : #SquotTonelSerializer,
'packages/Sandblocks-Graph' : #SquotTonelSerializer,
'packages/Sandblocks-Babylonian' : #SquotTonelSerializer,
'packages/Sandblocks-Compiler' : #SquotTonelSerializer,
'packages/Sandblocks-Core' : #SquotTonelSerializer,
'packages/Sandblocks-CustomJavascript' : #SquotTonelSerializer,
'packages/Sandblocks-Debugger' : #SquotTonelSerializer,
'packages/Sandblocks-Drawing' : #SquotTonelSerializer,
'packages/Sandblocks-Explorer' : #SquotTonelSerializer,
'packages/Sandblocks-Layout' : #SquotTonelSerializer,
'packages/Sandblocks-Morphs' : #SquotTonelSerializer,
'packages/Sandblocks-Utils' : #SquotTonelSerializer,
'packages/Sandblocks-RatPack' : #SquotTonelSerializer,
'packages/Sandblocks-Smalltalk' : #SquotTonelSerializer,
'packages/Sandblocks-Ohm' : #SquotTonelSerializer,
'packages/Sandblocks-CustomJavascript' : #SquotTonelSerializer,
'packages/Sandblocks-Squeak6Fixes' : #SquotTonelSerializer,
'packages/Sandblocks-Simulation' : #SquotTonelSerializer,
'packages/Sandblocks-Representation' : #SquotTonelSerializer,
'packages/Sandblocks-Scheme' : #SquotTonelSerializer,
'packages/Sandblocks-Simulation' : #SquotTonelSerializer,
'packages/Sandblocks-Smalltalk' : #SquotTonelSerializer,
'packages/Sandblocks-Squeak6Fixes' : #SquotTonelSerializer,
'packages/Sandblocks-Tutorial' : #SquotTonelSerializer,
'packages/Sandblocks-Utils' : #SquotTonelSerializer,
'packages/Sandblocks-Watch' : #SquotTonelSerializer,
'packages/Sandblocks-Graph' : #SquotTonelSerializer,
'packages/Sandblocks-RatPack' : #SquotTonelSerializer,
'packages/Sandblocks-Plugin-StLivePreview' : #SquotTonelSerializer,
'packages/Sandblocks-Git' : #SquotTonelSerializer
}
2 changes: 1 addition & 1 deletion packages/Sandblocks-Smalltalk/SBStGrammarHandler.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ SBStGrammarHandler >> perform: char for: aBlock empty: aBoolean [
char = $$ ifTrue: [^ self replace: aBlock with: (SBStCharacter new contents: '')].
char = $' ifTrue: [^ self replace: aBlock with: (SBStString new contents: '')].
char = $# ifTrue: [^ self replace: aBlock with: (SBStSymbol new contents: '')].
char = $" ifTrue: [^ self replace: aBlock with: self newCommentBlock].
(char = $" and: [aBlock parentSandblock isBlockBody]) ifTrue: [^ self replace: aBlock with: self newCommentBlock].
((char = Character space or: [char = Character cr]) and: [aBlock isStatement]) ifTrue: [^ self emptyLine: aBlock].
(char = $: and: [aBlock parentSandblock isBlockBody and: [aBlock parentSandblock isMethodBody not]]) ifTrue: [ | block |
block := aBlock parentSandblock.
Expand Down

0 comments on commit c3c5848

Please sign in to comment.