feat(lisp): add overloadable native functions

This commit is contained in:
2025-01-07 00:55:03 +01:00
parent 1856de7685
commit ad0792dcd3
3 changed files with 259 additions and 137 deletions

View File

@@ -7,6 +7,9 @@ use lispers_core::parser::ExpressionStream;
fn main() {
let programs = [
"(vadd (vector 1 2 3) (vector 4 5 6))",
"(vadd (vector 1 2 3) (point 4 5 6))",
"(vadd (point 1 2 3) (vector 4 5 6))",
"(vadd (point 1 2 3) (point 4 5 6))",
"(set 'blue (material (color 0 0 1) (color 0 0 1) (color 0 0 0.6) 50 0.25))",
"(set 'green (material (color 0 1 0) (color 0 1 0) (color 0 0.6 0) 50 0.25))",
"(set 'white (material (color 1 1 1) (color 1 1 1) (color 0.6 0.6 0.6) 100 0.5))",