https://github.com/eirikvaa/nic
My first stab at creating a programming language from the ground up
https://github.com/eirikvaa/nic
compiler programming-language
Last synced: 8 months ago
JSON representation
My first stab at creating a programming language from the ground up
- Host: GitHub
- URL: https://github.com/eirikvaa/nic
- Owner: eirikvaa
- Created: 2019-02-25T22:00:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-10T19:27:47.000Z (over 2 years ago)
- Last Synced: 2025-04-15T18:50:31.628Z (10 months ago)
- Topics: compiler, programming-language
- Language: Swift
- Homepage:
- Size: 223 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nic
## What is Nic?
Since about halfway into my studies at the Norwegian University of Science and Technology (NTNU), I have been interested in programming languages and compilers. I have followed the fantastic guide by [Crafting Interpreters](http://craftinginterpreters.com/) for quite some time now, but the way to truly learn something is to do it yourself. That's why I want to create _my very own_ programming language from scratch.
I have zero and all plans for Nic. I just want to try to create _something_ that can work. I also want it to compile down to machine code and have a strong type system. These things are way over my head right now, but I'm hoping that when I learn more and more concepts, I can incorporate them into the language. It will be a fun exercise and something to show other people.
## Where did the name come from?
Nic is truly a random name. I have a rubber duck at home with the name "Nordic Semiconductor", and this was at the point where I was _just_ starting to think about my new programming language, back in January 2018. I just took the first and two last letters of the word _Nordic_, and there it was. Truly underwhelming, one might say. But the name isn't important here.
## Features
- [x] Single and multiline comments
- [x] Booleans (true/false)
- [x] Binary operations (+, -, *, /, ==, !=, >=, >, <=, <, and, or)
- [x] Variables
- [x] Constants
- [x] Conditionals (if/else)
- [x] Printing
- [x] Int, Double, String and Bool types
- [x] Basic type checking
- [ ] Classes and methods
- [ ] Code generation with LLVM