From 96906fdb9ff27aab69f98cff65f4fab9fe829108 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Thu, 5 Dec 2024 14:02:41 -0500 Subject: [PATCH] tick some boxes --- src/base.rs | 10 +++++----- src/main.rs | 2 +- src/vm.rs | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/base.rs b/src/base.rs index 440af48..7015a09 100644 --- a/src/base.rs +++ b/src/base.rs @@ -157,13 +157,8 @@ pub fn base<'src>() -> Vec<(&'src str, Value<'src>)> { ] } -// * [x] and (x, y) -> value -// * [x] assoc (x, y) -> dict // * [ ] atan_2 (x) -> number -// * [x] bool (x) -> bool // * [ ] ceil (x) -> number -// * [x] chars (x) -> list -// * [ ] concat (x, y) -> value // * [ ] conj (x, y) -> list // * [ ] cos (x) -> number // * [ ] dec (x) -> number @@ -208,6 +203,11 @@ pub fn base<'src>() -> Vec<(&'src str, Value<'src>)> { // * [ ] type (x) -> keyword // * [ ] upcase (x) -> string // * [x] add (x, y) -> number +// * [x] and (x, y) -> value +// * [x] assoc (x, y) -> dict +// * [x] bool (x) -> bool +// * [x] chars (x) -> list +// * [x] concat (x, y) -> value // * [x] eq (x, y) -> bool // * [x] store! (x, y) -> value // * [x] unbox (x) -> value diff --git a/src/main.rs b/src/main.rs index 570dc4b..d6c154b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,7 +59,7 @@ use crate::base::*; pub fn main() { let src = " let foo = [1, 2, 3] -concat(foo, [4, 5, 6]) +concat([1, 2, 3], [4, 5, 6]) "; let (tokens, lex_errs) = lexer().parse(src).into_output_errors(); if !lex_errs.is_empty() { diff --git a/src/vm.rs b/src/vm.rs index 181b900..bd95f2e 100644 --- a/src/vm.rs +++ b/src/vm.rs @@ -20,6 +20,7 @@ pub struct LudusError { // I guess the question is how to get // the branches for Ast::Block and Ast::If // to work with a mutable borrow of ctx + // pub struct Ctx<'src> { // pub locals: Vec<(&'src str, Value<'src>)>, // // pub names: Vec<&'src str>,