Packages, Compilation Units and Imports | Annotations | Declarations | Type Elements & Relations | Expressions | Statements | Body Level Attributes |
|---|
nopT(#id, #parent, #encl).
Represents the no operation node, signifying a lone semicolon.
Arguments
#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.
Sample Java Code
void myFunction(){ int i = 0; if (i >0){ //do nothing ; //corresponding code line to nopT } else System.out.print("Do Something"); }
Its PEF Representation
methodDefT(#enclMethod, ..., 'myFunction', [], type(basic, void, 0), [], ...). blockT(#parent, ..., #enclMethod, [#id]). nopT(#id, #parent, #enclMethod).
AST Specification
ast_node_def('Java',nopT,[
ast_arg(id, mult(1,1,no ), id, [nopT]), % <-- convention!!!
ast_arg(parent, mult(1,1,no ), id, [id]), % <-- convention!!!
ast_arg(encl, mult(1,1,no ), id, [methodT, constructorT, classInitializerT])
]).


