From dae48fe69464332b188cbb508a74069b6a8321e6 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Tue, 24 Feb 2026 16:01:42 +0100 Subject: [PATCH] Fix visit methods They were in the weird state been at the same time extensions and not extensions. + the content of FASTTCharacterLiteral>>accept: was wrong. Fixes #103 --- src/FAST-Core-Model/FASTTCharacterLiteral.trait.st | 5 ----- src/FAST-Core-Model/FASTTNumericalLiteral.trait.st | 5 ----- src/FAST-Core-Model/FASTTStatement.trait.st | 5 ----- src/FAST-Core-Model/FASTTStringLiteral.trait.st | 5 ----- src/FAST-Core-Model/FASTTVariableExpression.trait.st | 6 ------ .../FASTTCharacterLiteral.extension.st | 3 ++- .../FASTTNumericalLiteral.extension.st | 0 .../FASTTStatement.extension.st | 0 .../FASTTStringLiteral.extension.st | 0 .../FASTTVariableExpression.extension.st | 0 10 files changed, 2 insertions(+), 27 deletions(-) rename src/{FAST-Core-Model => FAST-Core-Visitor}/FASTTCharacterLiteral.extension.st (73%) rename src/{FAST-Core-Model => FAST-Core-Visitor}/FASTTNumericalLiteral.extension.st (100%) rename src/{FAST-Core-Model => FAST-Core-Visitor}/FASTTStatement.extension.st (100%) rename src/{FAST-Core-Model => FAST-Core-Visitor}/FASTTStringLiteral.extension.st (100%) rename src/{FAST-Core-Model => FAST-Core-Visitor}/FASTTVariableExpression.extension.st (100%) diff --git a/src/FAST-Core-Model/FASTTCharacterLiteral.trait.st b/src/FAST-Core-Model/FASTTCharacterLiteral.trait.st index 882caa5..0400b6b 100644 --- a/src/FAST-Core-Model/FASTTCharacterLiteral.trait.st +++ b/src/FAST-Core-Model/FASTTCharacterLiteral.trait.st @@ -45,11 +45,6 @@ FASTTCharacterLiteral classSide >> annotation [ ^ self ] -{ #category : '*FAST-Core-Visitor' } -FASTTCharacterLiteral >> accept: aVisitor [ - ^ aVisitor visitCharacterLiteralNode: self -] - { #category : 'testing' } FASTTCharacterLiteral >> isCharacterLiteral [ diff --git a/src/FAST-Core-Model/FASTTNumericalLiteral.trait.st b/src/FAST-Core-Model/FASTTNumericalLiteral.trait.st index 10f67ea..82c6b01 100644 --- a/src/FAST-Core-Model/FASTTNumericalLiteral.trait.st +++ b/src/FAST-Core-Model/FASTTNumericalLiteral.trait.st @@ -45,11 +45,6 @@ FASTTNumericalLiteral classSide >> annotation [ ^ self ] -{ #category : '*FAST-Core-Visitor' } -FASTTNumericalLiteral >> accept: aVisitor [ - ^ aVisitor visitFASTTNumericalLiteral: self -] - { #category : 'testing' } FASTTNumericalLiteral >> isNumericalLiteral [ diff --git a/src/FAST-Core-Model/FASTTStatement.trait.st b/src/FAST-Core-Model/FASTTStatement.trait.st index f1a5cf1..8d1e43a 100644 --- a/src/FAST-Core-Model/FASTTStatement.trait.st +++ b/src/FAST-Core-Model/FASTTStatement.trait.st @@ -42,11 +42,6 @@ FASTTStatement classSide >> annotation [ ^ self ] -{ #category : '*FAST-Core-Visitor' } -FASTTStatement >> accept: aVisitor [ - ^ aVisitor visitFASTTStatement: self -] - { #category : 'testing' } FASTTStatement >> isStatement [ diff --git a/src/FAST-Core-Model/FASTTStringLiteral.trait.st b/src/FAST-Core-Model/FASTTStringLiteral.trait.st index 4bbd945..b65ece2 100644 --- a/src/FAST-Core-Model/FASTTStringLiteral.trait.st +++ b/src/FAST-Core-Model/FASTTStringLiteral.trait.st @@ -45,11 +45,6 @@ FASTTStringLiteral classSide >> annotation [ ^ self ] -{ #category : '*FAST-Core-Visitor' } -FASTTStringLiteral >> accept: aVisitor [ - ^ aVisitor visitFASTTStringLiteral: self -] - { #category : 'testing' } FASTTStringLiteral >> isStringLiteral [ diff --git a/src/FAST-Core-Model/FASTTVariableExpression.trait.st b/src/FAST-Core-Model/FASTTVariableExpression.trait.st index 6e71e5a..33414fd 100644 --- a/src/FAST-Core-Model/FASTTVariableExpression.trait.st +++ b/src/FAST-Core-Model/FASTTVariableExpression.trait.st @@ -46,12 +46,6 @@ FASTTVariableExpression classSide >> annotation [ ^ self ] -{ #category : '*FAST-Core-Visitor' } -FASTTVariableExpression >> accept: aVisitor [ - "Arbitrary use of an accept: available in the used traits (FASTVariable or FASTTExpression)" - ^ aVisitor visitFASTTVariableExpression: self -] - { #category : 'testing' } FASTTVariableExpression >> isVariableExpression [ diff --git a/src/FAST-Core-Model/FASTTCharacterLiteral.extension.st b/src/FAST-Core-Visitor/FASTTCharacterLiteral.extension.st similarity index 73% rename from src/FAST-Core-Model/FASTTCharacterLiteral.extension.st rename to src/FAST-Core-Visitor/FASTTCharacterLiteral.extension.st index 583845f..6a15b37 100644 --- a/src/FAST-Core-Model/FASTTCharacterLiteral.extension.st +++ b/src/FAST-Core-Visitor/FASTTCharacterLiteral.extension.st @@ -2,5 +2,6 @@ Extension { #name : 'FASTTCharacterLiteral' } { #category : '*FAST-Core-Visitor' } FASTTCharacterLiteral >> accept: aVisitor [ - ^ aVisitor visitCharacterLiteralNode: self + + ^ aVisitor visitFASTTCharacterLiteral: self ] diff --git a/src/FAST-Core-Model/FASTTNumericalLiteral.extension.st b/src/FAST-Core-Visitor/FASTTNumericalLiteral.extension.st similarity index 100% rename from src/FAST-Core-Model/FASTTNumericalLiteral.extension.st rename to src/FAST-Core-Visitor/FASTTNumericalLiteral.extension.st diff --git a/src/FAST-Core-Model/FASTTStatement.extension.st b/src/FAST-Core-Visitor/FASTTStatement.extension.st similarity index 100% rename from src/FAST-Core-Model/FASTTStatement.extension.st rename to src/FAST-Core-Visitor/FASTTStatement.extension.st diff --git a/src/FAST-Core-Model/FASTTStringLiteral.extension.st b/src/FAST-Core-Visitor/FASTTStringLiteral.extension.st similarity index 100% rename from src/FAST-Core-Model/FASTTStringLiteral.extension.st rename to src/FAST-Core-Visitor/FASTTStringLiteral.extension.st diff --git a/src/FAST-Core-Model/FASTTVariableExpression.extension.st b/src/FAST-Core-Visitor/FASTTVariableExpression.extension.st similarity index 100% rename from src/FAST-Core-Model/FASTTVariableExpression.extension.st rename to src/FAST-Core-Visitor/FASTTVariableExpression.extension.st