A simple interpreter built using TypeScript, designed to help understand the basics of language parsing and interpretation. This project serves as a learning tool to explore TypeScript's features and functionalities.
- Tokenization of input strings
- Parsing of tokens to generate an abstract syntax tree (AST)
- Basic arithmetic interpretation
-
Clone the repository:
git clone https://github.com/yourusername/ts-interpreter.git
-
Navigate to the project directory:
cd ts-interpreter
-
Install the necessary dependencies:
npm install
-
Usage
To run the interpreter, you'll need to compile the TypeScript files first. Follow the steps below to compile and execute the project.
Compiling the Project:
To compile the TypeScript files into JavaScript, run the following command:
npx tsc
-
Running the Interpreter:
After compiling, you can run the interpreter using Node.js:
node ./dist/index.js
-
Contributing:
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
Fork the repository.
Create a new branch (git checkout -b feature/YourFeature). Make your changes and commit them (git commit -m 'Add some feature'). Push to the branch (git push origin feature/YourFeature). Open a pull request.
-
Liscense
This project is under MIT liscense. Please go through it.