Source Files

An o42a source file is a text file with .o42a extension. The source file encoding considered UTF-8, unless explicitly overridden. Each project has at least one such file.

A project may contain multiple source files. But despite their number, the o42ac compiler accepts only one as argument. This file contains a main module definition and the name of this file corresponds to the name of that module.

Each source file declares exactly one object and contains this object’s definition, including arbitrary number of fields. Any field of the object may also be declared in external file. External source files, containing object fields’ declarations should be placed in the directory with the same name as object’s source file excluding .o42a extension. The name of each file should correspond to the name of the field. Such file, in turn, declares an object, so the fields of this object can be declared in external files too.

The source file should conform to the file structure and follow the naming conventions.

A project files layout could look like this:
Source tree