Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 613 Bytes

README.md

File metadata and controls

37 lines (25 loc) · 613 Bytes

CONST

CONST is the first interpreter.

A complete program is a non-negative integer literal:

123

We get to follow a complete program from source text to an evaluated value:

flowchart TD
    A["123"] -->|parse| B["Program (Const 123)"]
    B -->|evaluate| C["VNumber 123"]
Loading

For a closer look at each step, read CONST: From Source Text to Value.

Try it

You'll need Nix with flakes enabled.

nix develop
elm repl

Then:

import CONST.Interpreter as I

I.run "123"
-- Ok (VNumber 123)