main
¶
Arx main module.
Classes:
-
ArxMain
–The main class for calling Arx compiler.
Functions:
-
get_module_name_from_file_path
–Return the module name from the source file name.
ArxMain
dataclass
¶
The main class for calling Arx compiler.
Methods:
-
compile
–Compile the given input file.
-
run
–Compile the given source code.
-
run_shell
–Open arx in shell mode.
-
show_ast
–Print the AST for the given input file.
-
show_llvm_ir
–Compile into LLVM IR the given input file.
-
show_tokens
–Print the AST for the given input file.
compile
¶
compile(show_llvm_ir: bool = False) -> None
Compile the given input file.
Source code in src/arx/main.py
89 90 91 92 93 |
|
run
¶
Compile the given source code.
Source code in src/arx/main.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
run_shell
¶
run_shell() -> None
Open arx in shell mode.
Source code in src/arx/main.py
85 86 87 |
|
show_ast
¶
show_ast() -> None
Print the AST for the given input file.
Source code in src/arx/main.py
64 65 66 67 |
|
show_llvm_ir
¶
show_llvm_ir() -> None
Compile into LLVM IR the given input file.
Source code in src/arx/main.py
79 80 81 82 83 |
|
show_tokens
¶
show_tokens() -> None
Print the AST for the given input file.
Source code in src/arx/main.py
69 70 71 72 73 74 75 76 77 |
|
get_module_name_from_file_path
¶
Return the module name from the source file name.
Source code in src/arx/main.py
17 18 19 |
|