Skip to content

Overview of Source Files and Imports

Every Quxlang source file starts with a language declaration:

LANGUAGE QUXLANG EN 0.0;

QUXLANG identifies the language, EN selects its keyword language, and 0.0 is the language version accepted by the current source fixtures.

Imports name logical modules from the active target configuration:

IMPORT foolib;
IMPORT foo_filesystem_utilities AS fs;

The first import exposes the logical module as foolib. AS changes only its local source name. Imported declarations are qualified with :::

VAR answer I32 := foolib::imported_function();
VAR path fs::path;

A source file does not declare which source directory supplies foolib; the target's module map makes that decision. This lets different targets select different versions or platform implementations without changing import sites.

Comments use // through the end of a line:

// A source comment.
VAR count I32 := 4;

See Source bundles and targets, Lexical structure, Names and scopes, and Declaration documentation.

Import scope and conditions

Imports are module-private declarations shared across files in their enclosing scope. They can appear among declarations and inside namespaces. Repeating the same import is permitted. An explicit name and a condition can be written as:

::platform IMPORT_IF(OS_LINUX) linux_support;

A public ALIAS exposes an imported owner through the importing module. The import reference specifies the visibility rules.

Reference

See the Source Files and Imports Reference for the complete language rules, constraints, and technical edge cases.