Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created FamixF77UnkownVariable #62

Merged
merged 1 commit into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/Famix-Fortran77-Entities/FamixF77ImportingContext.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ FamixF77ImportingContext >> importTypeUnknown [
^ self importConcreteEntity: (self class fm3ClassNamed: #TypeUnknown)
]

{ #category : #importing }
FamixF77ImportingContext >> importUnknownVariable [

<generated>
^ self importConcreteEntity: (self class fm3ClassNamed: #UnknownVariable)
]

{ #category : #importing }
FamixF77ImportingContext >> importVariable [

Expand Down Expand Up @@ -330,6 +337,13 @@ FamixF77ImportingContext >> shouldImportTypeUnknown [
^ self shouldImport: #TypeUnknown
]

{ #category : #testing }
FamixF77ImportingContext >> shouldImportUnknownVariable [

<generated>
^ self shouldImport: #UnknownVariable
]

{ #category : #testing }
FamixF77ImportingContext >> shouldImportVariable [

Expand Down
7 changes: 7 additions & 0 deletions src/Famix-Fortran77-Entities/FamixF77PUComment.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ FamixF77PUComment class >> annotation [
<generated>
^ self
]

{ #category : #'as yet unclassified' }
FamixF77PUComment >> resolveVariable: variableName with: resolver [
"PUComment should not exist, a Comment is not a ProgramUnit :-("

^nil
]
14 changes: 14 additions & 0 deletions src/Famix-Fortran77-Entities/FamixF77TEntityCreator.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,20 @@ FamixF77TEntityCreator >> newTypeUnknown [
^ self add: FamixF77TypeUnknown new
]

{ #category : #'entity creation' }
FamixF77TEntityCreator >> newUnknownVariable [

<generated>
^ self add: FamixF77UnknownVariable new
]

{ #category : #'entity creation' }
FamixF77TEntityCreator >> newUnknownVariableNamed: aName [

<generated>
^ self add: (FamixF77UnknownVariable named: aName)
]

{ #category : #'entity creation' }
FamixF77TEntityCreator >> newVariable [

Expand Down
43 changes: 43 additions & 0 deletions src/Famix-Fortran77-Entities/FamixF77UnknownVariable.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
"
Variable used but not resolved

## Relations
======================

### Incoming dependencies
| Relation | Origin | Opposite | Type | Comment |
|---|
| `incomingAccesses` | `FamixTAccessible` | `variable` | `FamixTAccess` | All Famix accesses pointing to this structural entity|

### Other
| Relation | Origin | Opposite | Type | Comment |
|---|
| `declaredType` | `FamixTTypedEntity` | `typedEntities` | `FamixTType` | Type of the entity, if any|
| `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity|


## Properties
======================

| Name | Type | Default value | Comment |
|---|
| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.|
| `name` | `String` | nil | Basic name of the entity, not full reference.|

"
Class {
#name : #FamixF77UnknownVariable,
#superclass : #FamixF77Entity,
#traits : 'FamixTUnknownVariable',
#classTraits : 'FamixTUnknownVariable classTrait',
#category : #'Famix-Fortran77-Entities-Entities'
}

{ #category : #meta }
FamixF77UnknownVariable class >> annotation [

<FMClass: #UnknownVariable super: #FamixF77Entity>
<package: #'Famix-Fortran77-Entities'>
<generated>
^ self
]
14 changes: 11 additions & 3 deletions src/Famix-Fortran77-Generator/FamixFortran77Generator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ Class {
'externalDeclaration',
'implicit',
'statementFunction',
'tWithStatements'
'tWithStatements',
'unknownVariable'
],
#category : #'Famix-Fortran77-Generator'
}
Expand Down Expand Up @@ -185,7 +186,12 @@ FamixFortran77Generator >> defineClasses [

variable := builder
newClassNamed: #Variable
comment: self variableEntityComment
comment: self variableEntityComment.

unknownVariable := builder
newClassNamed: #UnknownVariable
comment: 'Variable used but not resolved'.

]

{ #category : #definition }
Expand Down Expand Up @@ -277,7 +283,9 @@ FamixFortran77Generator >> defineHierarchy [

typeUnknown --|> type.

variable --|> #TLocalVariable
variable --|> #TLocalVariable.

unknownVariable --|> #TUnknownVariable
]

{ #category : #definition }
Expand Down
Loading