Skip to content

Commit

Permalink
Linguistics
Browse files Browse the repository at this point in the history
  • Loading branch information
busstoptaktik committed Aug 14, 2023
1 parent 3b45660 commit ae049da
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/bin/kp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ fn main() -> Result<(), anyhow::Error> {

// To avoid unlimited buffer growth, we send material
// on to the transformation factory every time, we have
// 25000 operans to operate on
// 25000 operands to operate on
if operands.len() == 25000 {
number_of_operands_succesfully_transformed +=
transform(&options, op, &mut operands, &ctx)?;
Expand Down
2 changes: 1 addition & 1 deletion src/inner_op/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ mod tests {
// 1234-order, while pop happens in 4321-order, so a
// "push all, pop all" pair is a noop: The order of operator
// options is insignificant, so the 1234/4321 order is, in principle
// arbitrary, but seleted with the noop-characteristicum in mind.
// arbitrary, but selected with the noop-characteristics in mind.
let op = ctx.op("push v_1 v_2|pop v_1 v_2")?;
ctx.apply(op, Fwd, &mut data)?;
assert_eq!(data[0][0], 12.);
Expand Down
2 changes: 1 addition & 1 deletion src/op/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub use parameter::OpParameter;
pub use parsed_parameters::ParsedParameters;
pub use raw_parameters::RawParameters;

/// The key, returned to the user, representing the actual operation handled by the `Context`
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Copy, Clone)]
pub struct OpHandle(uuid::Uuid);
impl OpHandle {
Expand Down Expand Up @@ -213,7 +214,6 @@ pub fn split_into_steps(definition: &str) -> (Vec<String>, String) {
.to_string();

// Collect docstrings and remove plain comments
//let mut trimmed = Vec::<String>::new();
let mut trimmed = String::new();
let mut docstring = Vec::<String>::new();
for line in all.lines() {
Expand Down
7 changes: 4 additions & 3 deletions src/op/raw_parameters.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// `RawParameters` is the vehicle used by the `Op`erator factory in `Op::op(...)`,
// to ferry args around from the invocator into the constructor of the individual
// `InnerOp`s. The `InnrOp`constructor typically interprets the contents of
// `InnerOp`s. The `InnerOp`constructor typically interprets the contents of
// `RawParameters`, and converts it into a more runtime friendly instance of
// `ParsedParameters`.

Expand Down Expand Up @@ -44,8 +44,9 @@ impl RawParameters {
}
}

// If the next step is a macro (i.e. potentially an embedded pipeline), we
// get the arguments from the invocation and bring them into the globals.
// If the next step is a macro (i.e. potentially an embedded pipeline),
// we take a copy of the arguments from the macro invocation and enter
// them into the globals.
// Otherwise, we just copy the globals from the previous step, and
// update the recursion counter.
pub fn next(&self, definition: &str) -> RawParameters {
Expand Down

0 comments on commit ae049da

Please sign in to comment.