Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 641 Bytes

README.md

File metadata and controls

48 lines (31 loc) · 641 Bytes

Writing An Interpreter

Getting Started

Enter the REPL

$ go run ./src/main

Debug Mode

Append -d argument to show the shape of the AST while parsing.

$ go run ./src/main -d

Components

  1. Lexer
  2. Parser
  3. Evaluator
  4. REPL ( Read Evaluate Print Loop )
  5. Builtin Function

Features

  • Integer

  • Boolean

  • String

  • Array

  • Hash

  • Function

  • Builtin Function

  • Closure

  • Prefix Expression

  • Infix Expression

  • Index Expression

  • If Expression

  • Return Statement

Interpreter Procedures

Interpreter

References

Based on the book: https://interpreterbook.com/