documentation and cargo.toml changes
This commit is contained in:
@@ -60,6 +60,7 @@ enum Object {
|
||||
Function(Function),
|
||||
}
|
||||
|
||||
/// Executes an input of ParseTrees
|
||||
pub struct Executor<I: Iterator<Item = Result<ParseTree, ParseError>>> {
|
||||
exprs: I,
|
||||
globals: HashMap<String, Object>,
|
||||
|
||||
@@ -34,6 +34,7 @@ impl Display for Type {
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents the result of executing a ParseTree with an Executor
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum Value {
|
||||
Float(f64),
|
||||
|
||||
@@ -239,6 +239,7 @@ impl ParseTree {
|
||||
}
|
||||
}
|
||||
|
||||
/// Parses input tokens and produces ParseTrees for an Executor
|
||||
pub struct Parser<I: Iterator<Item = Result<Token, TokenizeError>>> {
|
||||
tokens: I,
|
||||
|
||||
|
||||
@@ -148,6 +148,7 @@ impl Token {
|
||||
}
|
||||
}
|
||||
|
||||
/// Tokenize an input stream of source code for a Parser
|
||||
pub struct Tokenizer<R: BufRead> {
|
||||
reader: R,
|
||||
tokens: VecDeque<Token>,
|
||||
|
||||
Reference in New Issue
Block a user