Language Support

Natural Docs supports multiple programming languages, but they do not all get the same features.

Full Support

Full language support means Natural Docs has a parser written specifically for that programming language, allowing it to interpret the code and not just the comments. This has the following benefits:

- Full code documentation. Natural Docs can document all classes, functions, and other code elements regardless of whether or not they have comments written for them.

- Full inheritance diagrams. Natural Docs will always include a class's parents and children in its documentation.

- Javadoc and XML compatibility. Natural Docs can incorporate any existing Javadoc and Microsoft XML comments (with some limitations) into the documentation.

- Headerless Natural Docs comments. You can use the Javadoc comment symbols to skip adding a keyword and title to each comment.

- Code scoping rules. Comments use the code to determine scope whenever possible.

Basic Support

Basic language support means Natural Docs uses the settings in Languages.txt to determine how to read comments and collect prototypes. Sometimes there is code written to help a feature work with a specific language, but for the most part it uses generalized code. This has the benefit of making it really easy to add support for new languages, but it also has a few limitations:

- Commented code only. Natural Docs can only find its own comments, so only things that are commented will be included in the documentation.

- Some inheritance diagrams. Natural Docs can include a class's parents and children in the documentation if it's commented and the language uses a syntax similar to C++ or Java, such as "class A inherits B" or "class A : public B", though some languages like Python and Ruby have code written to handle their syntax as well.

- Natural Docs comments only. Natural Docs can't include Javadoc or Microsoft XML comments in the documentation because without a keyword and title it can't detect what they're for.

- Comment scoping rules. Natural Docs uses the sequence of comments to determine scope, which will work fine as long as you're commenting everything.

Languages

| Language Support | Inhertance Diagrams
--- | --- | ---
ActionScript | Basic | Commented Classes
Ada | Basic | -
Assembly | Basic | -
C | Basic | -
C++ | Basic | Commented Classes
C# | Full | All Classes
ColdFusion | Basic | -
Fortran free-format only | Basic | -
Java | Basic | Commented Classes
JavaScript | Basic | -
Makefiles | Basic | -
Pascal/Delphi | Basic | -
Perl | Basic | -
PHP | Basic | Commented Classes
PL/SQL | Basic | -
Python | Basic | Commented Classes
R | Basic | -
Ruby | Basic | Commented Classes1
Tcl | Basic | -
Text Files | Basic | -
Visual Basic | Basic | -
Any languages you define | Basic | Maybe2
1 Only classes, not modules with mixins. 2 Commented classes in languages that have a C++ or Java-like inheritance syntax.

Next: Comments