Clean up tests and docs
This commit is contained in:
parent
51e93e5992
commit
3e45c198aa
@ -49,7 +49,7 @@ Dust is an experimental project under active development. At this stage, feature
|
|||||||
To get help with the shell you can use the "help" tool.
|
To get help with the shell you can use the "help" tool.
|
||||||
|
|
||||||
```dust
|
```dust
|
||||||
(help) # Returns a table with tool info.
|
(help) # Returns a table with tool info.
|
||||||
```
|
```
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
@ -16,8 +16,8 @@ use crate::{abstract_tree::item::Item, language, AbstractTree, Result, Value, Va
|
|||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # use dust::*;
|
/// # use dust_lang::*;
|
||||||
/// assert_eq!(evaluate("1 + 2 + 3"), vec![Ok(Value::Integer(6))]);
|
/// assert_eq!(evaluate("1 + 2 + 3"), Ok(Value::Integer(6)));
|
||||||
/// ```
|
/// ```
|
||||||
pub fn evaluate(source: &str) -> Result<Value> {
|
pub fn evaluate(source: &str) -> Result<Value> {
|
||||||
let mut context = VariableMap::new();
|
let mut context = VariableMap::new();
|
||||||
@ -30,7 +30,7 @@ pub fn evaluate(source: &str) -> Result<Value> {
|
|||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # use dust::*;
|
/// # use dust_lang::*;
|
||||||
/// let mut context = VariableMap::new();
|
/// let mut context = VariableMap::new();
|
||||||
///
|
///
|
||||||
/// context.set_value("one".into(), 1.into());
|
/// context.set_value("one".into(), 1.into());
|
||||||
@ -41,7 +41,7 @@ pub fn evaluate(source: &str) -> Result<Value> {
|
|||||||
///
|
///
|
||||||
/// assert_eq!(
|
/// assert_eq!(
|
||||||
/// evaluate_with_context(dust_code, &mut context),
|
/// evaluate_with_context(dust_code, &mut context),
|
||||||
/// vec![Ok(Value::Empty), Ok(Value::Integer(10))]
|
/// Ok(Value::Integer(10))
|
||||||
/// );
|
/// );
|
||||||
/// ```
|
/// ```
|
||||||
pub fn evaluate_with_context(source: &str, context: &mut VariableMap) -> Result<Value> {
|
pub fn evaluate_with_context(source: &str, context: &mut VariableMap) -> Result<Value> {
|
||||||
|
@ -10,6 +10,7 @@ fn clue_solver() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[ignore]
|
||||||
fn fetch() {
|
fn fetch() {
|
||||||
let file_contents = read_to_string("examples/fetch.ds").unwrap();
|
let file_contents = read_to_string("examples/fetch.ds").unwrap();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user