andy-hanson / crow

Crow programming language

Home Page:https://crow-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gitter

Crow

This readme describes how to contribute to Crow.

For information about the language itself, visit the website.

Setup

To work on Crow, you'll need these tools:

  • git: Used to get this repository.
  • hg: Used to clone the dyncall library.
  • ldc: Used to compile bin/crow.
    • Don't use the Visual D installer as it uses an older compiler. Download the latest release instead.
  • node.js: Used for tests of the WASM module
  • Also install dependencies listed on the download page.
  • On Windows, use the "x64 Native Tools Command Prompt for VS 20__" (fill in the year) when running build commands.

Then run:

git clone https://github.com/andy-hanson/crow.git
cd crow
make all

This will build bin/crow (or bin\crow.exe on Windows), test, then serve the website on localhost.

Testing

make test runs all tests. (Before any PR, you should run make all to lint as well.)

There are 2 kinds of tests:

  • Unit tests in src/test. make unit-test runs these.
  • End-to-end tests in the test directory. make end-to-end-test runs these.
    • If adding or changing tests, run make end-to-end-test-overwrite.

Debugging

Debugging crow itself (compiler or interpreter)

Use make debug.

Debugging Crow code

Currently, Crow has no debugger of its own, so you'll have to compile to C and debug that. By default, crow compiles the C code with debug symbols.

For example:

crow build a.crow
gdb a
rbreak throw
run

Testing compiler/interpreter performance

Linux

make bin/crow-fast-debug
mkdir perf && cd perf
valgrind --tool=callgrind -v --dump-every-bb=10000000 ../bin/crow-fast-debug run some-program.crow --interpret
kcachegrind .

Windows

Haven't tested this yet.

About

Crow programming language

https://crow-lang.org

License:Other


Languages

Language:C 80.5%Language:D 17.6%Language:HTML 1.4%Language:JavaScript 0.4%Language:Makefile 0.1%Language:CSS 0.1%Language:Batchfile 0.0%