Skip to content

Modular design

Yuriy edited this page May 13, 2025 · 1 revision

What are modules

Your parser can be separated to different files, every file being module. Several files can be of one module. You can import module through import and use it's features

Module declaration

module foo;

Import module

import foo; // import as namespace
import NUMBER, STRING from foo; // import something special from foo
import * from foo; // import everything globally from foo

Clone this wiki locally