1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-20 18:16:35 +00:00

Compilation order should be decided by the import statements

This commit is contained in:
Karol Stasiak
2019-06-14 23:20:03 +02:00
parent ba16021426
commit f46466365b
4 changed files with 42 additions and 5 deletions
+12 -1
View File
@@ -143,7 +143,18 @@ A function can be declared at the top level. For more details, see [Functions](.
## `import` statements
TODO
import <module>
Adds a module to the program.
The module is looked up first in the current working directory, and then in the include directories.
Usually, the imported module will undergo the first phase of compilation first.
This means that the constants in the imported module will be resolved first, allowing you to use them in the importing module.
The only exception to this rule is when the importing graph has a cycle, in which case the order of modules within the cycle is unspecified.
All starting modules are considered to be imported by all source files explicitly mentioned on the command line.
## Statements