75 lines
1.7 KiB
Smalltalk
75 lines
1.7 KiB
Smalltalk
Class {
|
|
#name : #GrafoscopioPillarASTextStringDecorator,
|
|
#superclass : #Object,
|
|
#instVars : [
|
|
'text'
|
|
],
|
|
#category : #'Grafoscopio-Pillar'
|
|
}
|
|
|
|
{ #category : #accessing }
|
|
GrafoscopioPillarASTextStringDecorator >> at: aNumber [
|
|
^ text at: aNumber
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
GrafoscopioPillarASTextStringDecorator >> at: aNumber put: aChar [
|
|
self halt
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringDecorator >> copyFrom: one to: two [
|
|
^ text copyFrom: one to: two
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringDecorator >> indexOf: aCharacter startingAt: anInteger ifAbsent: aBlockClosure [
|
|
| current index |
|
|
current := text detectAstNodeFor: anInteger.
|
|
index := current text
|
|
indexOf: aCharacter
|
|
startingAt: anInteger - current textStart + 1.
|
|
current := current next.
|
|
[ current isNotNil ]
|
|
whileTrue: [ index := current text indexOf: aCharacter.
|
|
index = 0
|
|
ifTrue: [ current := current next ]
|
|
ifFalse: [ ^ current textStart + index ] ].
|
|
^ aBlockClosure value
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringDecorator >> isByteString [
|
|
^ false
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringDecorator >> isEmpty [
|
|
^ text isEmpty
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringDecorator >> isWideString [
|
|
^ true
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
GrafoscopioPillarASTextStringDecorator >> notEmpty [
|
|
^ text notEmpty
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
GrafoscopioPillarASTextStringDecorator >> size [
|
|
^ text size
|
|
]
|
|
|
|
{ #category : #'as yet unclassified' }
|
|
GrafoscopioPillarASTextStringDecorator >> string [
|
|
self shouldBeImplemented.
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
GrafoscopioPillarASTextStringDecorator >> text: aGFPText [
|
|
text := aGFPText
|
|
]
|