Big project dir refactor
* split into multi member workspace in preparation for a no_std core * env and posix stuff neatly crammed into a seperate shell project * some pokes at interactive-devel.f * updated ci * removed 'l' shortcut for 'load' and update docs * remove out of date readme content * updated tests * more sensible cond implementation and extra tests * substr stdlib function with tests Signed-off-by: Ava Affine <ava@sunnypup.io>
This commit is contained in:
parent
aa56570d7d
commit
6d2925984f
44 changed files with 967 additions and 779 deletions
44
Readme.org
44
Readme.org
|
|
@ -92,13 +92,13 @@ For installation, consider adding the following to your ~\~/.emacs~:
|
|||
* Compilation
|
||||
Compiling Flesh is as simple as kicking off a build with Cargo.
|
||||
#+BEGIN_EXAMPLE sh
|
||||
cargo build
|
||||
cargo build -p flesh-shell
|
||||
#+END_EXAMPLE
|
||||
|
||||
This will produce a binary at [[file:target/debug/flesh][target/debug/flesh]] which includes all of the features flesh has to offer. This provides a REPL with a full interactive shell that also can manage variables in the Unix environment. It is possible to compile a smaller REPL that does not interact with environment variables and does not offer any shell features. Simply pass the ~--no-default-features~ flag to cargo:
|
||||
|
||||
#+BEGIN_EXAMPLE sh
|
||||
cargo build --no-default-features
|
||||
cargo build -p flesh-shell --no-default-features
|
||||
#+END_EXAMPLE
|
||||
|
||||
In order to run Flesh it is recommended to run the resulting binary at [[file:target/debug/flesh][target/debug/flesh]].
|
||||
|
|
@ -114,46 +114,6 @@ Userlib tests can be triggered by loading the userlib as well as its test suite
|
|||
cargo run snippets/userlib.f snippets/userlib-tests.f
|
||||
#+END_EXAMPLE
|
||||
|
||||
* The codebase
|
||||
** The [[file:tests][tests directory]]
|
||||
Start here if you are new.
|
||||
*** [[file:tests/test_eval.rs][Eval tests]]
|
||||
These are particularly easy to read and write tests.
|
||||
They primarily cover execution paths in the evaluation process.
|
||||
*** [[file:tests/test_func.rs][Func tests]]
|
||||
These tests extend the eval tests to cover the co-recursive nature between eval and func calls.
|
||||
*** [[file:tests/test_lex.rs][Lex tests]]
|
||||
These tests verify the handling of syntax.
|
||||
*** Lib tests: (tests/test_lib*)
|
||||
These tests are unique per stdlib module and work to prove the functionality of builtin functions in the language.
|
||||
** [[file:src][Source directory]]
|
||||
This directory contains all of the user facing code in flesh.
|
||||
Just a few entries of note:
|
||||
*** [[file:src/segment.rs][Segment module]]
|
||||
This file lays out the data structures that the interpreter operates on.
|
||||
Representation of code trees, traversals, and type annotations all live here.
|
||||
It provides the core representation of data used in Flesh, and could provide supplementary refrence material for users seeking a deeper understanding of how their code is stored in memory.
|
||||
*** [[file:src/lib.rs][lib.rs]]
|
||||
This defines a library that can be included to provide an interpreter interface within any Rust project.
|
||||
The components defined here can certainly be used to support language development for other LISP (or non LISP) langauges. An external project may use or not use any number of these components.
|
||||
*** [[file:src/sym.rs][Symbol module]]
|
||||
This file contains all code related to symbol expansion and function calling.
|
||||
The types defined in this file include SymTable, Args, Symbol, and more.
|
||||
Code to call Lambda functions also exists in here.
|
||||
*** [[file:src/run.rs][Run module]]
|
||||
This file contains functions which load and run the configuration file script.
|
||||
For more information see the configuraiton section above in this Readme.
|
||||
*** [[file:src/stl.rs][Standard library module]]
|
||||
This defines the ~static_stdlib~ function and the ~dynamic_stdlib~ function.
|
||||
The ~static_stdlib~ function loads all symbols in the standard library which do not need further configuration into the symbol table.
|
||||
The ~dynamic_stdlib~ function loads all symbols in the standard library which *do* need configuration into the symbol table.
|
||||
The ~dynamic_stdlib~ function uses variables saved in the symbol table to configure the functions and variables it loads.
|
||||
This module also contains definitions for the default configuration values.
|
||||
Any new addition to the stdlib must make its way here to be included in the main shell (and any other shell using the included stdlib functions).
|
||||
You may choose to override these functions if you would like to include your own special functions in your own special interpreter, or if you would like to pare down the stdlib to a lighter subet of what it is.
|
||||
You can view the code for standard library functions in [[file:src/stl/][the standard library directory]].
|
||||
*** [[file:src/bin/][binary directory]]
|
||||
This contains any executable target of this project. Notably [[file:src/bin/flesh.rs][the main shell]].
|
||||
* Current Status / TODO list
|
||||
Note: this section will not show the status of each item unless you are viewing it with a proper orgmode viewer.
|
||||
Note: this section only tracks the state of incomplete TODO items. Having everything on here would be cluttered.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue