Have you thought that if you create your own programming language, you can be proud of yourself? Sadly, it's not easy to make it. But today we will start making it from zero!
We need:
- CMD console (ConEmu)
- Node.js (Install the LTS version (recommended))
- Text Editor (I'm using Sublime Text Editor)
Go to here and install lastest LTS version.
When it's done, run the .msi file and agree with all and then wait until it's downloaded.
If installer is done, run ConEmu cmd and choose the cmd (basic cmd, not Git Bash or etc). And now you will have one tab with cmd console.
You should have $ at the start of line, so type this:
node -v
And if the version appears, congratulations! You installed node.js!
Now you just need to create a folder called whatever you want, and then create another folder called "compiler" in the same folder. Create index.js file in the compiler folder by creating txt file and changing the file format. (Click here to know, how to change file format if you can't do it)
Create modules folder in compiler folder, and create lexer.js file.
Files locations:
index.js : Language/compiler/index.js
lexer.js : Language/compiler/modules/lexer.js
If file locations in your folder is correct, then bye-bye in part 1!