An interpreter for C that is implemented in TypeScript.
- Install nodenv by following the instructions here.
Then, install the version of Node specified in the
.node-version
file.nodenv install $(cat .node-version)
- Install Yarn for dependency management.
npm install --global yarn
- Install the project dependencies.
yarn install
The interpreter can be used as either a standalone read-eval-print loop (REPL) or as a package.
- Build the project.
yarn build
- To start the REPL, run:
node dist/repl/repl.js
- Add c-slang as a dependency via this repository:
yarn add https://github.com/CS4215-GN-IY/c-slang
The test suite can be run via the command:
yarn test