Skip to content

Commit

Permalink
dc: better support for insert-stmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tom95 committed Oct 14, 2023
1 parent 96e2ec4 commit 1cee429
Show file tree
Hide file tree
Showing 15 changed files with 300 additions and 198 deletions.
12 changes: 12 additions & 0 deletions packages/DomainCode-Core/Morph.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ Morph >> hasChildren [
^ false
]

{ #category : #'*DomainCode-Core' }
Morph >> isExtra [

^ false
]

{ #category : #'*DomainCode-Core' }
Morph >> isLineBreak [

^ false
]

{ #category : #'*DomainCode-Core' }
Morph >> isNode: aNode [

Expand Down
9 changes: 9 additions & 0 deletions packages/DomainCode-Core/SequenceableCollection.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Extension { #name : #SequenceableCollection }

{ #category : #'*DomainCode-Core' }
SequenceableCollection >> overlappingPairsLoopedDo: aBlock [
"Emit overlapping pairs of my elements into aBlock"

1 to: self size - 1 do: [:i | aBlock value: (self at: i) value: (self at: i + 1)].
self size >= 2 ifTrue: [aBlock value: self last value: self first]
]
9 changes: 7 additions & 2 deletions packages/DomainCode-Diff/DCChawatheScriptGenerator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ DCChawatheScriptGenerator >> delete: aMorph [

| target |
target := aMorph replacedParent
ifNotNil: [:p | p isReplacement ifTrue: [p] ifFalse: [p]]
ifNotNil: [:p |
p isReplacement
ifTrue: [
p queryState replacementDeleted: p.
p]
ifFalse: [p]]
ifNil: [aMorph].

target delete.
Expand Down Expand Up @@ -131,7 +136,7 @@ DCChawatheScriptGenerator >> lcsWith: x and: y in: aMapping [
{ #category : #'as yet unclassified' }
DCChawatheScriptGenerator >> logChanges [

^ true
^ false
]

{ #category : #'as yet unclassified' }
Expand Down
Loading

0 comments on commit 1cee429

Please sign in to comment.