Skip to content

Commit d4399af

Browse files
anquetiljecisc
authored andcommitted
feat: Added FamixJavaAttribute >> getFAST
1 parent 6cbc7da commit d4399af

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Extension { #name : 'FamixJavaAttribute' }
2+
3+
{ #category : '*FAST-Java-SmaCC-Importer' }
4+
FamixJavaAttribute >> getFAST [
5+
"Attributes sourceAnchor encompass the name of the attribute and a possible initialization
6+
This can be parsed as an expression (JavaSmaCCProgramNodeImporterVisitor >> parseCodeExpressionString:)
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"
9+
10+
^(JavaSmaCCProgramNodeImporterVisitor new
11+
currentFASTEntity: (FASTJavaClassDeclaration new) ;
12+
clone)
13+
parseCodeExpressionString: self sourceAnchor sourceText
14+
]

0 commit comments

Comments
 (0)