|
| argparse.ArgumentParser | _build_parser () |
| int | main (list[str]|None args=None) |
| | _run_pipeline (str input_path, str|None mapping_path=None, list[str]|None program_filter=None, str main_program="Main", bool strict=False, bool struct_flatten=False, bool debug=False, bool ignore_undefined=False, list[str]|None cli_load_head=None, list[str]|None cli_load_on_start=None) |
| None | _apply_auto_prefix_if_needed (list[tuple[str, Any]] ir_programs, 'SensorMapping' mapping) |
| | _run_multi_pipeline (list[str] input_paths, str|None mapping_path=None, list[str]|None program_filter=None, str main_program="Main", bool strict=False, bool struct_flatten=False, bool debug=False, bool ignore_undefined=False, list[str]|None cli_load_head=None, list[str]|None cli_load_on_start=None) |
CLI entry point for the st2js converter.
Provides main() function that wires the full pipeline:
read ST file -> parse_st() -> transform() -> check_types() -> generate() -> write output
Usage:
python -m st2js input.st -m mapping.yaml -o output.js
python -m st2js input.st -m mapping.yaml # output to stdout
python -m st2js input.st -m mapping.yaml --strict
python -m st2js input.st -m mapping.yaml --struct-flatten