Mofo Language is a static-typed, interpreted programming language inspired by Python. It offers Python-like syntax with built-in support for printf
and static typing. Variables must be declared with their type during assignment.
- Static Typing: Variables are declared with a type (e.g.,
name: str = "value"
). - Python-like Syntax: Easy to read and write.
- Built-in
printf
Function: Print output to the terminal. - Variable Declaration and Usage: Supports types like
str
.
- Clone the repository:
git clone https://github.com/your-username/mofo-language.git cd mofo-language
- Build the project:
cargo build --release
- Install the language:
cargo install --path .
- Verify installation:
Expected output:
mofo --version
Mofo Language v0.1.0
- Download the latest
setup.exe
from the Releases section. - Run the installer and follow the instructions.
- Update PATH Manually:
-
If using Git Bash or similar:
- Open the
.bashrc
or.bash_profile
file in your home directory:nano ~/.bashrc
- Add the following line:
export PATH=$PATH:/c/Program\ Files\ \(x86\)/MofoLanguage
- Save the file and reload it:
source ~/.bashrc
- Test:
mofo --version
- Open the
-
If using Windows Command Prompt or PowerShell:
- Open Environment Variables:
- Right-click on "This PC" or "My Computer" and select Properties.
- Click on Advanced system settings.
- In the System Properties window, go to the Advanced tab and click on Environment Variables.
- Edit the
PATH
variable:- In the System Variables section, find
Path
and click Edit. - Add the Mofo Language installation directory, e.g.:
C:\Program Files (x86)\MofoLanguage
- Click OK to save the changes.
- In the System Variables section, find
- Restart your terminal or command prompt for changes to take effect.
- Test:
mofo --version
- Open Environment Variables:
-
- Create a
.mofo
file:name: str = "John" printf(name)
- Run the file:
Output:
mofo your_file.mofo
John Execution completed.
--version
: Displays the version of the Mofo language.
- Variable Declaration:
Example:
variable_name: type = value
greeting: str = "Hello, World!"
- Printing:
Example:
printf(expression)
printf(greeting)
We welcome contributions! To get started:
- Fork the repository and clone it locally.
- Make your changes and add tests in the
tests/
directory. - Run the tests:
cargo test
- Submit a pull request with a clear description of your changes.
This project is licensed under the MIT License.
For any questions or feedback, feel free to open an issue or contact the maintainer.