tick some boxes

This commit is contained in:
Scott Richmond 2024-12-05 14:02:41 -05:00
parent ad6fcccc79
commit 96906fdb9f
3 changed files with 7 additions and 6 deletions

View File

@ -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 // * [ ] atan_2 (x) -> number
// * [x] bool (x) -> bool
// * [ ] ceil (x) -> number // * [ ] ceil (x) -> number
// * [x] chars (x) -> list
// * [ ] concat (x, y) -> value
// * [ ] conj (x, y) -> list // * [ ] conj (x, y) -> list
// * [ ] cos (x) -> number // * [ ] cos (x) -> number
// * [ ] dec (x) -> number // * [ ] dec (x) -> number
@ -208,6 +203,11 @@ pub fn base<'src>() -> Vec<(&'src str, Value<'src>)> {
// * [ ] type (x) -> keyword // * [ ] type (x) -> keyword
// * [ ] upcase (x) -> string // * [ ] upcase (x) -> string
// * [x] add (x, y) -> number // * [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] eq (x, y) -> bool
// * [x] store! (x, y) -> value // * [x] store! (x, y) -> value
// * [x] unbox (x) -> value // * [x] unbox (x) -> value

View File

@ -59,7 +59,7 @@ use crate::base::*;
pub fn main() { pub fn main() {
let src = " let src = "
let foo = [1, 2, 3] 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(); let (tokens, lex_errs) = lexer().parse(src).into_output_errors();
if !lex_errs.is_empty() { if !lex_errs.is_empty() {

View File

@ -20,6 +20,7 @@ pub struct LudusError {
// I guess the question is how to get // I guess the question is how to get
// the branches for Ast::Block and Ast::If // the branches for Ast::Block and Ast::If
// to work with a mutable borrow of ctx // to work with a mutable borrow of ctx
// pub struct Ctx<'src> { // pub struct Ctx<'src> {
// pub locals: Vec<(&'src str, Value<'src>)>, // pub locals: Vec<(&'src str, Value<'src>)>,
// // pub names: Vec<&'src str>, // // pub names: Vec<&'src str>,