DylanSp / wheel-lang

A small toy imperative language (with some OOP features) for demonstrating and practicing language design/implementation.
MIT License
14 stars 0 forks source link

Update pipeline to run (and test?) examples #67

Closed DylanSp closed 3 years ago

DylanSp commented 3 years ago

Modules: node dist/main.js examples/modules/basic_module.wheel examples/modules/consumer.wheel -> Successful eval, result 1

node dist/main.js examples/modules/side_effecting_module.wheel examples/modules/side_effecting_consumer.wheel -> Successful eval, logs 0, 1, 2

node dist/main.js examples/modules/circular_a.wheel examples/modules/circular_b.wheel examples/modules/circular_consumer.wheel -> Circular dependencies detected

DylanSp commented 3 years ago

Started work on this by reworking readString() to work correctly when reading from a non-TTY. This necessitated some refactoring so that native function implementations could be injected instead of hardcoding their definitions in evaluator.ts.

DylanSp commented 3 years ago

Fixed by #85.