Packages and Modules
Source code is organized into modules and packages. A module corresponds to a single source file and a package corresponds to a folder containing one or multiple modules or sub packages. Source files have the extension ".rf".
Both, file and folder names must be valid identifiers and should be written in all lower case.
Each source file must start with a module declaration:
module mypackage.subpackage.example;
The qualified identifier following the module keyword must correspond to
the relative path to the source files.
Imports
In order to access symbols defined in other modules, those modules need to be
imported using an import directive. The import keyword must be followed by
a fully qualified module name, matching the module declaration within the
imported module.
There are several forms of imports available:
Private Imports: Makes all accessible symbols of the module visible within the module that is being compiled only.
Example:
import modulename;Public Imports: Makes all accessible symbols of the module visible within the module that is currently being compiled, as well as within any module that in turn imports the module that is being compiled.
Example:
public import modulename;Selective Imports: The symbols being made visible can be restricted to a certain subset by specifying a list of symbol names.
Example:
import modulename: symbol1, symbol2;
Declarations and Definitions
⚠️ TODO
Module Constructors and Destructors
⚠️ TODO