Skip to content

avahwhitehead/hwhile-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HWhile Wrapper

This module is a JavaScript/TypeScript wrapper around the HWhile interpreter for Dr Reus' WHILE language. It is primarily developed for use in the Whide IDE for the same language.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Git - for downloading the repository.

    Preferably with SSH access configured; see GitHub’s post about requiring tokens for git operations. You can set up SSH access using these instructions.

  • Node.js 12.19 and NPM 6.14 or newer - for running the code.

    After you have a version of npm installed, I recommend using the n package to manage node/npm versions and updates.

  • HWhile - For running WHILE programs

    See Installing HWhile for a quick installation guide with solutions to some common issues.

Installing

  1. Clone the repository:

    Using SSH:

    git clone https://github.com/sonrad10/hwhile-wrapper

    Or using a username/password:

    git clone https://github.com/sonrad10/hwhile-wrapper
  2. Navigate into the cloned directory

    cd hwhile-wrapper/
  3. Optionally, switch to the development branch:

    git checkout development
  4. Install the dependencies

    npm install
  5. Run the tests

    npm run test

Running the tests

Simply run the following command to run the tests:

npm run test

Testing is done using the mocha testing framework, and the chai assertion library.

Program Information

TODO: Write this

Installing HWhile

Installing Haskell Stack

  • The recommended install method is to use the Haskell Stack. On Linux, use the following command:

    curl -sSL https://get.haskellstack.org/ | sh
  • Run

    stack init
  • You should also make sure ~/.local/bin is in your $PATH as this is where the installed programs will be placed.

Installing dependencies

If this is your first time installing HWhile, you may need to install the happy and alex packages:

stack install happy alex

Installing HWhile

Finally, to install HWhile, run this command:

stack install --resolver=lts-8.0 hwhile

Using the default resolver causes dependency issues, which are not present with this version.

Note
Stack’s installed programs are removed from the path when you log out. If you get a command not found error, simply run this command again.

Contributing

This repository uses standard-version to maintain the version number. As such, commits should follow the Conventional Commits specification.

Any changes should be opened in their own branch, then merged into master through a pull request.

Once a branch is merged into master, npm run release should be used to update the version number and changelog.

License

This project is licensed under the MIT License - see LICENSE.md file for details.

Acknowledgments

About

A JS wrapper around the HWhile interpreter. For use in the Whide editor.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors