From 766ae32bfa5a73202dafe74c2479ae88c7c148c0 Mon Sep 17 00:00:00 2001 From: Sebastian Sastre Date: Sat, 17 Feb 2024 19:58:55 -0300 Subject: [PATCH] removed deprecations --- STTemplate/STTemplate.class.st | 61 +--------------------------------- 1 file changed, 1 insertion(+), 60 deletions(-) diff --git a/STTemplate/STTemplate.class.st b/STTemplate/STTemplate.class.st index a1b50f7..388a4cd 100644 --- a/STTemplate/STTemplate.class.st +++ b/STTemplate/STTemplate.class.st @@ -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 [ @@ -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 [ @@ -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: - - - " - - | 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 [ @@ -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 [ @@ -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