Generate DeclaredAt annotations
Issue #240
resolved
JastAdd 2.1.13
This is a feature request from MSc students using JastAdd.
The suggestion is to generate AST annotations with the declaration location for attributes, similar to the ones that annotate child getters and attribute methods currently.
For example:
/**
* @attribute inh
* @aspect TypeAnalysis
* @declaredat /home/jesper/git/simplic/src/jastadd/TypeAnalysis.jrag:32
*/
@ASTNodeAnnotation.Attribute
@DeclaredAt("/home/jesper/git/simplic/src/jastadd/TypeAnalysis.jrag:32")
public Type expectedType() {
Type expectedType_value = getParent().Define_expectedType(this, null);
return expectedType_value;
}
Comments (2)
-
Account Deactivated -
- changed status to resolved
- Log in to comment
It would likely be useful to be able to get the paths relative to some specified folder. This would allow the generated Java code to be moved to another location without invalidating the paths.