Skip to content

Commit 11829a5

Browse files
authored
Merge pull request #253 from moosetechnology/getFAST-Attribute
FamixJavaAttribute-getFAST
2 parents 3ee7107 + 58970c0 commit 11829a5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/FAST-Java-SmaCC-Importer/FamixJavaAttribute.extension.st

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ Extension { #name : 'FamixJavaAttribute' }
44
FamixJavaAttribute >> getFAST [
55
"Attributes sourceAnchor encompass the name of the attribute and a possible initialization
66
This can be parsed as an expression (JavaSmaCCProgramNodeImporterVisitor >> parseCodeExpressionString:)
7-
"
7+
For this to work properly, the Java importer must be set as being on a Class declaration
8+
then `clone` will create a sub-parser for the expression"
89

9-
^JavaSmaCCProgramNodeImporterVisitor new
10-
getExpressionAST: self sourceAnchor sourceText
10+
^(JavaSmaCCProgramNodeImporterVisitor new
11+
currentFASTEntity: (FASTJavaClassDeclaration new) ;
12+
clone)
13+
parseCodeExpressionString: self sourceAnchor sourceText
1114
]

0 commit comments

Comments
 (0)