Stream support (#812)

* Moves off of draining between filters. Instead, the sink will pull on the stream, and will drain element-wise. This moves the whole stream to being lazy.
* Adds ctrl-c support and connects it into some of the key points where we pull on the stream. If a ctrl-c is detect, we immediately halt pulling on the stream and return to the prompt.
* Moves away from having a SourceMap where anchor locations are stored. Now AnchorLocation is kept directly in the Tag.
* To make this possible, split tag and span. Span is largely used in the parser and is copyable. Tag is now no longer copyable.
This commit is contained in:
Jonathan Turner
2019-10-13 17:12:43 +13:00
committed by GitHub
parent 8ca678440a
commit 193b00764b
110 changed files with 1988 additions and 1892 deletions

View File

@ -21,7 +21,7 @@ impl Sum {
tag,
}) => {
//TODO: handle overflow
self.total = Some(Value::int(i + j).tagged(*tag));
self.total = Some(Value::int(i + j).tagged(tag));
Ok(())
}
None => {
@ -36,7 +36,7 @@ impl Sum {
}
}
Value::Primitive(Primitive::Bytes(b)) => {
match self.total {
match &self.total {
Some(Tagged {
item: Value::Primitive(Primitive::Bytes(j)),
tag,