Skip to content

amyanger/atomic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚛️ Atomic - A Simple Programming Language

Welcome to Atomic, a lightweight and fun programming language written in Rust! 🚀
Atomic allows you to execute basic arithmetic operations and print messages to the console. 🖥️✨


🛠 Features

Print messagesprint "Hello, Atomic!"
Perform additionadd 5 38
Perform multiplicationmultiply 6 742
Easy to extend → Add more commands in Rust!


📦 Installation & Setup

1️⃣ Install Rust (if you haven't already) 🦀

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

2️⃣ Clone the Atomic Repository

git clone https://github.com/arjun-myanger/atomic-lang.git
cd atomic-lang

3️⃣ Build the Project 🏗️

cargo build

4️⃣ Run Your Atomic Code 🏃‍♂️

Create a file named code.atomic with the following content:

print "Hello, Atomic!"
add 42 8
multiply 6 7

Run it with:

cargo run code.atomic

📝 Atomic Language Syntax

📢 Printing Text

print "Hello, Atomic!"

🖥️ Output:

Hello, Atomic!

Adding Two Numbers

add 5 10

🖥️ Output:

5 + 10 = 15

Multiplying Two Numbers

multiply 3 4

🖥️ Output:

3 * 4 = 12

🔧 How It Works

1️⃣ Lexer: Converts Atomic code into tokens 🧩
2️⃣ Parser: Organizes tokens into an AST (Abstract Syntax Tree) 🌲
3️⃣ Executor: Reads the AST and runs the commands 🎯


💡 Future Improvements

🚀 Support for subtraction & division
🔢 Variable assignments (let x = 5)
📝 User input handling (input name)
🔁 Loops & conditionals (if, while)


🎯 Contributing

Want to make Atomic even more powerful? Open a PR! 🛠️🚀


📜 License

This project is licensed under the MIT License.


⚛️

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages