From b1541b0e118b19286d5b1b34bb851a78a51bf75c Mon Sep 17 00:00:00 2001 From: Gabriel Darbord Date: Fri, 18 Oct 2024 14:28:30 +0200 Subject: [PATCH] Fix #76: add testing methods --- src/FAST-Core-Model/FASTEntity.class.st | 14 +-- src/FAST-Core-Model/FASTModel.class.st | 12 +-- src/FAST-Core-Model/FASTTAssignment.trait.st | 27 ++++-- .../FASTTBehaviouralEntity.trait.st | 21 +++-- .../FASTTBinaryExpression.trait.st | 31 ++++--- .../FASTTBooleanLiteral.trait.st | 15 +++- .../FASTTCharacterLiteral.trait.st | 15 +++- src/FAST-Core-Model/FASTTComment.trait.st | 18 ++-- src/FAST-Core-Model/FASTTEntity.trait.st | 18 ++-- .../FASTTEntityCreator.trait.st | 10 ++- src/FAST-Core-Model/FASTTExpression.trait.st | 57 +++++++----- .../FASTTExpressionStatement.trait.st | 21 +++-- src/FAST-Core-Model/FASTTInvocation.trait.st | 21 +++-- src/FAST-Core-Model/FASTTLiteral.trait.st | 19 ++-- .../FASTTNamedBehaviouralEntity.trait.st | 8 +- src/FAST-Core-Model/FASTTNamedEntity.trait.st | 18 ++-- .../FASTTNullPointerLiteral.trait.st | 15 +++- .../FASTTNumericalLiteral.trait.st | 15 +++- .../FASTTReturnStatement.trait.st | 21 +++-- .../FASTTScopableEntity.trait.st | 15 +++- src/FAST-Core-Model/FASTTStatement.trait.st | 16 ++-- .../FASTTStatementBlock.trait.st | 29 ++++--- .../FASTTStringLiteral.trait.st | 15 +++- .../FASTTUnaryExpression.trait.st | 25 ++++-- .../FASTTVariableEntity.trait.st | 27 ++++-- .../FASTTVariableExpression.trait.st | 15 +++- .../FASTTWithArguments.trait.st | 16 ++-- .../FASTTWithComments.trait.st | 24 ++--- .../FASTTWithParameters.trait.st | 16 ++-- src/FAST-Core-Model/package.st | 2 +- .../FASTMetamodelGenerator.class.st | 87 +++++++++++-------- src/FAST-Model-Generator/package.st | 2 +- 32 files changed, 434 insertions(+), 231 deletions(-) diff --git a/src/FAST-Core-Model/FASTEntity.class.st b/src/FAST-Core-Model/FASTEntity.class.st index 478b586..435fad3 100644 --- a/src/FAST-Core-Model/FASTEntity.class.st +++ b/src/FAST-Core-Model/FASTEntity.class.st @@ -11,14 +11,16 @@ any entity " Class { - #name : #FASTEntity, - #superclass : #MooseEntity, + #name : 'FASTEntity', + #superclass : 'MooseEntity', #traits : 'FASTTEntity', #classTraits : 'FASTTEntity classTrait', - #category : #'FAST-Core-Model-Entities' + #category : 'FAST-Core-Model-Entities', + #package : 'FAST-Core-Model', + #tag : 'Entities' } -{ #category : #meta } +{ #category : 'meta' } FASTEntity class >> annotation [ @@ -27,14 +29,14 @@ FASTEntity class >> annotation [ ^ self ] -{ #category : #meta } +{ #category : 'meta' } FASTEntity class >> metamodel [ ^ FASTModel metamodel ] -{ #category : #testing } +{ #category : 'testing' } FASTEntity >> isQueryable [ diff --git a/src/FAST-Core-Model/FASTModel.class.st b/src/FAST-Core-Model/FASTModel.class.st index 165acff..5e7ffd9 100644 --- a/src/FAST-Core-Model/FASTModel.class.st +++ b/src/FAST-Core-Model/FASTModel.class.st @@ -1,18 +1,20 @@ Class { - #name : #FASTModel, - #superclass : #MooseModel, + #name : 'FASTModel', + #superclass : 'MooseModel', #traits : 'FASTTEntityCreator', #classTraits : 'FASTTEntityCreator classTrait', - #category : #'FAST-Core-Model-Model' + #category : 'FAST-Core-Model-Model', + #package : 'FAST-Core-Model', + #tag : 'Model' } -{ #category : #accessing } +{ #category : 'accessing' } FASTModel class >> allSubmetamodelsPackagesNames [ ^ #(#'Moose-Query' #'Famix-Traits') ] -{ #category : #meta } +{ #category : 'meta' } FASTModel class >> annotation [ diff --git a/src/FAST-Core-Model/FASTTAssignment.trait.st b/src/FAST-Core-Model/FASTTAssignment.trait.st index 2bc6e7f..69cf6af 100644 --- a/src/FAST-Core-Model/FASTTAssignment.trait.st +++ b/src/FAST-Core-Model/FASTTAssignment.trait.st @@ -32,17 +32,19 @@ A node representing an assignment " Trait { - #name : #FASTTAssignment, + #name : 'FASTTAssignment', #instVars : [ '#expression => FMOne type: #FASTTExpression opposite: #assignedIn', '#variable => FMOne type: #FASTTVariableEntity opposite: #parentAssignmentExpression' ], #traits : 'FASTTExpression', #classTraits : 'FASTTExpression classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTAssignment classSide >> annotation [ @@ -51,7 +53,7 @@ FASTTAssignment classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTAssignment >> expression [ "Relation named: #expression type: #FASTTExpression opposite: #assignedIn" @@ -60,21 +62,28 @@ FASTTAssignment >> expression [ ^ expression ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTAssignment >> expression: anObject [ expression := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTAssignment >> expressionGroup [ ^ MooseSpecializedGroup with: self expression ] -{ #category : #accessing } +{ #category : 'testing' } +FASTTAssignment >> isAssignment [ + + + ^ true +] + +{ #category : 'accessing' } FASTTAssignment >> variable [ "Relation named: #variable type: #FASTTVariableEntity opposite: #parentAssignmentExpression" @@ -83,14 +92,14 @@ FASTTAssignment >> variable [ ^ variable ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTAssignment >> variable: anObject [ variable := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTAssignment >> variableGroup [ diff --git a/src/FAST-Core-Model/FASTTBehaviouralEntity.trait.st b/src/FAST-Core-Model/FASTTBehaviouralEntity.trait.st index c5ab08a..fd0b2a2 100644 --- a/src/FAST-Core-Model/FASTTBehaviouralEntity.trait.st +++ b/src/FAST-Core-Model/FASTTBehaviouralEntity.trait.st @@ -27,16 +27,18 @@ Local variables are intended to be stored in the local entities of the body " Trait { - #name : #FASTTBehaviouralEntity, + #name : 'FASTTBehaviouralEntity', #instVars : [ '#statementBlock => FMOne type: #FASTTStatementBlock opposite: #fastBehaviouralParent' ], #traits : 'FASTTScopableEntity + FASTTWithParameters', #classTraits : 'FASTTScopableEntity classTrait + FASTTWithParameters classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTBehaviouralEntity classSide >> annotation [ @@ -45,7 +47,14 @@ FASTTBehaviouralEntity classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'testing' } +FASTTBehaviouralEntity >> isBehaviouralEntity [ + + + ^ true +] + +{ #category : 'accessing' } FASTTBehaviouralEntity >> statementBlock [ "Relation named: #statementBlock type: #FASTTStatementBlock opposite: #fastBehaviouralParent" @@ -54,14 +63,14 @@ FASTTBehaviouralEntity >> statementBlock [ ^ statementBlock ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTBehaviouralEntity >> statementBlock: anObject [ statementBlock := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTBehaviouralEntity >> statementBlockGroup [ diff --git a/src/FAST-Core-Model/FASTTBinaryExpression.trait.st b/src/FAST-Core-Model/FASTTBinaryExpression.trait.st index 5f0014a..8fc97fc 100644 --- a/src/FAST-Core-Model/FASTTBinaryExpression.trait.st +++ b/src/FAST-Core-Model/FASTTBinaryExpression.trait.st @@ -33,7 +33,7 @@ A trait representing a binary expression of a node of a source code. " Trait { - #name : #FASTTBinaryExpression, + #name : 'FASTTBinaryExpression', #instVars : [ '#leftOperand => FMOne type: #FASTTExpression opposite: #parentExpressionLeft', '#operator => FMProperty', @@ -41,10 +41,12 @@ Trait { ], #traits : 'FASTTExpression', #classTraits : 'FASTTExpression classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTBinaryExpression classSide >> annotation [ @@ -53,7 +55,14 @@ FASTTBinaryExpression classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'testing' } +FASTTBinaryExpression >> isBinaryExpression [ + + + ^ true +] + +{ #category : 'accessing' } FASTTBinaryExpression >> leftOperand [ "Relation named: #leftOperand type: #FASTTExpression opposite: #parentExpressionLeft" @@ -62,21 +71,21 @@ FASTTBinaryExpression >> leftOperand [ ^ leftOperand ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTBinaryExpression >> leftOperand: anObject [ leftOperand := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTBinaryExpression >> leftOperandGroup [ ^ MooseSpecializedGroup with: self leftOperand ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTBinaryExpression >> operator [ @@ -85,13 +94,13 @@ FASTTBinaryExpression >> operator [ ^ operator ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTBinaryExpression >> operator: anObject [ operator := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTBinaryExpression >> rightOperand [ "Relation named: #rightOperand type: #FASTTExpression opposite: #parentExpressionRight" @@ -100,14 +109,14 @@ FASTTBinaryExpression >> rightOperand [ ^ rightOperand ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTBinaryExpression >> rightOperand: anObject [ rightOperand := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTBinaryExpression >> rightOperandGroup [ diff --git a/src/FAST-Core-Model/FASTTBooleanLiteral.trait.st b/src/FAST-Core-Model/FASTTBooleanLiteral.trait.st index 73984b3..ab1ba9e 100644 --- a/src/FAST-Core-Model/FASTTBooleanLiteral.trait.st +++ b/src/FAST-Core-Model/FASTTBooleanLiteral.trait.st @@ -27,13 +27,15 @@ A boolean literal " Trait { - #name : #FASTTBooleanLiteral, + #name : 'FASTTBooleanLiteral', #traits : 'FASTTLiteral', #classTraits : 'FASTTLiteral classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTBooleanLiteral classSide >> annotation [ @@ -41,3 +43,10 @@ FASTTBooleanLiteral classSide >> annotation [ ^ self ] + +{ #category : 'testing' } +FASTTBooleanLiteral >> isBooleanLiteral [ + + + ^ true +] diff --git a/src/FAST-Core-Model/FASTTCharacterLiteral.trait.st b/src/FAST-Core-Model/FASTTCharacterLiteral.trait.st index 0c81ecd..42ad7eb 100644 --- a/src/FAST-Core-Model/FASTTCharacterLiteral.trait.st +++ b/src/FAST-Core-Model/FASTTCharacterLiteral.trait.st @@ -27,13 +27,15 @@ A character literal " Trait { - #name : #FASTTCharacterLiteral, + #name : 'FASTTCharacterLiteral', #traits : 'FASTTLiteral', #classTraits : 'FASTTLiteral classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTCharacterLiteral classSide >> annotation [ @@ -41,3 +43,10 @@ FASTTCharacterLiteral classSide >> annotation [ ^ self ] + +{ #category : 'testing' } +FASTTCharacterLiteral >> isCharacterLiteral [ + + + ^ true +] diff --git a/src/FAST-Core-Model/FASTTComment.trait.st b/src/FAST-Core-Model/FASTTComment.trait.st index 217f883..119c5db 100644 --- a/src/FAST-Core-Model/FASTTComment.trait.st +++ b/src/FAST-Core-Model/FASTTComment.trait.st @@ -19,15 +19,17 @@ FASTComment represents one instance of a comment (in the sense of programming la " Trait { - #name : #FASTTComment, + #name : 'FASTTComment', #instVars : [ '#content => FMProperty', '#container => FMOne type: #FASTTWithComments opposite: #comments' ], - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTComment classSide >> annotation [ @@ -36,7 +38,7 @@ FASTTComment classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTComment >> container [ "Relation named: #container type: #FASTTWithComments opposite: #comments" @@ -46,21 +48,21 @@ FASTTComment >> container [ ^ container ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTComment >> container: anObject [ container := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTComment >> containerGroup [ ^ MooseSpecializedGroup with: self container ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTComment >> content [ @@ -69,7 +71,7 @@ FASTTComment >> content [ ^ content ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTComment >> content: anObject [ content := anObject diff --git a/src/FAST-Core-Model/FASTTEntity.trait.st b/src/FAST-Core-Model/FASTTEntity.trait.st index ebcc2bb..8ee170d 100644 --- a/src/FAST-Core-Model/FASTTEntity.trait.st +++ b/src/FAST-Core-Model/FASTTEntity.trait.st @@ -11,17 +11,19 @@ any entity " Trait { - #name : #FASTTEntity, + #name : 'FASTTEntity', #instVars : [ '#endPos => FMProperty', '#startPos => FMProperty' ], #traits : 'TEntityMetaLevelDependency', #classTraits : 'TEntityMetaLevelDependency classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTEntity classSide >> annotation [ @@ -30,7 +32,7 @@ FASTTEntity classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTEntity >> endPos [ @@ -38,19 +40,19 @@ FASTTEntity >> endPos [ ^ endPos ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTEntity >> endPos: anObject [ endPos := anObject ] -{ #category : #testing } +{ #category : 'testing' } FASTTEntity >> isNonLocalDeclaration [ ^false ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTEntity >> startPos [ @@ -58,7 +60,7 @@ FASTTEntity >> startPos [ ^ startPos ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTEntity >> startPos: anObject [ startPos := anObject diff --git a/src/FAST-Core-Model/FASTTEntityCreator.trait.st b/src/FAST-Core-Model/FASTTEntityCreator.trait.st index e364486..b75a0bd 100644 --- a/src/FAST-Core-Model/FASTTEntityCreator.trait.st +++ b/src/FAST-Core-Model/FASTTEntityCreator.trait.st @@ -5,11 +5,13 @@ It provides an API for creating entities and adding them to the model. " Trait { - #name : #FASTTEntityCreator, - #category : #'FAST-Core-Model-Model' + #name : 'FASTTEntityCreator', + #category : 'FAST-Core-Model-Model', + #package : 'FAST-Core-Model', + #tag : 'Model' } -{ #category : #meta } +{ #category : 'meta' } FASTTEntityCreator classSide >> annotation [ @@ -18,7 +20,7 @@ FASTTEntityCreator classSide >> annotation [ ^ self ] -{ #category : #'entity creation' } +{ #category : 'entity creation' } FASTTEntityCreator >> newEntity [ diff --git a/src/FAST-Core-Model/FASTTExpression.trait.st b/src/FAST-Core-Model/FASTTExpression.trait.st index cb7b68d..59580c3 100644 --- a/src/FAST-Core-Model/FASTTExpression.trait.st +++ b/src/FAST-Core-Model/FASTTExpression.trait.st @@ -26,7 +26,7 @@ An abstract superclass representing an expression node of a source code. " Trait { - #name : #FASTTExpression, + #name : 'FASTTExpression', #instVars : [ '#argumentOwner => FMOne type: #FASTTWithArguments opposite: #arguments', '#assignedIn => FMOne type: #FASTTAssignment opposite: #expression', @@ -38,10 +38,12 @@ Trait { ], #traits : 'FASTTEntity', #classTraits : 'FASTTEntity classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTExpression classSide >> annotation [ @@ -50,7 +52,7 @@ FASTTExpression classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> argumentOwner [ "Relation named: #argumentOwner type: #FASTTWithArguments opposite: #arguments" @@ -60,21 +62,21 @@ FASTTExpression >> argumentOwner [ ^ argumentOwner ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> argumentOwner: anObject [ argumentOwner := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTExpression >> argumentOwnerGroup [ ^ MooseSpecializedGroup with: self argumentOwner ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> assignedIn [ "Relation named: #assignedIn type: #FASTTAssignment opposite: #expression" @@ -85,21 +87,21 @@ FASTTExpression >> assignedIn [ ^ assignedIn ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> assignedIn: anObject [ assignedIn := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTExpression >> assignedInGroup [ ^ MooseSpecializedGroup with: self assignedIn ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> expressionStatementOwner [ "Relation named: #expressionStatementOwner type: #FASTTExpressionStatement opposite: #expression" @@ -110,21 +112,28 @@ FASTTExpression >> expressionStatementOwner [ ^ expressionStatementOwner ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> expressionStatementOwner: anObject [ expressionStatementOwner := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTExpression >> expressionStatementOwnerGroup [ ^ MooseSpecializedGroup with: self expressionStatementOwner ] -{ #category : #accessing } +{ #category : 'testing' } +FASTTExpression >> isExpression [ + + + ^ true +] + +{ #category : 'accessing' } FASTTExpression >> parentExpression [ "Relation named: #parentExpression type: #FASTTUnaryExpression opposite: #expression" @@ -135,21 +144,21 @@ FASTTExpression >> parentExpression [ ^ parentExpression ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> parentExpression: anObject [ parentExpression := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTExpression >> parentExpressionGroup [ ^ MooseSpecializedGroup with: self parentExpression ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> parentExpressionLeft [ "Relation named: #parentExpressionLeft type: #FASTTBinaryExpression opposite: #leftOperand" @@ -160,21 +169,21 @@ FASTTExpression >> parentExpressionLeft [ ^ parentExpressionLeft ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> parentExpressionLeft: anObject [ parentExpressionLeft := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTExpression >> parentExpressionLeftGroup [ ^ MooseSpecializedGroup with: self parentExpressionLeft ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> parentExpressionRight [ "Relation named: #parentExpressionRight type: #FASTTBinaryExpression opposite: #rightOperand" @@ -185,21 +194,21 @@ FASTTExpression >> parentExpressionRight [ ^ parentExpressionRight ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> parentExpressionRight: anObject [ parentExpressionRight := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTExpression >> parentExpressionRightGroup [ ^ MooseSpecializedGroup with: self parentExpressionRight ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> returnOwner [ "Relation named: #returnOwner type: #FASTTReturnStatement opposite: #expression" @@ -210,14 +219,14 @@ FASTTExpression >> returnOwner [ ^ returnOwner ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpression >> returnOwner: anObject [ returnOwner := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTExpression >> returnOwnerGroup [ diff --git a/src/FAST-Core-Model/FASTTExpressionStatement.trait.st b/src/FAST-Core-Model/FASTTExpressionStatement.trait.st index f2fc7ed..747e179 100644 --- a/src/FAST-Core-Model/FASTTExpressionStatement.trait.st +++ b/src/FAST-Core-Model/FASTTExpressionStatement.trait.st @@ -25,16 +25,18 @@ A node of a statement which is representing a single expression. " Trait { - #name : #FASTTExpressionStatement, + #name : 'FASTTExpressionStatement', #instVars : [ '#expression => FMOne type: #FASTTExpression opposite: #expressionStatementOwner' ], #traits : 'FASTTStatement', #classTraits : 'FASTTStatement classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTExpressionStatement classSide >> annotation [ @@ -43,7 +45,7 @@ FASTTExpressionStatement classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpressionStatement >> expression [ "Relation named: #expression type: #FASTTExpression opposite: #expressionStatementOwner" @@ -52,16 +54,23 @@ FASTTExpressionStatement >> expression [ ^ expression ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTExpressionStatement >> expression: anObject [ expression := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTExpressionStatement >> expressionGroup [ ^ MooseSpecializedGroup with: self expression ] + +{ #category : 'testing' } +FASTTExpressionStatement >> isExpressionStatement [ + + + ^ true +] diff --git a/src/FAST-Core-Model/FASTTInvocation.trait.st b/src/FAST-Core-Model/FASTTInvocation.trait.st index f2c6398..8fa44e9 100644 --- a/src/FAST-Core-Model/FASTTInvocation.trait.st +++ b/src/FAST-Core-Model/FASTTInvocation.trait.st @@ -32,16 +32,18 @@ A invocation of a behavioural entity " Trait { - #name : #FASTTInvocation, + #name : 'FASTTInvocation', #instVars : [ '#invoked => FMOne type: #FASTTNamedEntity opposite: #invokedIn' ], #traits : 'FASTTExpression + FASTTWithArguments', #classTraits : 'FASTTExpression classTrait + FASTTWithArguments classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTInvocation classSide >> annotation [ @@ -50,7 +52,7 @@ FASTTInvocation classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTInvocation >> invoked [ "Relation named: #invoked type: #FASTTNamedEntity opposite: #invokedIn" @@ -59,16 +61,23 @@ FASTTInvocation >> invoked [ ^ invoked ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTInvocation >> invoked: anObject [ invoked := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTInvocation >> invokedGroup [ ^ MooseSpecializedGroup with: self invoked ] + +{ #category : 'testing' } +FASTTInvocation >> isInvocation [ + + + ^ true +] diff --git a/src/FAST-Core-Model/FASTTLiteral.trait.st b/src/FAST-Core-Model/FASTTLiteral.trait.st index 5362eb6..45533f0 100644 --- a/src/FAST-Core-Model/FASTTLiteral.trait.st +++ b/src/FAST-Core-Model/FASTTLiteral.trait.st @@ -32,16 +32,18 @@ FLAG: should refactor some literals to core-model " Trait { - #name : #FASTTLiteral, + #name : 'FASTTLiteral', #instVars : [ '#primitiveValue => FMProperty' ], #traits : 'FASTTExpression', #classTraits : 'FASTTExpression classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTLiteral classSide >> annotation [ @@ -50,7 +52,14 @@ FASTTLiteral classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'testing' } +FASTTLiteral >> isLiteral [ + + + ^ true +] + +{ #category : 'accessing' } FASTTLiteral >> primitiveValue [ @@ -59,7 +68,7 @@ FASTTLiteral >> primitiveValue [ ^ primitiveValue ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTLiteral >> primitiveValue: anObject [ primitiveValue := anObject diff --git a/src/FAST-Core-Model/FASTTNamedBehaviouralEntity.trait.st b/src/FAST-Core-Model/FASTTNamedBehaviouralEntity.trait.st index 2501e07..8a62c22 100644 --- a/src/FAST-Core-Model/FASTTNamedBehaviouralEntity.trait.st +++ b/src/FAST-Core-Model/FASTTNamedBehaviouralEntity.trait.st @@ -32,13 +32,15 @@ Assumed to correspond to a function or a method " Trait { - #name : #FASTTNamedBehaviouralEntity, + #name : 'FASTTNamedBehaviouralEntity', #traits : 'FASTTBehaviouralEntity + FASTTNamedEntity', #classTraits : 'FASTTBehaviouralEntity classTrait + FASTTNamedEntity classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTNamedBehaviouralEntity classSide >> annotation [ diff --git a/src/FAST-Core-Model/FASTTNamedEntity.trait.st b/src/FAST-Core-Model/FASTTNamedEntity.trait.st index 5b7f370..94551e5 100644 --- a/src/FAST-Core-Model/FASTTNamedEntity.trait.st +++ b/src/FAST-Core-Model/FASTTNamedEntity.trait.st @@ -21,17 +21,19 @@ A entity with a name " Trait { - #name : #FASTTNamedEntity, + #name : 'FASTTNamedEntity', #instVars : [ '#invokedIn => FMOne type: #FASTTInvocation opposite: #invoked', '#name => FMProperty' ], #traits : 'FASTTEntity', #classTraits : 'FASTTEntity classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTNamedEntity classSide >> annotation [ @@ -40,7 +42,7 @@ FASTTNamedEntity classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTNamedEntity >> invokedIn [ "Relation named: #invokedIn type: #FASTTInvocation opposite: #invoked" @@ -51,21 +53,21 @@ FASTTNamedEntity >> invokedIn [ ^ invokedIn ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTNamedEntity >> invokedIn: anObject [ invokedIn := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTNamedEntity >> invokedInGroup [ ^ MooseSpecializedGroup with: self invokedIn ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTNamedEntity >> name [ @@ -73,7 +75,7 @@ FASTTNamedEntity >> name [ ^ name ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTNamedEntity >> name: anObject [ name := anObject diff --git a/src/FAST-Core-Model/FASTTNullPointerLiteral.trait.st b/src/FAST-Core-Model/FASTTNullPointerLiteral.trait.st index 003786e..bf96123 100644 --- a/src/FAST-Core-Model/FASTTNullPointerLiteral.trait.st +++ b/src/FAST-Core-Model/FASTTNullPointerLiteral.trait.st @@ -27,13 +27,15 @@ An undefined object literal " Trait { - #name : #FASTTNullPointerLiteral, + #name : 'FASTTNullPointerLiteral', #traits : 'FASTTLiteral', #classTraits : 'FASTTLiteral classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTNullPointerLiteral classSide >> annotation [ @@ -41,3 +43,10 @@ FASTTNullPointerLiteral classSide >> annotation [ ^ self ] + +{ #category : 'testing' } +FASTTNullPointerLiteral >> isNullPointerLiteral [ + + + ^ true +] diff --git a/src/FAST-Core-Model/FASTTNumericalLiteral.trait.st b/src/FAST-Core-Model/FASTTNumericalLiteral.trait.st index 36a41b4..242fe40 100644 --- a/src/FAST-Core-Model/FASTTNumericalLiteral.trait.st +++ b/src/FAST-Core-Model/FASTTNumericalLiteral.trait.st @@ -27,13 +27,15 @@ A numerical literal " Trait { - #name : #FASTTNumericalLiteral, + #name : 'FASTTNumericalLiteral', #traits : 'FASTTLiteral', #classTraits : 'FASTTLiteral classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTNumericalLiteral classSide >> annotation [ @@ -41,3 +43,10 @@ FASTTNumericalLiteral classSide >> annotation [ ^ self ] + +{ #category : 'testing' } +FASTTNumericalLiteral >> isNumericalLiteral [ + + + ^ true +] diff --git a/src/FAST-Core-Model/FASTTReturnStatement.trait.st b/src/FAST-Core-Model/FASTTReturnStatement.trait.st index 9fdc286..fa59d42 100644 --- a/src/FAST-Core-Model/FASTTReturnStatement.trait.st +++ b/src/FAST-Core-Model/FASTTReturnStatement.trait.st @@ -25,16 +25,18 @@ A return statement node. Contains a reference to the expression which is returne " Trait { - #name : #FASTTReturnStatement, + #name : 'FASTTReturnStatement', #instVars : [ '#expression => FMOne type: #FASTTExpression opposite: #returnOwner' ], #traits : 'FASTTStatement', #classTraits : 'FASTTStatement classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTReturnStatement classSide >> annotation [ @@ -43,7 +45,7 @@ FASTTReturnStatement classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTReturnStatement >> expression [ "Relation named: #expression type: #FASTTExpression opposite: #returnOwner" @@ -52,16 +54,23 @@ FASTTReturnStatement >> expression [ ^ expression ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTReturnStatement >> expression: anObject [ expression := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTReturnStatement >> expressionGroup [ ^ MooseSpecializedGroup with: self expression ] + +{ #category : 'testing' } +FASTTReturnStatement >> isReturnStatement [ + + + ^ true +] diff --git a/src/FAST-Core-Model/FASTTScopableEntity.trait.st b/src/FAST-Core-Model/FASTTScopableEntity.trait.st index bb2f771..d04acb2 100644 --- a/src/FAST-Core-Model/FASTTScopableEntity.trait.st +++ b/src/FAST-Core-Model/FASTTScopableEntity.trait.st @@ -13,13 +13,15 @@ Some statements are scopable because they allow to introduce local variables (e. " Trait { - #name : #FASTTScopableEntity, + #name : 'FASTTScopableEntity', #traits : 'FASTTEntity', #classTraits : 'FASTTEntity classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTScopableEntity classSide >> annotation [ @@ -27,3 +29,10 @@ FASTTScopableEntity classSide >> annotation [ ^ self ] + +{ #category : 'testing' } +FASTTScopableEntity >> isScopableEntity [ + + + ^ true +] diff --git a/src/FAST-Core-Model/FASTTStatement.trait.st b/src/FAST-Core-Model/FASTTStatement.trait.st index 56ec29a..a90117b 100644 --- a/src/FAST-Core-Model/FASTTStatement.trait.st +++ b/src/FAST-Core-Model/FASTTStatement.trait.st @@ -20,16 +20,18 @@ An abstract subclass which represents a source code statemnet " Trait { - #name : #FASTTStatement, + #name : 'FASTTStatement', #instVars : [ '#statementContainer => FMOne type: #FASTTStatementBlock opposite: #statements' ], #traits : 'FASTTEntity', #classTraits : 'FASTTEntity classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTStatement classSide >> annotation [ @@ -38,14 +40,14 @@ FASTTStatement classSide >> annotation [ ^ self ] -{ #category : #testing } +{ #category : 'testing' } FASTTStatement >> isStatement [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTStatement >> statementContainer [ "Relation named: #statementContainer type: #FASTTStatementBlock opposite: #statements" @@ -55,14 +57,14 @@ FASTTStatement >> statementContainer [ ^ statementContainer ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTStatement >> statementContainer: anObject [ statementContainer := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTStatement >> statementContainerGroup [ diff --git a/src/FAST-Core-Model/FASTTStatementBlock.trait.st b/src/FAST-Core-Model/FASTTStatementBlock.trait.st index bb2ff2e..0390133 100644 --- a/src/FAST-Core-Model/FASTTStatementBlock.trait.st +++ b/src/FAST-Core-Model/FASTTStatementBlock.trait.st @@ -26,17 +26,19 @@ A block of statements as ones in C-like langs with {} " Trait { - #name : #FASTTStatementBlock, + #name : 'FASTTStatementBlock', #instVars : [ '#fastBehaviouralParent => FMOne type: #FASTTBehaviouralEntity opposite: #statementBlock', '#statements => FMMany type: #FASTTStatement opposite: #statementContainer' ], #traits : 'FASTTStatement', #classTraits : 'FASTTStatement classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTStatementBlock classSide >> annotation [ @@ -45,13 +47,13 @@ FASTTStatementBlock classSide >> annotation [ ^ self ] -{ #category : #adding } +{ #category : 'adding' } FASTTStatementBlock >> addStatement: anObject [ ^ self statements add: anObject ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTStatementBlock >> fastBehaviouralParent [ "Relation named: #fastBehaviouralParent type: #FASTTBehaviouralEntity opposite: #statementBlock" @@ -62,21 +64,28 @@ FASTTStatementBlock >> fastBehaviouralParent [ ^ fastBehaviouralParent ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTStatementBlock >> fastBehaviouralParent: anObject [ fastBehaviouralParent := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTStatementBlock >> fastBehaviouralParentGroup [ ^ MooseSpecializedGroup with: self fastBehaviouralParent ] -{ #category : #accessing } +{ #category : 'testing' } +FASTTStatementBlock >> isStatementBlock [ + + + ^ true +] + +{ #category : 'accessing' } FASTTStatementBlock >> statements [ "Relation named: #statements type: #FASTTStatement opposite: #statementContainer" @@ -86,14 +95,14 @@ FASTTStatementBlock >> statements [ ^ statements ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTStatementBlock >> statements: anObject [ statements value: anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTStatementBlock >> statementsGroup [ diff --git a/src/FAST-Core-Model/FASTTStringLiteral.trait.st b/src/FAST-Core-Model/FASTTStringLiteral.trait.st index e416e48..a42cb92 100644 --- a/src/FAST-Core-Model/FASTTStringLiteral.trait.st +++ b/src/FAST-Core-Model/FASTTStringLiteral.trait.st @@ -27,13 +27,15 @@ A string literal " Trait { - #name : #FASTTStringLiteral, + #name : 'FASTTStringLiteral', #traits : 'FASTTLiteral', #classTraits : 'FASTTLiteral classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTStringLiteral classSide >> annotation [ @@ -41,3 +43,10 @@ FASTTStringLiteral classSide >> annotation [ ^ self ] + +{ #category : 'testing' } +FASTTStringLiteral >> isStringLiteral [ + + + ^ true +] diff --git a/src/FAST-Core-Model/FASTTUnaryExpression.trait.st b/src/FAST-Core-Model/FASTTUnaryExpression.trait.st index aad4462..00d63ab 100644 --- a/src/FAST-Core-Model/FASTTUnaryExpression.trait.st +++ b/src/FAST-Core-Model/FASTTUnaryExpression.trait.st @@ -32,17 +32,19 @@ A trait representing an unary expression of a node of a source code. " Trait { - #name : #FASTTUnaryExpression, + #name : 'FASTTUnaryExpression', #instVars : [ '#expression => FMOne type: #FASTTExpression opposite: #parentExpression', '#operator => FMProperty' ], #traits : 'FASTTExpression', #classTraits : 'FASTTExpression classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTUnaryExpression classSide >> annotation [ @@ -51,7 +53,7 @@ FASTTUnaryExpression classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTUnaryExpression >> expression [ "Relation named: #expression type: #FASTTExpression opposite: #parentExpression" @@ -60,21 +62,28 @@ FASTTUnaryExpression >> expression [ ^ expression ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTUnaryExpression >> expression: anObject [ expression := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTUnaryExpression >> expressionGroup [ ^ MooseSpecializedGroup with: self expression ] -{ #category : #accessing } +{ #category : 'testing' } +FASTTUnaryExpression >> isUnaryExpression [ + + + ^ true +] + +{ #category : 'accessing' } FASTTUnaryExpression >> operator [ @@ -83,7 +92,7 @@ FASTTUnaryExpression >> operator [ ^ operator ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTUnaryExpression >> operator: anObject [ operator := anObject diff --git a/src/FAST-Core-Model/FASTTVariableEntity.trait.st b/src/FAST-Core-Model/FASTTVariableEntity.trait.st index e80fb86..0edd90e 100644 --- a/src/FAST-Core-Model/FASTTVariableEntity.trait.st +++ b/src/FAST-Core-Model/FASTTVariableEntity.trait.st @@ -23,17 +23,19 @@ A node for variable name not in a expression (example: assigned variable or para " Trait { - #name : #FASTTVariableEntity, + #name : 'FASTTVariableEntity', #instVars : [ '#parameterOwner => FMOne type: #FASTTWithParameters opposite: #parameters', '#parentAssignmentExpression => FMOne type: #FASTTAssignment opposite: #variable' ], #traits : 'FASTTNamedEntity', #classTraits : 'FASTTNamedEntity classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTVariableEntity classSide >> annotation [ @@ -42,7 +44,14 @@ FASTTVariableEntity classSide >> annotation [ ^ self ] -{ #category : #accessing } +{ #category : 'testing' } +FASTTVariableEntity >> isVariableEntity [ + + + ^ true +] + +{ #category : 'accessing' } FASTTVariableEntity >> parameterOwner [ "Relation named: #parameterOwner type: #FASTTWithParameters opposite: #parameters" @@ -52,21 +61,21 @@ FASTTVariableEntity >> parameterOwner [ ^ parameterOwner ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTVariableEntity >> parameterOwner: anObject [ parameterOwner := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTVariableEntity >> parameterOwnerGroup [ ^ MooseSpecializedGroup with: self parameterOwner ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTVariableEntity >> parentAssignmentExpression [ "Relation named: #parentAssignmentExpression type: #FASTTAssignment opposite: #variable" @@ -77,14 +86,14 @@ FASTTVariableEntity >> parentAssignmentExpression [ ^ parentAssignmentExpression ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTVariableEntity >> parentAssignmentExpression: anObject [ parentAssignmentExpression := anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTVariableEntity >> parentAssignmentExpressionGroup [ diff --git a/src/FAST-Core-Model/FASTTVariableExpression.trait.st b/src/FAST-Core-Model/FASTTVariableExpression.trait.st index 01a82b8..89452b8 100644 --- a/src/FAST-Core-Model/FASTTVariableExpression.trait.st +++ b/src/FAST-Core-Model/FASTTVariableExpression.trait.st @@ -28,13 +28,15 @@ A node that wraps around structural entity " Trait { - #name : #FASTTVariableExpression, + #name : 'FASTTVariableExpression', #traits : 'FASTTExpression + FASTTNamedEntity', #classTraits : 'FASTTExpression classTrait + FASTTNamedEntity classTrait', - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTVariableExpression classSide >> annotation [ @@ -42,3 +44,10 @@ FASTTVariableExpression classSide >> annotation [ ^ self ] + +{ #category : 'testing' } +FASTTVariableExpression >> isVariableExpression [ + + + ^ true +] diff --git a/src/FAST-Core-Model/FASTTWithArguments.trait.st b/src/FAST-Core-Model/FASTTWithArguments.trait.st index e47ff33..dd0a41d 100644 --- a/src/FAST-Core-Model/FASTTWithArguments.trait.st +++ b/src/FAST-Core-Model/FASTTWithArguments.trait.st @@ -13,14 +13,16 @@ I have arguments " Trait { - #name : #FASTTWithArguments, + #name : 'FASTTWithArguments', #instVars : [ '#arguments => FMMany type: #FASTTExpression opposite: #argumentOwner' ], - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTWithArguments classSide >> annotation [ @@ -29,13 +31,13 @@ FASTTWithArguments classSide >> annotation [ ^ self ] -{ #category : #adding } +{ #category : 'adding' } FASTTWithArguments >> addArgument: anObject [ ^ self arguments add: anObject ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTWithArguments >> arguments [ "Relation named: #arguments type: #FASTTExpression opposite: #argumentOwner" @@ -45,14 +47,14 @@ FASTTWithArguments >> arguments [ ^ arguments ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTWithArguments >> arguments: anObject [ arguments value: anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTWithArguments >> argumentsGroup [ diff --git a/src/FAST-Core-Model/FASTTWithComments.trait.st b/src/FAST-Core-Model/FASTTWithComments.trait.st index e41e00e..98e0937 100644 --- a/src/FAST-Core-Model/FASTTWithComments.trait.st +++ b/src/FAST-Core-Model/FASTTWithComments.trait.st @@ -13,14 +13,16 @@ For entities with comments. In FAST, they are called containers. " Trait { - #name : #FASTTWithComments, + #name : 'FASTTWithComments', #instVars : [ '#comments => FMMany type: #FASTTComment opposite: #container' ], - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTWithComments classSide >> annotation [ @@ -29,13 +31,13 @@ FASTTWithComments classSide >> annotation [ ^ self ] -{ #category : #adding } +{ #category : 'adding' } FASTTWithComments >> addComment: anObject [ ^ self comments add: anObject ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTWithComments >> comments [ "Relation named: #comments type: #FASTTComment opposite: #container" @@ -45,21 +47,21 @@ FASTTWithComments >> comments [ ^ comments ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTWithComments >> comments: anObject [ comments value: anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTWithComments >> commentsGroup [ ^ MooseSpecializedGroup withAll: self comments asSet ] -{ #category : #adding } +{ #category : 'adding' } FASTTWithComments >> hasComments [ @@ -67,7 +69,7 @@ FASTTWithComments >> hasComments [ ^ self comments isNotEmpty ] -{ #category : #adding } +{ #category : 'adding' } FASTTWithComments >> numberOfComments [ @@ -82,12 +84,12 @@ FASTTWithComments >> numberOfComments [ ] -{ #category : #adding } +{ #category : 'adding' } FASTTWithComments >> numberOfComments: aNumber [ self cacheAt: #numberOfComments put: aNumber ] -{ #category : #adding } +{ #category : 'adding' } FASTTWithComments >> removeComment: aComment [ self comments remove: aComment ] diff --git a/src/FAST-Core-Model/FASTTWithParameters.trait.st b/src/FAST-Core-Model/FASTTWithParameters.trait.st index bd8bafd..adb87fb 100644 --- a/src/FAST-Core-Model/FASTTWithParameters.trait.st +++ b/src/FAST-Core-Model/FASTTWithParameters.trait.st @@ -13,14 +13,16 @@ I have parameters " Trait { - #name : #FASTTWithParameters, + #name : 'FASTTWithParameters', #instVars : [ '#parameters => FMMany type: #FASTTVariableEntity opposite: #parameterOwner' ], - #category : #'FAST-Core-Model-Traits' + #category : 'FAST-Core-Model-Traits', + #package : 'FAST-Core-Model', + #tag : 'Traits' } -{ #category : #meta } +{ #category : 'meta' } FASTTWithParameters classSide >> annotation [ @@ -29,13 +31,13 @@ FASTTWithParameters classSide >> annotation [ ^ self ] -{ #category : #adding } +{ #category : 'adding' } FASTTWithParameters >> addParameter: anObject [ ^ self parameters add: anObject ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTWithParameters >> parameters [ "Relation named: #parameters type: #FASTTVariableEntity opposite: #parameterOwner" @@ -45,14 +47,14 @@ FASTTWithParameters >> parameters [ ^ parameters ] -{ #category : #accessing } +{ #category : 'accessing' } FASTTWithParameters >> parameters: anObject [ parameters value: anObject ] -{ #category : #navigation } +{ #category : 'navigation' } FASTTWithParameters >> parametersGroup [ diff --git a/src/FAST-Core-Model/package.st b/src/FAST-Core-Model/package.st index 5983798..527dba6 100644 --- a/src/FAST-Core-Model/package.st +++ b/src/FAST-Core-Model/package.st @@ -1 +1 @@ -Package { #name : #'FAST-Core-Model' } +Package { #name : 'FAST-Core-Model' } diff --git a/src/FAST-Model-Generator/FASTMetamodelGenerator.class.st b/src/FAST-Model-Generator/FASTMetamodelGenerator.class.st index 545596b..6b69b57 100644 --- a/src/FAST-Model-Generator/FASTMetamodelGenerator.class.st +++ b/src/FAST-Model-Generator/FASTMetamodelGenerator.class.st @@ -4,8 +4,8 @@ Use me to generate the MetaModel of FAST NOTE: I generate the Core FAST Model and the Java FAST Model because we can't currently do `resetMetadata` with extended metamodel generated by FamixNG " Class { - #name : #FASTMetamodelGenerator, - #superclass : #FamixMetamodelGenerator, + #name : 'FASTMetamodelGenerator', + #superclass : 'FamixMetamodelGenerator', #instVars : [ 'entity', 'tWithArguments', @@ -35,31 +35,32 @@ Class { 'tBinaryExpression', 'tUnaryExpression' ], - #category : #'FAST-Model-Generator' + #category : 'FAST-Model-Generator', + #package : 'FAST-Model-Generator' } -{ #category : #accessing } +{ #category : 'accessing' } FASTMetamodelGenerator class >> packageName [ ^ #'FAST-Core-Model' ] -{ #category : #accessing } +{ #category : 'accessing' } FASTMetamodelGenerator class >> prefix [ ^ #FAST ] -{ #category : #accessing } +{ #category : 'accessing' } FASTMetamodelGenerator class >> submetamodels [ ^ { FamixGenerator } ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTAssignment [ ^ 'A node representing an assignment' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTBehaviouralEntity [ ^ 'Represents a generic behavioural entity which has parameters and local variables, as well as statements. @@ -70,50 +71,50 @@ Has parameters , and a body (StatementBlock). Local variables are intended to be stored in the local entities of the body' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTBinaryExpression [ ^ 'A trait representing a binary expression of a node of a source code.' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTBooleanLiteral [ ^ 'A boolean literal' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTCharacterLiteral [ ^ 'A character literal' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTComment [ ^ 'FASTComment represents one instance of a comment (in the sense of programming language comments) for any FAST sourced entity. The commented sourced entity is called the container in the FAST model.' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTEntity [ ^ 'A FASTEntity is an abstract class for all FAST classes Primarily introduced to deal with symbol resolution matters.' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTExpression [ ^ 'An abstract superclass representing an expression node of a source code.' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTExpressionStatement [ ^ 'A node of a statement which is representing a single expression. ' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTInvocation [ ^ 'A invocation of a behavioural entity' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTLiteral [ ^ 'A literal node. @@ -123,7 +124,7 @@ FLAG: should refactor some literals to core-model e.g.: character, int, float, string, boolean ' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTNamedBehaviouralEntity [ ^ '@FLAG: May be could be removed to have a simpler core model. Each language would have to implement it correctly then @@ -133,71 +134,71 @@ A behavioural entity that can be referenced with a name. Assumed to correspond to a function or a method' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTNullPointerLiteral [ ^ 'An undefined object literal' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTNumericalLiteral [ ^ 'A numerical literal' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTReturnStatement [ ^ 'A return statement node. Contains a reference to the expression which is returned. ' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTScopableEntity [ ^ 'A Entity with an optional scope Some statements are scopable because they allow to introduce local variables (e.g. for statement in Java)' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTStatement [ ^ 'An abstract subclass which represents a source code statemnet ' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTStatementBlock [ ^ 'A block of statements as ones in C-like langs with {}' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTStringLiteral [ ^ 'A string literal' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTUnaryExpression [ ^ 'A trait representing an unary expression of a node of a source code.' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTVariableEntity [ ^ 'A node for variable name not in a expression (example: assigned variable or parameter)' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTVariableExpression [ ^ 'A node that wraps around structural entity' ] -{ #category : #comments } +{ #category : 'comments' } FASTMetamodelGenerator >> commentForTWithComments [ ^ ' For entities with comments. In FAST, they are called containers. ' ] -{ #category : #definition } +{ #category : 'definition' } FASTMetamodelGenerator >> defineClasses [ super defineClasses. entity := builder newClassNamed: #Entity comment: 'any entity'. ] -{ #category : #definition } +{ #category : 'definition' } FASTMetamodelGenerator >> defineHierarchy [ super defineHierarchy. tEntity --|> #TEntityMetaLevelDependency. @@ -237,7 +238,7 @@ FASTMetamodelGenerator >> defineHierarchy [ tNamedEntity --|> tEntity. ] -{ #category : #definition } +{ #category : 'definition' } FASTMetamodelGenerator >> defineProperties [ super defineProperties. @@ -261,7 +262,7 @@ FASTMetamodelGenerator >> defineProperties [ ] -{ #category : #definition } +{ #category : 'definition' } FASTMetamodelGenerator >> defineRelations [ super defineRelations. @@ -314,7 +315,7 @@ FASTMetamodelGenerator >> defineRelations [ ] -{ #category : #definition } +{ #category : 'definition' } FASTMetamodelGenerator >> defineTraits [ super defineTraits. tWithArguments := builder newTraitNamed: #TWithArguments comment: 'I have arguments'. @@ -324,26 +325,44 @@ FASTMetamodelGenerator >> defineTraits [ tEntity := builder newTraitNamed: #TEntity comment: 'any entity'. tNamedEntity := builder newTraitNamed: #TNamedEntity comment: 'A entity with a name'. tExpression := builder newTraitNamed: #TExpression comment: self commentForTExpression. + tExpression withTesting. tBinaryExpression := builder newTraitNamed: #TBinaryExpression comment: self commentForTBinaryExpression. + tBinaryExpression withTesting. tUnaryExpression := builder newTraitNamed: #TUnaryExpression comment: self commentForTUnaryExpression. + tUnaryExpression withTesting. tLiteral := builder newTraitNamed: #TLiteral comment: self commentForTLiteral. + tLiteral withTesting. tBooleanLiteral := builder newTraitNamed: #TBooleanLiteral comment: self commentForTBooleanLiteral. + tBooleanLiteral withTesting. tCharacterLiteral := builder newTraitNamed: #TCharacterLiteral comment: self commentForTCharacterLiteral. + tCharacterLiteral withTesting. tNullPointerLiteral := builder newTraitNamed: #TNullPointerLiteral comment: self commentForTNullPointerLiteral. + tNullPointerLiteral withTesting. tStringLiteral := builder newTraitNamed: #TStringLiteral comment: self commentForTStringLiteral. + tStringLiteral withTesting. tNumericalLiteral := builder newTraitNamed: #TNumericalLiteral comment: self commentForTNumericalLiteral. + tNumericalLiteral withTesting. tVariableExpression := builder newTraitNamed: #TVariableExpression comment: self commentForTVariableExpression. + tVariableExpression withTesting. tScopableEntity := builder newTraitNamed: #TScopableEntity comment: self commentForTScopableEntity. + tScopableEntity withTesting. tBehaviouralEntity := builder newTraitNamed: #TBehaviouralEntity comment: self commentForTBehaviouralEntity. + tBehaviouralEntity withTesting. tNamedBehaviouralEntity := builder newTraitNamed: #TNamedBehaviouralEntity comment: self commentForTNamedBehaviouralEntity. tStatement := builder newTraitNamed: #TStatement comment: self commentForTStatement. tStatement withTesting. tExpressionStatement := builder newTraitNamed: #TExpressionStatement comment: self commentForTExpressionStatement. + tExpressionStatement withTesting. tReturnStatement := builder newTraitNamed: #TReturnStatement comment: self commentForTReturnStatement. + tReturnStatement withTesting. tStatementBlock := builder newTraitNamed: #TStatementBlock comment: self commentForTStatementBlock. + tStatementBlock withTesting. tAssignment := builder newTraitNamed: #TAssignment comment: self commentForTAssignment. + tAssignment withTesting. tInvocation := builder newTraitNamed: #TInvocation comment: self commentForTInvocation. + tInvocation withTesting. tVariableEntity := builder newTraitNamed: #TVariableEntity comment: self commentForTVariableEntity. + tVariableEntity withTesting. tComment := builder newTraitNamed: #TComment. tComment comment: self commentForTComment. diff --git a/src/FAST-Model-Generator/package.st b/src/FAST-Model-Generator/package.st index cf7218c..16fa0c3 100644 --- a/src/FAST-Model-Generator/package.st +++ b/src/FAST-Model-Generator/package.st @@ -1 +1 @@ -Package { #name : #'FAST-Model-Generator' } +Package { #name : 'FAST-Model-Generator' }