Luckily, haXe provides a nice tool to produce
documentation automatically using the code itself and its comments.
The compiler when used with the flag - xml produces an XML file that contains the full description of
all the code used in the compiled project. The XML contains information about every aspect of the code
from class definitions to variable types. In addition, some of the comments are preserved and
conveniently associated to the code they describe. To be included in the XML file, the comments must be
of the block type and use two asterisks after the slash instead of a single one; all comments that do not
conform to this signature will be discarded. As an example, the following enum has been correctly
commented for documentation.
// fragment of file QueryTools.hx
/**
* A condition is a test to perform in the query. Many conditions can be
* joined together using the ???and??? or ???or??? constructors.
*/
enum Condition
{
/**
* Test if the passed field is Null.
*/
167
Chapter 6: Organizing Your Code
TestIsNull(field : String);
/**
* Test a numeric field against a value using a numeric operator.
Pages:
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334