Skip to content

CS4215-GN-IY/c-slang

Repository files navigation

c-slang

Coverage Status

An interpreter for C that is implemented in TypeScript.

Getting Started

  1. Install nodenv by following the instructions here. Then, install the version of Node specified in the .node-version file.
    nodenv install $(cat .node-version)
  2. Install Yarn for dependency management.
    npm install --global yarn
  3. Install the project dependencies.
    yarn install

Usage

The interpreter can be used as either a standalone read-eval-print loop (REPL) or as a package.

REPL

  1. Build the project.
    yarn build
  2. To start the REPL, run:
    node dist/repl/repl.js

Package

  1. Add c-slang as a dependency via this repository:
    yarn add https://github.com/CS4215-GN-IY/c-slang

Testing

The test suite can be run via the command:

yarn test