Skip to content

pmukhin/glisp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glisp - a small Lisp implementation in Go [WIP]

Build Status

Motivation

Fun.

Examples

Value declaration

(defvar i 64 "just an int equal to 64")
(print i) // 64

Defining a collection

(defvar int-list '(1 2 3)
    "a list of ints")  // list
(defvar int-vector [1 2 3]
    "a vector of ints") // vector

Function declaration

(defun main (args)
    "the main function"
    (print (len args)))
(main '("one" "two")) // 2

Function call

(print (* 5 5)) // 25

Progress

Scanner

  • Basic expressions
  • Lists
  • Vectors
  • Variable expressions
  • Macro expressions
  • Modules & imports

Parser

  • Atom expressions like Int, String, Float, Rune
  • Lists
  • Vectors
  • Macro expressions
  • Modules & imports

Evaluation

Interpreter

  • Simple expressions & internal functions
  • REPL
  • Functions and macros
  • Modules & imports

LLVM-based compiler

  • Starting...

Releases

No releases published

Packages

No packages published

Languages