Skip to content

Latest commit

 

History

History
75 lines (48 loc) · 2.86 KB

HACKING.md

File metadata and controls

75 lines (48 loc) · 2.86 KB

Introduction

Hand-rolled parser, inspired by Go's:

Tokens are implemented as a basic enumeration:

The embedded go:generate stringer provides us with a func (i tokenKind) String() string {...}:

The tokens are scanned from a []byte buffer:

The scanned tokens are then parsed by a ad-hoc parser:

Note: Currently, the parsing data structures aren't perfectly determined.

The WIP evaluation is shared between some auxiliary utilities and the actual "evaluation" (reduction):

Simple type inference (as in, simply-typed λ-calculus) can be found in:

Budding polymorphic type inference in (not sure we'll need to be this sophisticated?):