nondescript/README.md

1.1 KiB

nondescript

Nondescript is a toy programming language. Currently its compiler is being rewritten, so please check the latest commit from Feb 2022 to see a working version in action.

Some of nondescript's features

  • Almost everything is an expression
  • block expressions can be labelled (@label) and the break statement takes a label to break out of
  • set block expression results using :label
  • set the return value of functions using :result
  • lists (example: @[1, 4, 5])
  • tables (example: @{ "hello" = "world"})
  • length operator #
  • ampersand operator to chain binary operators to finished expressions
  • just a little syntax sugar (see sugar.nds in tests)
  • and some more (an introduction to nondescript coming soon...)

Examples

See the following folders in the source tree, look for the extension .nds:

  • benchmarks/
  • examples/
  • tests/

Building

Requirements:

  • nim (1.6.8 tested) and nimble (recommended way to install is choosenim)
  • c compiler (gcc tested)

The 4 steps to a REPL:

git clone https://github.com/prod2/nondescript
cd nondescript
nimble build
bin/nds