MCPcopy Create free account

hub / github.com/brundonsmith/rust_lisp / functions

Functions128 in github.com/brundonsmith/rust_lisp

↓ 42 callersMethoddefine
Define a new key in the current environment
src/model/env.rs:45
↓ 40 callersFunctionrequire_arg
Given a `Value` assumed to be a `Value::List()`, grab the item at `index` and err if there isn't one.
src/utils.rs:7
↓ 27 callersMethodinto_iter
(list: &'a List)
src/model/list.rs:50
↓ 26 callersFunctioneval_str
(source: &str)
tests/interpreter.rs:397
↓ 24 callersMethodcdr
(&self)
src/model/list.rs:29
↓ 14 callersMethodget
Walks up the environment hierarchy until it finds the symbol's value or runs out of environments.
src/model/env.rs:34
↓ 13 callersFunctionparse
Parse a string of Lisp code into a series of s-expressions. There are more than one expressions when the base string has more than one independent par
src/parser.rs:11
↓ 11 callersMethodnext
(&mut self)
src/model/list.rs:111
↓ 10 callersMethodcar
(&self)
src/model/list.rs:20
↓ 10 callersFunctionint_type_to_float_type
Convert whatever int type we're using to whatever float type we're using
src/model/value.rs:507
↓ 9 callersFunctioneval
Evaluate a single Lisp expression in the context of a given environment.
src/interpreter.rs:8
↓ 8 callersMethodfound_tail
(self, found_tail: bool)
src/interpreter.rs:398
↓ 7 callersFunctionconsume
(code: &str, index: usize, s: &str)
src/parser.rs:306
↓ 6 callersFunctiondefault_env
Initialize an instance of `Env` with several core Lisp functions implemented in Rust. **Without this, you will only have access to the functions you i
src/default_environment.rs:18
↓ 5 callersFunctionconsume_while
( code: &str, index: usize, mut pred: F, )
src/parser.rs:337
↓ 5 callersFunctionnext_char_is_break
(code: &str, index: usize)
src/parser.rs:358
↓ 4 callersFunctionconsume_whitespace_and_comments
(code: &str, index: usize)
src/parser.rs:321
↓ 4 callersFunctioneval_block_inner
( env: Rc<RefCell<Env>>, clauses: impl Iterator<Item = Value>, context: Context, )
src/interpreter.rs:21
↓ 4 callersFunctionparse_expression
(code: &str, index: usize)
src/parser.rs:82
↓ 3 callersFunctioncall_function_or_macro
Calling a function is separated from the main `eval_inner()` function so that tail calls can be evaluated without just returning themselves as-is as a
src/interpreter.rs:331
↓ 3 callersFunctioneval_ast
(ast: Value)
tests/default_environment.rs:146
↓ 3 callersFunctioneval_inner
`found_tail` and `in_func` are used when locating the tail position for tail-call optimization. Candidates are not eligible if a) we aren't already in
src/interpreter.rs:57
↓ 3 callersMethodlen
(&self)
src/model/list.rs:123
↓ 3 callersFunctionvalue_to_argnames
(argnames: List)
src/interpreter.rs:311
↓ 2 callersMethodcons
(&self, val: Value)
src/model/list.rs:39
↓ 2 callersFunctionis_symbolic
(c: char)
src/parser.rs:354
↓ 2 callersMethodquoting
(self, quoting: bool)
src/interpreter.rs:414
↓ 1 callersMethoddisplay_recursive
(&self, output: &mut String, depth: i32)
src/model/env.rs:73
↓ 1 callersFunctioneval_block
Evaluate a series of s-expressions. Each expression is evaluated in order and the final one's return value is returned.
src/interpreter.rs:14
↓ 1 callersMethodinto_value
(self)
src/parser.rs:42
↓ 1 callersFunctionis_symbol_start
(c: char)
src/parser.rs:350
↓ 1 callersMethodpartial_cmp
(&self, other: &Value)
src/model/value.rs:358
↓ 1 callersMethodset
Find the environment where this key is defined, and update its value. Returns an Err if the symbol has not been defined anywhere in the hierarchy.
src/model/env.rs:51
↓ 1 callersFunctionstart_repl
🦀 I am all over this project! Starts a REPL prompt at stdin/stdout. **This will block the current thread.
src/lib.rs:20
Methodadd
(self, other: &Value)
src/model/value.rs:384
Functionand_expressions
()
tests/interpreter.rs:332
Functioncalling_empty_fun
()
tests/interpreter.rs:244
Functionclosure
()
tests/interpreter.rs:257
Methodcmp
(&self, other: &Self)
src/model/value.rs:524
Functiondefmacro
()
tests/interpreter.rs:299
Methoddiv
(self, other: &Value)
src/model/value.rs:481
Methodeq
(&self, other: &Self)
src/model/value.rs:326
Methodeq
(&self, other: &Self)
src/model/lambda.rs:16
Functioneval_add_list
()
tests/interpreter.rs:18
Functioneval_basic_expression
()
tests/interpreter.rs:11
Functioneval_fib
()
tests/interpreter.rs:159
Functioneval_let
()
tests/interpreter.rs:81
Functioneval_let_scope
()
tests/interpreter.rs:98
Functioneval_merge_sort
()
tests/interpreter.rs:177
Functioneval_mul_list_ints
()
tests/interpreter.rs:25
Functioneval_mul_list_mixed
()
tests/interpreter.rs:32
Functioneval_nil
()
tests/interpreter.rs:39
Functioneval_quote_1
()
tests/interpreter.rs:46
Functioneval_quote_2
()
tests/interpreter.rs:53
Functioneval_quote_tick_atom
()
tests/interpreter.rs:67
Functioneval_quote_tick_list
()
tests/interpreter.rs:60
Functioneval_quote_tick_symbol
()
tests/interpreter.rs:74
Functioneval_set_global
()
tests/interpreter.rs:116
Functioneval_set_local
()
tests/interpreter.rs:132
Functioneval_set_undefined
()
tests/interpreter.rs:149
Functioneval_str
(source: &str)
tests/little_lisper.rs:65
Methodextend
Create a new environment extending the given environment
src/model/env.rs:25
Functionfilter
()
tests/default_environment.rs:70
Functionfilter_list_of_lists
()
tests/default_environment.rs:93
Functionfive
()
tests/little_lisper.rs:45
Methodfmt
(&self, formatter: &mut std::fmt::Formatter)
src/parser.rs:66
Methodfmt
(&self, f: &mut std::fmt::Formatter)
src/model/value.rs:266
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/model/symbol.rs:15
Methodfmt
(&self, formatter: &mut std::fmt::Formatter)
src/model/env.rs:98
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/model/lambda.rs:32
Methodfmt
(&self, formatter: &mut std::fmt::Formatter)
src/model/runtime_error.rs:10
Methodfmt
(&self, formatter: &mut std::fmt::Formatter)
src/model/list.rs:72
Functionfour
()
tests/little_lisper.rs:37
Methodfrom
(b: bool)
src/model/value.rs:87
Methodfrom
(s: &str)
src/model/symbol.rs:9
Methodfrom_iter
(iter: I)
src/model/list.rs:133
Methodget_name
()
src/utils.rs:50
Methodhash
(&self, state: &mut H)
src/model/value.rs:533
Methodhash
(&self, state: &mut H)
src/model/lambda.rs:24
Methodhash
(&self, state: &mut H)
src/model/list.rs:65
Functionhash_map
()
tests/default_environment.rs:107
Functionlambda_err
()
tests/interpreter.rs:268
Functionmain
()
src/main.rs:17
Functionmap
()
tests/default_environment.rs:32
Functionmap_list_of_lists
()
tests/default_environment.rs:84
Methodmul
(self, other: &Value)
src/model/value.rs:453
Functionnative_closure
()
tests/interpreter.rs:367
Methodnew
()
src/interpreter.rs:390
Methodnew
Create a new, empty environment
src/model/env.rs:17
Functionnth
()
tests/default_environment.rs:22
Functionnumber_cast_comparisons
()
tests/default_environment.rs:122
Functionone
()
tests/little_lisper.rs:11
Functionor_expressions
()
tests/interpreter.rs:314
Functionparse_atom
(code: &str, index: usize)
src/parser.rs:122
Functionparse_atom
()
tests/parser.rs:40
Functionparse_basic_expression
()
tests/parser.rs:10
Functionparse_comma
(code: &str, index: usize)
src/parser.rs:157
Functionparse_false
(code: &str, index: usize)
src/parser.rs:184
Functionparse_incomplete_float
()
tests/parser.rs:103
Functionparse_list
(code: &str, index: usize)
src/parser.rs:94
next →1–100 of 128, ranked by callers