added consistent _main
This commit is contained in:
@@ -8,6 +8,11 @@ The Clyx runtime itself allows the programmer to redefine any already defined wo
|
||||
|
||||
The conventional source file suffix for Clyx code is `.clx`.
|
||||
|
||||
### Execution and Entry Point
|
||||
The Clyx interpreter accepts one or more `.clx` source files as command-line arguments. If multiple files are specified, the interpreter executes them in the order they are passed.
|
||||
|
||||
After running all specified source files, the interpreter checks if a word named `_main` is defined in the workspace. If `_main` is present, it is automatically executed as the program's entry point. If no arguments are passed, it runs the standard interactive REPL.
|
||||
|
||||
With the reference implementation installed in a POSIX-compatible environment, Clyx program sources may be made executable if they start with a `#!/usr/bin/env clyx` shebang.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user