X is a placeholder language with a python and JS like syntax and a shareable bytecode IR that can be translated into any other programming language.
- C
- C++
- Java
- Python
What does this list mean? This means that you can compile your X code into any one of these programming languages 😲😲😲😲!
The latest build of X is available on pypi, install it using:
user@programmer~:$ pip install langx
-
Write a script in X and save it with .x extension.
-
To run the script:
user@programmer~:$ x -i <filename>.x- To compile to C:
user@programmer~:$ x -i <filename.x> --decompile-c- To compile to C++:
user@programmer~:$ x -i <filename.x> --decompile-cpp- To compile to Java:
user@programmer~:$ x -i <filename.x> --decompile-java- To compile to Python:
user@programmer~:$ x -i <filename.x> --decompile-py- Check the tokens for the script
user@programmer~:$ x -i <filename>.x -t- Check the syntax tree for the script
user@programmer~:$ x -i <filename>.x -p- Check the compiled bytecodes for the script
user@programmer~:$ x -i <filename>.x -c- X also offers a web based debugger called xdb. To use it start the xdb server and follow along
user@programmer~:$ xdb