Skip to content

Commit

Permalink
removed deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianconcept committed Feb 17, 2024
1 parent 272d684 commit 766ae32
Showing 1 changed file with 1 addition and 60 deletions.
61 changes: 1 addition & 60 deletions STTemplate/STTemplate.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -259,18 +259,6 @@ STTemplate >> asSmalltalkSource [
contents
]

{ #category : #actions }
STTemplate >> basicCompile [

^ Smalltalk compiler
source: self asSmalltalkSource;
context: nil;
failBlock: [ ^ nil ];
noPattern: true;
options: #( + optionParseErrors - optionSkipSemanticWarnings );
compile
]

{ #category : #actions }
STTemplate >> basicCompileOn: anObject [

Expand All @@ -281,19 +269,6 @@ STTemplate >> basicCompileOn: anObject [
compile
]

{ #category : #actions }
STTemplate >> compile [

"Answers the compiled method resulting for this template.
Catches syntax error notifications to signal STTemplateCompilationError
so applications can define how to handle that issue."

self deprecated: 'use compileOn: anObject'.
^ [ self basicCompile ]
on: SyntaxErrorNotification
do: [ :x | STTemplateCompilationError signal: x messageText ]
]

{ #category : #actions }
STTemplate >> compileOn: anObject [

Expand All @@ -306,38 +281,12 @@ STTemplate >> compileOn: anObject [
do: [ :x | STTemplateCompilationError signal: x messageText ]
]

{ #category : #accessing }
STTemplate >> compiledMethod [

self deprecated: 'use compiledMethodOn:'.
^ compiledMethod ifNil: [ self initializeCompiledMethod ]
]

{ #category : #accessing }
STTemplate >> compiledMethodOn: anObject [

^ compiledMethod ifNil: [ self initializeCompiledMethodOn: anObject ]
]

{ #category : #accessing }
STTemplate >> getPartialNameFrom: smalltalkExpression [

"Answer the name of the partial in the given smalltalkExpression.
A template of a possible partial named 'showJobs' would look like this:
<st= STT yield: #showJob >
"

| src |
self deprecated: 'not needed anymore'.
src := smalltalkExpression readStream.
src upTo: $#.

^ String streamContents: [ :s |
[ src peek isAlphaNumeric ] whileTrue: [ s nextPut: src next ] ]
]

{ #category : #testing }
STTemplate >> hasDisplayToken: token at: anInteger [

Expand All @@ -357,13 +306,6 @@ STTemplate >> hasNamedYield: aSmalltalkExpression [
^ (aSmalltalkExpression indexOfSubCollection: 'yield:') > 0
]

{ #category : #initialization }
STTemplate >> initializeCompiledMethod [

self deprecated: 'use initializeCompiledMethodOn:'.
^ compiledMethod := self compile
]

{ #category : #initialization }
STTemplate >> initializeCompiledMethodOn: anObject [

Expand Down Expand Up @@ -449,12 +391,11 @@ STTemplate >> renderOn: anObject [
STTemplate >> renderOn: anObject partial: partial [

"Answer the result of rendering the receiver using anObject as template context
and the given partial.
and the given partial to be yield in the template.
The partials are nothing but sub-templates that have also access to the template context.
The STTCurrentRenderingContext dynamic variable and STTCurrentRenderingContext gives them
access to complete its rendering process."

self deprecated: 'not used'.
^ self
renderOn: anObject
partials: { (#_yield -> partial) } asDictionary
Expand Down

0 comments on commit 766ae32

Please sign in to comment.