mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
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:
@ -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,
|
||||
|
Reference in New Issue
Block a user