aboutsummaryrefslogtreecommitdiff
path: root/src/sexp
AgeCommit message (Collapse)Author
7 daysfix: quote/vector disappearing in substitution on casesJoel Kronqvist
9 daysfix: changed type of (() T) from (T ...) to (Vector (T ...))Joel Kronqvist
this makes the type of the empty vector consistent with the runtime behavior and prevents weirdly typed expressions such as (vector (() Int)) : (Vector (Int ...)). removed an unused import in case.rs and changed a unused pattern variable to an underscore in conversion.rs.
10 daysfeat: vector concatenationJoel Kronqvist
10 daysfeat: type conversion from (Vec/Quote X) -> X and add vec/quote to rest ↵Joel Kronqvist
pattern substitutions
10 daysfix: function arguments not evaluating before function callJoel Kronqvist
11 daysfeat: fixed point dynamicsJoel Kronqvist
11 daysfix: subst not respecting fn and case bindsJoel Kronqvist
11 daysfeat: statics for fixed point recursionJoel Kronqvist
11 daysfix: removed obsolete code for handling types as they are now parsed ↵Joel Kronqvist
directly to atoms
11 daysfeat: parsing of new types (T, (int ...), (int bool)) etc. also fixed bug in ↵Joel Kronqvist
into_type (it didn't handle lists recursively)
12 daysfix: removed unneccessary print, excluded .#[file] emacs backups in gitignoreJoel Kronqvist
12 daysfix: step scrutinee of case & can instantiate empty vecJoel Kronqvist
13 daysfeat: pattern matching evaluation in step.rsJoel Kronqvist
13 daysfeat: type checking for case expressionsJoel Kronqvist
2025-08-11refactor: Added helper matches_pat for pattern matchingJoel Kronqvist
2025-08-10Implemented functionsJoel Kronqvist
2025-08-10Added tests for functionsJoel Kronqvist
2025-08-10Added term level type literals (for function type signatures)Joel Kronqvist
2025-08-09Implemented print as ? -> ()Joel Kronqvist
2025-08-09Revert adding of print (its behavior was poorly designed).Joel Kronqvist
This reverts commit 3e1bf7f9946efe70d452c71494ac77ed39110804.
2025-08-06Added print, raised level on which UnboundGeneric error is returnedJoel Kronqvist
2025-08-06Implemented let-bindingsJoel Kronqvist
2025-08-06Added boilerplate and tests for let-bindsJoel Kronqvist
2025-08-05Implemented vector.Joel Kronqvist
2025-08-05Added vectors and tests for their evaluation and typingJoel Kronqvist
2025-08-05Fix: quote is not a typewise identity function. Added vt(&str) as util for ↵Joel Kronqvist
VarType(String).
2025-08-05Implemented booleans (no if-else yet)Joel Kronqvist
2025-08-05Added boilerplate and tests for booleans, integer comparisons and boolean ↵Joel Kronqvist
operators.
2025-08-05Changed project nameJoel Kronqvist
2025-08-04Added repl and some documentation. Improved error messages. Removed dead code.Joel Kronqvist
* Removed same_variant in parse::parsetree * Added SExp::multistep (for use of the repl) Improved error messages: * Added parenthesis around types * Changed how errors propagate inferring generics: added the error variant ArgumentsDontMatchGeneric, implemented the displaying of it, added tests for it. * Had to change some tests to match for the new changes
2025-08-03Implemented type_check, added method parts for SExpJoel Kronqvist
'parts' is different from 'into_vec', because it doesn't require flat structure and always succeeds
2025-08-02Added tests for type_check. Implemented std::fmt::Display for many enums. ↵Joel Kronqvist
Added type variants List(Type), and UndefinedType for use in error messages. Implemented type utility arr(a, b).
2025-08-01Modified quote so the values of lists are evaluatedJoel Kronqvist
2025-07-30Implemented evaluation according to tests. Quite a bit of changes were ↵Joel Kronqvist
required, see rest of commit message. SExp::Quote was added to let the interpreter know whether a list should be evaluated or treated as a literal list. It still needs code to be added for parsing it successfully. Some utility functions were needed: * SExp::is_value * SExp::consists_of_values * SExp::into_vec
2025-07-29Added Nil and modified tests to make this more of a list interpreter rather ↵Joel Kronqvist
than just a do-what-you-want-with-s-expressions thing
2025-07-26Implemented substitutionJoel Kronqvist
2025-07-26Added variables and tests for their substitutionJoel Kronqvist
2025-07-26Implemented integer operator dynamics, fixed some tests and added a ↵Joel Kronqvist
combination test.
2025-07-26Created necessary data structures and utilities for integers and their ↵Joel Kronqvist
operations; added tests for them