https://github.com/contigen/js-compiler
https://github.com/contigen/js-compiler
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/contigen/js-compiler
- Owner: contigen
- Created: 2022-07-21T03:20:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-24T20:39:49.000Z (almost 4 years ago)
- Last Synced: 2025-01-14T12:24:17.802Z (over 1 year ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JS-Compiler
This is a basic implementation of a compiler in JavaScript.
I'm starting this project to better understand how code is structured and how you write good code, I'm basically always curious about how thing are created.
A compiler sounds interesting enough, and a simple one? makes it more easy. Let's go!
## Code Structure
A typical compiler / interpreter has the lexical, syntactic, and
semantic analyis and the direct execution - [COMPILER DESIGN](http://cnuinfotech-cd.blogspot.com/2012/06/interpreter.html)
Lexical Analysis - raw code to **tokens**(unit of the code syntax) using a **tokenizer**
Syntactic Analysis - restructuring the tokens to a more detailed format, **Abstract Syntax Tree** - a deeply nested object that describes each part of the code syntax and their relation to one another
## Usage
Do your stuff.
## Acknowledgment
Github user [@jamiebuilds](https://github.com/jamiebuilds/the-super-tiny-compiler) - thank you a lot for helping my curiosity