Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Represents the do 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 element.
#condition: expression
ID of the expression of the loop condition of this do statement.
#body statement
ID of the body of this do statement.
void main() { int i = 0; do{ i++; }while(i<10); }
methodT(#Method, _, 'main', [], type(basic, void, 0), [], #Block), ... doWhileT(#DoWhile, #Block, #Method, #Operation, #BlockDo), blockT(#BlockDo, #DoWhile, #Method, [...]), ... operationT(#Operation, #DoWhile, #Method, [...], '<', 0), ...
ast_node_def('Java',doWhileT,[ ast_arg(id, mult(1,1,no ), id, [doWhileT]), % <-- convention!!! ast_arg(parent, mult(1,1,no ), id, [id]), % <-- convention!!! ast_arg(encl, mult(1,1,no ), id, [methodT, constructorT, classInitializerT]), ast_arg(cond, mult(1,1,no ), id, [expressionType]), ast_arg(body, mult(1,1,no ), id, [statementType]) ]).