Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tomooda committed May 28, 2024
1 parent 60df2fa commit 3c000b4
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions repository/ViennaTalk-Transpiler-Core/String.extension.st
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
Extension { #name : 'String' }

{ #category : '*ViennaTalk-Transpiler-Core' }
String >> , aString [

| str |
str := aString isText
ifTrue: [ aString string ]
ifFalse: [ aString ].
^ [
str class name = #ViennaTracingString
ifTrue: [ self asViennaTracingString , aString ]
ifFalse: [ super , aString ] ]
on: Error
do: [ :ex | super , str ]
]

{ #category : '*ViennaTalk-Transpiler-Core' }
String >> asViennaExpression [
^ OpalCompiler new
Expand Down Expand Up @@ -48,14 +33,18 @@ String >> asViennaTracingString: anObject [
{ #category : '*ViennaTalk-Transpiler-Core' }
String >> copyReplaceFrom: start to: stop with: replacementCollection [

^ replacementCollection isViennaTracingString
^ [
replacementCollection isViennaTracingString
ifTrue: [
self asViennaTracingString
copyReplaceFrom: start
to: stop
with: replacementCollection ]
ifFalse: [
super copyReplaceFrom: start to: stop with: replacementCollection ]
super copyReplaceFrom: start to: stop with: replacementCollection ] ]
on: Error
do: [ :ex |
super copyReplaceFrom: start to: stop with: replacementCollection ]
]

{ #category : '*ViennaTalk-Transpiler-Core' }
Expand Down

0 comments on commit 3c000b4

Please sign in to comment.