{"id":18866286,"url":"https://github.com/adia-dev/eheh-lang","last_synced_at":"2025-08-26T07:15:18.333Z","repository":{"id":190521348,"uuid":"669504064","full_name":"adia-dev/eheh-lang","owner":"adia-dev","description":"I am writing my own programming language, in Rust btw","archived":false,"fork":false,"pushed_at":"2023-10-26T18:07:07.000Z","size":132,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T06:47:06.834Z","etag":null,"topics":["grammar","interpreter","language","lexer","parser","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adia-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-22T13:47:35.000Z","updated_at":"2023-11-24T11:04:05.000Z","dependencies_parsed_at":"2023-08-25T03:10:55.489Z","dependency_job_id":"b79789a7-1564-4f12-86d9-89c48ee8acb8","html_url":"https://github.com/adia-dev/eheh-lang","commit_stats":null,"previous_names":["adia-dev/eheh-lang"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adia-dev%2Feheh-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adia-dev%2Feheh-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adia-dev%2Feheh-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adia-dev%2Feheh-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adia-dev","download_url":"https://codeload.github.com/adia-dev/eheh-lang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239816121,"owners_count":19701751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grammar","interpreter","language","lexer","parser","rust","rust-lang"],"created_at":"2024-11-08T05:06:09.473Z","updated_at":"2025-02-20T09:40:53.366Z","avatar_url":"https://github.com/adia-dev.png","language":"Rust","readme":"# [eheh-lang - Version 0.1.0 👾](#eheh-lang---version-010-)\n\nLately a lot of new programming languages have been popping up. Some of them are really cool and offer qualities that others do not provide.\nMy goal is absolutely not to create a new programming language that will be used by millions of people, but rather to learn how to create a programming language by implementing the features that I like from other languages.\n\nFor an in-depth look at my progress, you can find the 🗺️ roadmap [here](#🗺️-roadmap). Additionally, you can explore practical examples of what you can achieve using the language [here](#📦-installation-and-run-🚀).\n\n## 📚 Table of Contents\n\n- [eheh-lang - Version 0.1.0 👾](#eheh-lang---version-010-)\n  - [📚 Table of Contents](#-table-of-contents)\n  - [📖 About](#-about)\n  - [📦 Installation and Run 🚀](#-installation-and-run-🚀)\n  - [🧙‍♂️ There are some pretty amazing warnings and errors too!](#-there-are-some-pretty-amazing-warnings-and-errors-too)\n  - [🌟 Getting Started -](#-getting-started--)\n  - [🗺️ Roadmap](#-roadmap)\n  - [🤝 Contributing](#-contributing)\n  - [📜 License](#-license)\n  - [📞 Contact](#-contact)\n\n\n## 📖 About\n\neheh-lang represents my educational endeavor into the realm of programming languages. This dynamically-typed, interpreted, general-purpose programming language serves as a platform for learning and exploration.\n\nI have stumbled upon this book thanks to [ThePrimeagen](https://github.com/ThePrimeagen), it is an amazing book that I would recommend to anyone who wants to learn how to create a programming language: [Writing An Interpreter In Go](https://interpreterbook.com/), it truly is worth buying !!!\n\nI am a big fan of the Rust programming language, so I decided to implement the language in Rust.\n\nThere are a lot of features that I would like to implement in the language that comes from others such has:\n     \n- [Elixir](https://github.com/elixir-lang/elixir) (I really like the pattern matching and the pipe operator)\n\n- [Zig](https://github.com/ziglang/zig) (I also recommend following [Andrew Kelley](https://github.com/andrewrk)'s work, he is an amazing developer and he is doing some really cool stuff with Zig and has some really nice [Talks](https://vimeo.com/649009599))\n\n- [Swift](https://swift.org/) (I like the way you can call methods on objects with the dot syntax)\n\n- [Rust](https://github.com/rust-lang/rust) and [C++](https://en.wikipedia.org/wiki/C%2B%2B?useskin=vector) (Interesting way to manage memory, pointers, namespace with `::`, etc...)\n- [Python](https://www.python.org/) (No limit in terms of integer size)\n\n\n## [📦 Installation and Run 🚀](#📦-installation-and-run-🚀)\n\nTo install and run your programming language, follow these steps:\n\n1. Make sure you have Rust installed. If not, you can install it from [https://www.rust-lang.org/](https://www.rust-lang.org/).\nThe project has been created and maintained with `rustc` and `cargo` [1.69.0](https://github.com/rust-lang/rust/releases/tag/1.69.0)\nIt should work with newer versions, but if you encounter any problems, please open an issue.\n\n\n2. Clone this repository to your local machine:\n```bash\ngit clone https://github.com/adia-dev/eheh-lang.git\n```\n\n3. Navigate to the project directory:\n```bash\ncd eheh-lang\n```\n\n4. Run the REPL (Read-Eval-Print Loop):\n```bash\ncargo run\n```\n\n5. Enjoy! 🎉 Here are some examples of what you can do with the language:\n```bash\neheh(1)\u003e let add = fn(x, y) { x + y; };\n\neheh(2)\u003e add(2, 3)\n5\n\neheh(3)\u003e let factorial = fn(n) { if (n == 0) { 1 } else { n * factorial(n - 1); } };\n\neheh(4)\u003e factorial(5)\n120\n\neheh(5)\u003e let name: string = \"eheh-lang\";\n\"eheh-lang\"\n\n------------------------------------- WORK IN PROGRESS -------------------------------------\n\neheh(6)\u003e name |\u003e String::to_uppercase |\u003e String::chars |\u003e Vec::len |\u003e print\n9\n\neheh(7)\u003e name ** 2\n\"eheh-langeheh-lang\"\n\neheh(8)\u003e let hash_map = { language: \"eheh-lang\", version: { major: 0, minor: 1, patch: 0 }, year: 2023 };\n{language: \"eheh-lang\", version: {major: 0, minor: 1, patch: 0}, year: 2023}\n\neheh(9)\u003e hash_map |\u003e Map::each(|key, value| print(\"{} =\u003e {}\\n\", key, value))\nlanguage =\u003e eheh-lang\nversion =\u003e {major: 0, minor: 1, patch: 0}\nyear =\u003e 2023\n\neheh(10)\u003e help\n[...]\n\neheh(11)\u003e exit\n~ Prend moi un Yop ~\n```\n\n## 🧙‍♂️ There are some pretty amazing warnings and errors too!\n\n```rust\neheh(1)\u003e let add = fn(x, y { x + y; };\nerror[E01000]: expected `)`, found `{`\n  --\u003e src/main.rs:1:17\n    |\n1   |   let add = fn(x, y { x + y };\n    |                   ^ : expected `)`\n\neheh(2)\u003e if (true) { 1 } else { 2 }\nwarning[E01000]: Unnecessary parentheses around true\n    |\n1   |   if (true) { 1 } else { 2 }\n    |       ^^^^\n\neheh(3)\u003e let add = fn(x, y) { x + y; }; // \u003c- define a function, functions are top-level citizens in eheh-lang\n\neheh(4)\u003e if true {} else { add(1, 2) }\nwarning[E01002]: The consequence of the if expression is empty. Consider swapping the alternative and consequence branches of the if expression.\n    |\n1   |   if true {} else { add(1,2) }\n    |           ^       ^^^^^^^^^^^^\n```\n\n\n## 🗺️ Roadmap\n\n- [x] Initial project setup\n- [x] Implemented AST (Abstract Syntax Tree) structure\n    - [x] Expression nodes\n        - [x] Boolean expression\n        - [x] Call expression\n        - [x] Function literal\n        - [x] Identifier\n        - [x] If expression\n        - [x] Infix expression\n        - [x] Integer literal\n        - [x] Prefix expression\n        - [x] Typed identifier\n        - [ ] String literal\n        - [ ] Array literal\n        - [ ] Hash literal\n        - [ ] Index expression\n        - [ ] For expression\n        - [ ] While expression\n        - [ ] Match expression\n        - [ ] Range expression\n        - [ ] Pipe expression (|\u003e Elixir ♥️)\n        - [ ] Defer expression\n        - [ ] Await expression ??????????? (let's ignore this for now)\n        - [ ] Asy--------------------------^^^^^^^^^^^^^^^^^^^\n        - [ ] Cool little dot to call local Enums just like in `Zig` or `Swift`\n    - [x] Statement nodes\n        - [x] Block statement\n        - [ ] Declare statements\n            - [x] Let statements\n            - [x] Const statements\n            - [ ] Var statements\n            - [ ] Mutability\n            - [ ] Functionning type system\n        - [x] Expression statements\n        - [x] Return statements\n- [x] Lexer implementation\n- [x] Parser implementation\n- [x] REPL (Read-Eval-Print Loop) implementation\n- [x] Evaluation system\n    - [x] Boolean object\n    - [x] Integer object\n    - [x] Null object\n    - [x] Prefix expressions\n    - [x] Infix expressions\n    - [x] If expressions\n    - [x] Return statements\n    - [ ] Let statements\n    - [ ] Function objects\n    - [ ] Function application\n    - [ ] Closures\n    - [ ] Built-in functions\n    - [ ] First-class functions\n    - [ ] Higher-order functions\n    - [ ] String object\n    - [ ] Array object\n    - [ ] Hash object\n    - [ ] Index expressions\n- [x] Type system implementation\n    - [ ] Type checking\n    - [ ] Compile time type checking ???? (Does this language even compile?)\n- [x] Error handling\n    - [x] Error logging\n    - [x] Warning logging\n    - [x] Error handling\n    - [x] Warning handling\n    - [ ] Help logging\n- [x] REPL (Read-Eval-Print Loop) implementation\n- [ ] Garbage collector\n- [ ] Memory Allocators\n    - [ ] Stack allocator\n    - [ ] Page allocator\n    - [ ] Bump allocator\n    - [ ] Slab allocator\n    - [ ] Object pool allocator\n- [ ] LSP (Language Server Protocol) \n- [ ] Standard Library\n- [ ] Dynamic Dispatch (Generics ???????)\n- [ ] Powerful Pattern Matching (Elixir Like)\n- [ ] Module or Namespace system\n- [ ] Macros\n- [ ] Documentation\n- [ ] Code formatting\n- [ ] Structs, Enums and Custom Types\n- [ ] Package Manager (AHAHAHHAHAHAHAHAHDAZUIHUDIAHUIDHZAUIHDA, maybe something like zig's package manager, e.g: `build.zig.zon`)\n- [x] Complete the main program\n- [x] Comprehensive testing\n- [x] Documentation\n- [x] Additional features (Add more items as you progress!)\n\n\n## 🤝 Contributing\n\n- **Contributions Welcome**: I don't mind a little pull request that implements async/await as well as wasm portability. I'm sure it's not that hard to implement, right? 😅\n- **Feedback Welcome**: I'm sure you have some great ideas for this project. Let me know what you think!\n- **Issues Welcome**: If you find a bug, let me know! I'll try to fix it as soon as possible.\n- **Questions Welcome**: If you have any questions, feel free to open an issue or contact me on Discord: `adia31`\n\n## 📜 License\n\nThis project is licensed under the MIT see the [LICENSE](LICENSE) file for details\n\n## 📞 Contact\n\nDiscord: `adia31` (preferred)\n\nLinkedin: [Abdoulaye DIA](https://www.linkedin.com/in/abdoulaye-dia-69a1b0208/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadia-dev%2Feheh-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadia-dev%2Feheh-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadia-dev%2Feheh-lang/lists"}