l0_cli_args.py

l0_cli_args.py

Module: l0_cli_args

Source: compiler/stage1_py/l0_cli_args.py Language: Python

Symbols

Namespace l0_cli_args

Variable l0_cli_args._CLI_LONG_VALUE_OPTIONS

1
dict l0_cli_args._CLI_LONG_VALUE_OPTIONS

Variable l0_cli_args._CLI_NAMESPACED_SHORT_VALUE_OPTIONS

1
dict l0_cli_args._CLI_NAMESPACED_SHORT_VALUE_OPTIONS

Variable l0_cli_args._CLI_CANONICAL_SHORT_VALUE_OPTIONS

1
dict l0_cli_args._CLI_CANONICAL_SHORT_VALUE_OPTIONS

Variable l0_cli_args._CLI_OTHER_SHORT_VALUE_OPTIONS

1
dict l0_cli_args._CLI_OTHER_SHORT_VALUE_OPTIONS

Variable l0_cli_args._CLI_VALUE_OPTIONS

1
tuple l0_cli_args._CLI_VALUE_OPTIONS

Function l0_cli_args.compiler_identity_text

1
str l0_cli_args.compiler_identity_text()

Return the user-facing compiler identity/version text.

Function l0_cli_args._scan_cli_presentation_options

1
tuple[int, bool] l0_cli_args._scan_cli_presentation_options(Sequence[str] argv)

Return fallback verbosity and rich-log settings before – .

Values following value-taking options are skipped even when they resemble presentation flags, matching the normalization grammar used for parsing.

Parameters:

  • argv: The complete list of command-line arguments.

Returns: A tuple of (verbosity count, rich-log enabled).

Function l0_cli_args._emit_verbose_compiler_identity

1
None l0_cli_args._emit_verbose_compiler_identity(argparse.Namespace args)

Emit the compiler identity through the normal verbose logging path.

Function l0_cli_args._add_target_args

1
None l0_cli_args._add_target_args(argparse.ArgumentParser parser)

Add target module/file arguments to the parser.

Parameters:

  • parser: The argument parser to update.

    Function l0_cli_args._add_all_modules_arg

1
None l0_cli_args._add_all_modules_arg(argparse.ArgumentParser parser)

Add the all-modules flag to the parser.

Parameters:

  • parser: The argument parser to update.

    Function l0_cli_args._add_runtime_args

1
None l0_cli_args._add_runtime_args(argparse.ArgumentParser parser)

Add runtime-related arguments to the parser.

Parameters:

  • parser: The argument parser to update.

    Function l0_cli_args._add_codegen_arg

1
None l0_cli_args._add_codegen_arg(argparse.ArgumentParser parser)

Add codegen-related arguments to the parser.

Parameters:

  • parser: The argument parser to update.

    Function l0_cli_args._split_cli_and_program_args

1
tuple[list[str], list[str], bool] l0_cli_args._split_cli_and_program_args(Sequence[str] argv)

Split compiler CLI arguments from program arguments.

Parameters:

  • argv: The complete list of command-line arguments.

Returns: A tuple of (compiler_args, program_args, separator_present).

Function l0_cli_args._normalize_cli_argv

1
list[str] l0_cli_args._normalize_cli_argv(argparse.ArgumentParser parser, Sequence[str] argv)

Normalize exact short-option spellings before passing them to argparse.

Namespaced value options support a following value or =VALUE , but not a concatenated value. Canonical -I , -L , and -l options accept attached or following values, but not =VALUE . Only -v may form a cluster.

Parameters:

  • parser: The argument parser for reporting errors.
  • argv: Compiler arguments before the optional -- separator.

Returns: A normalized compiler argument list.

Function l0_cli_args._validate_mode_scoped_flags

1
None l0_cli_args._validate_mode_scoped_flags(argparse.ArgumentParser parser, argparse.Namespace args)

Reject flags that were provided for a mode where they are not valid.

Parameters:

  • parser: The argument parser for reporting errors.
  • args: The parsed command-line arguments.

    Function l0_cli_args._validate_reserved_canonical_flags

1
None l0_cli_args._validate_reserved_canonical_flags(argparse.ArgumentParser parser, argparse.Namespace args)

Reject canonical compiler options whose behavior is not implemented.

Parameters:

  • parser: The argument parser for reporting errors.
  • args: The parsed command-line arguments.

    Function l0_cli_args.parse_args

1
argparse.Namespace l0_cli_args.parse_args(list[str]|None argv=None)

Parse and validate compiler arguments.

Parameters:

  • argv: Arguments to parse, or the current process arguments when omitted.

Returns: The validated command options.