Skip to content
This repository has been archived by the owner on May 21, 2020. It is now read-only.
/ squirrel-csharp Public archive

An expression-oriented programming language inspired by Lisp

License

Notifications You must be signed in to change notification settings

josh548/squirrel-csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Squirrel

Squirrel is an expression-oriented programming language inspired by Lisp.

Check out the language reference to learn how it works.

Sample

[ program that defines a function,
  invokes it, and displays the result ]
(block
  (def {factorial}
    (lambda {x}
      {if (eq x 0)
        {id 1}
        {mul x (factorial (sub x 1))}
      }
    )
  )
  (display (factorial 5)) [ prints 120 ]
)

Prerequisites

Install .NET Core 1.1 or later in order to build and run the project.

Running

cd src/app/
dotnet restore

# run an interactive Squirrel console
dotnet run

# run a Squirrel source file
dotnet run <path>

# run one of the included modules: Conway's Game of Life
dotnet run ../../modules/game-of-life.sq

Testing

cd test/test-library/
dotnet restore
dotnet test

Resources