Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Represents the return statement.
#id: id
the unique ID assigned to this fact.
#parent: id
ID of the parent node.
#encl: methodT, constructorT, classInitializerT
ID of the enclosing method declaration.
#expr: expression, null
ID of the expression of this return statement, or null if there is none.
int myFunction(){ int i = 0; return i;// corresponding code line to returnT }
methodT(#enclMethod, ..., 'myFunction', [], type(basic, int, 0), [], #parent). blockT(#parent, #enclMethod, #enclMethod, [..., #id]). returnT(#id, #parent, #enclMethod, #expr). identT(#expr, #id, #enclMethod, 'i', ...).
ast_node_def('Java',returnT,[ ast_arg(id, mult(1,1,no ), id, [execT]), % <-- convention!!! ast_arg(parent, mult(1,1,no ), id, [id]), % <-- convention!!! ast_arg(encl, mult(1,1,no ), id, [methodT, constructorT, classInitializerT]), ast_arg(expr, mult(1,1,no ), id, [expressionType,nullType]) ]).