Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Provisional API: This reference documents current compiler behavior. Compatibility is not yet promised.

src/main.x

X2c command dispatch.

Functions

FunctionSummary
mainInitializes x2c and dispatches one command from argv.

Functions

main

int main(int argc, char **argv)

Initializes x2c and dispatches one command from argv. argv[0] locates the installation. The process status is zero for a successful translation, build, or bootstrap, one for compiler or tool failure, and the executed program’s status for run. Help and version exit with zero, while invalid CLI and preflight input exit with status two.

Source: src/main.x:778

Design notes

Initializes the process and drives preprocessing, parsing, transformation, and output generation from one typed CLI request.