diff --git a/rust/kcl-lib/src/execution/exec_ast.rs b/rust/kcl-lib/src/execution/exec_ast.rs index 677f25923ce..25ed37c82e3 100644 --- a/rust/kcl-lib/src/execution/exec_ast.rs +++ b/rust/kcl-lib/src/execution/exec_ast.rs @@ -918,165 +918,193 @@ impl Node { impl Node { #[async_recursion] pub async fn get_result(&self, exec_state: &mut ExecState, ctx: &ExecutorContext) -> Result { - let left_value = self.left.get_result(exec_state, ctx).await?; - let right_value = self.right.get_result(exec_state, ctx).await?; - let mut meta = left_value.metadata(); - meta.extend(right_value.metadata()); - - // First check if we are doing string concatenation. - if self.operator == BinaryOperator::Add { - if let (KclValue::String { value: left, meta: _ }, KclValue::String { value: right, meta: _ }) = - (&left_value, &right_value) - { - return Ok(KclValue::String { - value: format!("{}{}", left, right), - meta, - }); - } + let mut partial = self.right.get_result(exec_state, ctx).await?; + let mut next = &self.left; + let source_range = self.into(); + // Don't recurse through a big chain of binary operations, iterate instead. + while let BinaryPart::BinaryExpression(next_binary_expr) = next { + let metadata = partial.metadata(); + partial = do_binary_op( + partial, + next_binary_expr.right.get_result(exec_state, ctx).await?, + next_binary_expr.operator, + metadata, + source_range, + exec_state, + ctx, + ) + .await?; + next = &next_binary_expr.left; } - // Then check if we have solids. - if self.operator == BinaryOperator::Add || self.operator == BinaryOperator::Or { - if let (KclValue::Solid { value: left }, KclValue::Solid { value: right }) = (&left_value, &right_value) { - let args = crate::std::Args::new(Default::default(), self.into(), ctx.clone(), None); - let result = - crate::std::csg::inner_union(vec![*left.clone(), *right.clone()], exec_state, args).await?; - return Ok(result.into()); - } - } else if self.operator == BinaryOperator::Sub { - // Check if we have solids. - if let (KclValue::Solid { value: left }, KclValue::Solid { value: right }) = (&left_value, &right_value) { - let args = crate::std::Args::new(Default::default(), self.into(), ctx.clone(), None); - let result = - crate::std::csg::inner_subtract(vec![*left.clone()], vec![*right.clone()], exec_state, args) - .await?; - return Ok(result.into()); - } - } else if self.operator == BinaryOperator::And { - // Check if we have solids. - if let (KclValue::Solid { value: left }, KclValue::Solid { value: right }) = (&left_value, &right_value) { - let args = crate::std::Args::new(Default::default(), self.into(), ctx.clone(), None); - let result = - crate::std::csg::inner_intersect(vec![*left.clone(), *right.clone()], exec_state, args).await?; - return Ok(result.into()); - } - } + let next_value = next.get_result(exec_state, ctx).await?; + let mut meta = partial.metadata(); + meta.extend(next_value.metadata()); - // Check if we are doing logical operations on booleans. - if self.operator == BinaryOperator::Or || self.operator == BinaryOperator::And { - let KclValue::Bool { - value: left_value, - meta: _, - } = left_value - else { - return Err(KclError::Semantic(KclErrorDetails { - message: format!( - "Cannot apply logical operator to non-boolean value: {}", - left_value.human_friendly_type() - ), - source_ranges: vec![self.left.clone().into()], - })); - }; - let KclValue::Bool { - value: right_value, - meta: _, - } = right_value - else { - return Err(KclError::Semantic(KclErrorDetails { - message: format!( - "Cannot apply logical operator to non-boolean value: {}", - right_value.human_friendly_type() - ), - source_ranges: vec![self.right.clone().into()], - })); - }; - let raw_value = match self.operator { - BinaryOperator::Or => left_value || right_value, - BinaryOperator::And => left_value && right_value, - _ => unreachable!(), - }; - return Ok(KclValue::Bool { value: raw_value, meta }); - } + let value = do_binary_op(partial, next_value, self.operator, meta, self.into(), exec_state, ctx).await?; + Ok(value) + } +} - let left = number_as_f64(&left_value, self.left.clone().into())?; - let right = number_as_f64(&right_value, self.right.clone().into())?; +fn warn_on_unknown(source_range: SourceRange, ty: &NumericType, verb: &str, exec_state: &mut ExecState) { + if *CHECK_NUMERIC_TYPES && ty == &NumericType::Unknown { + // TODO suggest how to fix this + exec_state.warn(CompilationError::err( + source_range, + format!("{} numbers which have unknown or incompatible units.", verb), + )); + } +} - let value = match self.operator { - BinaryOperator::Add => { - let (l, r, ty) = NumericType::combine_eq(left, right); - self.warn_on_unknown(&ty, "Adding", exec_state); - KclValue::Number { value: l + r, meta, ty } - } - BinaryOperator::Sub => { - let (l, r, ty) = NumericType::combine_eq(left, right); - self.warn_on_unknown(&ty, "Subtracting", exec_state); - KclValue::Number { value: l - r, meta, ty } - } - BinaryOperator::Mul => { - let (l, r, ty) = NumericType::combine_mul(left, right); - self.warn_on_unknown(&ty, "Multiplying", exec_state); - KclValue::Number { value: l * r, meta, ty } - } - BinaryOperator::Div => { - let (l, r, ty) = NumericType::combine_div(left, right); - self.warn_on_unknown(&ty, "Dividing", exec_state); - KclValue::Number { value: l / r, meta, ty } - } - BinaryOperator::Mod => { - let (l, r, ty) = NumericType::combine_div(left, right); - self.warn_on_unknown(&ty, "Modulo of", exec_state); - KclValue::Number { value: l % r, meta, ty } - } - BinaryOperator::Pow => KclValue::Number { - value: left.n.powf(right.n), +async fn do_binary_op( + left_value: KclValue, + right_value: KclValue, + operator: BinaryOperator, + meta: Vec, + source_range: SourceRange, + exec_state: &mut ExecState, + ctx: &ExecutorContext, +) -> Result { + // First check if we are doing string concatenation. + if operator == BinaryOperator::Add { + if let (KclValue::String { value: left, meta: _ }, KclValue::String { value: right, meta: _ }) = + (&left_value, &right_value) + { + return Ok(KclValue::String { + value: format!("{}{}", left, right), meta, - ty: NumericType::Unknown, - }, - BinaryOperator::Neq => { - let (l, r, ty) = NumericType::combine_eq(left, right); - self.warn_on_unknown(&ty, "Comparing", exec_state); - KclValue::Bool { value: l != r, meta } - } - BinaryOperator::Gt => { - let (l, r, ty) = NumericType::combine_eq(left, right); - self.warn_on_unknown(&ty, "Comparing", exec_state); - KclValue::Bool { value: l > r, meta } - } - BinaryOperator::Gte => { - let (l, r, ty) = NumericType::combine_eq(left, right); - self.warn_on_unknown(&ty, "Comparing", exec_state); - KclValue::Bool { value: l >= r, meta } - } - BinaryOperator::Lt => { - let (l, r, ty) = NumericType::combine_eq(left, right); - self.warn_on_unknown(&ty, "Comparing", exec_state); - KclValue::Bool { value: l < r, meta } - } - BinaryOperator::Lte => { - let (l, r, ty) = NumericType::combine_eq(left, right); - self.warn_on_unknown(&ty, "Comparing", exec_state); - KclValue::Bool { value: l <= r, meta } - } - BinaryOperator::Eq => { - let (l, r, ty) = NumericType::combine_eq(left, right); - self.warn_on_unknown(&ty, "Comparing", exec_state); - KclValue::Bool { value: l == r, meta } - } - BinaryOperator::And | BinaryOperator::Or => unreachable!(), - }; - - Ok(value) + }); + } } - fn warn_on_unknown(&self, ty: &NumericType, verb: &str, exec_state: &mut ExecState) { - if *CHECK_NUMERIC_TYPES && ty == &NumericType::Unknown { - // TODO suggest how to fix this - exec_state.warn(CompilationError::err( - self.as_source_range(), - format!("{} numbers which have unknown or incompatible units.", verb), - )); + // Then check if we have solids. + if operator == BinaryOperator::Add || operator == BinaryOperator::Or { + if let (KclValue::Solid { value: left }, KclValue::Solid { value: right }) = (&left_value, &right_value) { + let args = crate::std::Args::new(Default::default(), source_range, ctx.clone(), None); + let result = crate::std::csg::inner_union(vec![*left.clone(), *right.clone()], exec_state, args).await?; + return Ok(result.into()); + } + } else if operator == BinaryOperator::Sub { + // Check if we have solids. + if let (KclValue::Solid { value: left }, KclValue::Solid { value: right }) = (&left_value, &right_value) { + let args = crate::std::Args::new(Default::default(), source_range, ctx.clone(), None); + let result = + crate::std::csg::inner_subtract(vec![*left.clone()], vec![*right.clone()], exec_state, args).await?; + return Ok(result.into()); + } + } else if operator == BinaryOperator::And { + // Check if we have solids. + if let (KclValue::Solid { value: left }, KclValue::Solid { value: right }) = (&left_value, &right_value) { + let args = crate::std::Args::new(Default::default(), source_range, ctx.clone(), None); + let result = + crate::std::csg::inner_intersect(vec![*left.clone(), *right.clone()], exec_state, args).await?; + return Ok(result.into()); } } + + // Check if we are doing logical operations on booleans. + if operator == BinaryOperator::Or || operator == BinaryOperator::And { + let KclValue::Bool { + value: left_value, + meta: _, + } = left_value + else { + return Err(KclError::Semantic(KclErrorDetails { + message: format!( + "Cannot apply logical operator to non-boolean value: {}", + left_value.human_friendly_type() + ), + source_ranges: left_value.into(), + })); + }; + let KclValue::Bool { + value: right_value, + meta: _, + } = right_value + else { + return Err(KclError::Semantic(KclErrorDetails { + message: format!( + "Cannot apply logical operator to non-boolean value: {}", + right_value.human_friendly_type() + ), + source_ranges: right_value.into(), + })); + }; + let raw_value = match operator { + BinaryOperator::Or => left_value || right_value, + BinaryOperator::And => left_value && right_value, + _ => unreachable!(), + }; + return Ok(KclValue::Bool { value: raw_value, meta }); + } + + let left = number_as_f64(&left_value, (&left_value).into())?; + let right = number_as_f64(&right_value, (&left_value).into())?; + + let value = match operator { + BinaryOperator::Add => { + let (l, r, ty) = NumericType::combine_eq(left, right); + warn_on_unknown(source_range, &ty, "Adding", exec_state); + KclValue::Number { value: l + r, meta, ty } + } + BinaryOperator::Sub => { + let (l, r, ty) = NumericType::combine_eq(left, right); + warn_on_unknown(source_range, &ty, "Subtracting", exec_state); + KclValue::Number { value: l - r, meta, ty } + } + BinaryOperator::Mul => { + let (l, r, ty) = NumericType::combine_mul(left, right); + warn_on_unknown(source_range, &ty, "Multiplying", exec_state); + KclValue::Number { value: l * r, meta, ty } + } + BinaryOperator::Div => { + let (l, r, ty) = NumericType::combine_div(left, right); + warn_on_unknown(source_range, &ty, "Dividing", exec_state); + KclValue::Number { value: l / r, meta, ty } + } + BinaryOperator::Mod => { + let (l, r, ty) = NumericType::combine_div(left, right); + warn_on_unknown(source_range, &ty, "Modulo of", exec_state); + KclValue::Number { value: l % r, meta, ty } + } + BinaryOperator::Pow => KclValue::Number { + value: left.n.powf(right.n), + meta, + ty: NumericType::Unknown, + }, + BinaryOperator::Neq => { + let (l, r, ty) = NumericType::combine_eq(left, right); + warn_on_unknown(source_range, &ty, "Comparing", exec_state); + KclValue::Bool { value: l != r, meta } + } + BinaryOperator::Gt => { + let (l, r, ty) = NumericType::combine_eq(left, right); + warn_on_unknown(source_range, &ty, "Comparing", exec_state); + KclValue::Bool { value: l > r, meta } + } + BinaryOperator::Gte => { + let (l, r, ty) = NumericType::combine_eq(left, right); + warn_on_unknown(source_range, &ty, "Comparing", exec_state); + KclValue::Bool { value: l >= r, meta } + } + BinaryOperator::Lt => { + let (l, r, ty) = NumericType::combine_eq(left, right); + warn_on_unknown(source_range, &ty, "Comparing", exec_state); + KclValue::Bool { value: l < r, meta } + } + BinaryOperator::Lte => { + let (l, r, ty) = NumericType::combine_eq(left, right); + warn_on_unknown(source_range, &ty, "Comparing", exec_state); + KclValue::Bool { value: l <= r, meta } + } + BinaryOperator::Eq => { + let (l, r, ty) = NumericType::combine_eq(left, right); + warn_on_unknown(source_range, &ty, "Comparing", exec_state); + KclValue::Bool { value: l == r, meta } + } + BinaryOperator::And | BinaryOperator::Or => unreachable!(), + }; + Ok(value) } impl Node { diff --git a/rust/kcl-lib/src/parsing/ast/types/mod.rs b/rust/kcl-lib/src/parsing/ast/types/mod.rs index f7938a29374..4d680cfd715 100644 --- a/rust/kcl-lib/src/parsing/ast/types/mod.rs +++ b/rust/kcl-lib/src/parsing/ast/types/mod.rs @@ -2832,7 +2832,7 @@ impl BinaryExpression { } } -#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema, FromStr, Display)] +#[derive(Debug, Clone, Copy, Deserialize, Serialize, PartialEq, Eq, ts_rs::TS, JsonSchema, FromStr, Display)] #[ts(export)] #[serde(rename_all = "snake_case")] #[display(style = "snake_case")] diff --git a/rust/kcl-lib/tests/add_lots/ast.snap b/rust/kcl-lib/tests/add_lots/ast.snap index 914566d3fc3..2e44d5d89cf 100644 --- a/rust/kcl-lib/tests/add_lots/ast.snap +++ b/rust/kcl-lib/tests/add_lots/ast.snap @@ -318,40 +318,1360 @@ description: Result of parsing add_lots.kcl "commentStart": 0, "end": 0, "left": { - "arguments": [ - { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { "commentStart": 0, "end": 0, - "raw": "0", + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "commentStart": 0, + "end": 0, + "left": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "0", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 0.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "1", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 1.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "2", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 2.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "3", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 3.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "4", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 4.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "5", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 5.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "6", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 6.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "7", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 7.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "8", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 8.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "9", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 9.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "10", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 10.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "11", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 11.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "12", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 12.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "13", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 13.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "14", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 14.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "15", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 15.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "16", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 16.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "17", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 17.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "18", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 18.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "19", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 19.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "20", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 20.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "21", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 21.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "22", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 22.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "23", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 23.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "24", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 24.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "25", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 25.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "26", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 26.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "27", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 27.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "28", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 28.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, "start": 0, - "type": "Literal", - "type": "Literal", - "value": { - "value": 0.0, - "suffix": "None" + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "29", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 29.0, + "suffix": "None" + } + } + ], + "callee": { + "abs_path": false, + "commentStart": 0, + "end": 0, + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], + "start": 0, + "type": "Name" + }, + "commentStart": 0, + "end": 0, + "start": 0, + "type": "CallExpression", + "type": "CallExpression" + }, + "start": 0, + "type": "BinaryExpression", + "type": "BinaryExpression" + }, + "operator": "+", + "right": { + "arguments": [ + { + "commentStart": 0, + "end": 0, + "raw": "30", + "start": 0, + "type": "Literal", + "type": "Literal", + "value": { + "value": 30.0, + "suffix": "None" + } } - } - ], - "callee": { - "abs_path": false, - "commentStart": 0, - "end": 0, - "name": { + ], + "callee": { + "abs_path": false, "commentStart": 0, "end": 0, - "name": "f", + "name": { + "commentStart": 0, + "end": 0, + "name": "f", + "start": 0, + "type": "Identifier" + }, + "path": [], "start": 0, - "type": "Identifier" + "type": "Name" }, - "path": [], + "commentStart": 0, + "end": 0, "start": 0, - "type": "Name" + "type": "CallExpression", + "type": "CallExpression" }, - "commentStart": 0, - "end": 0, "start": 0, - "type": "CallExpression", - "type": "CallExpression" + "type": "BinaryExpression", + "type": "BinaryExpression" }, "operator": "+", "right": { @@ -359,12 +1679,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "1", + "raw": "31", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 1.0, + "value": 31.0, "suffix": "None" } } @@ -400,12 +1720,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "2", + "raw": "32", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 2.0, + "value": 32.0, "suffix": "None" } } @@ -441,12 +1761,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "3", + "raw": "33", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 3.0, + "value": 33.0, "suffix": "None" } } @@ -482,12 +1802,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "4", + "raw": "34", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 4.0, + "value": 34.0, "suffix": "None" } } @@ -523,12 +1843,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "5", + "raw": "35", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 5.0, + "value": 35.0, "suffix": "None" } } @@ -564,12 +1884,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "6", + "raw": "36", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 6.0, + "value": 36.0, "suffix": "None" } } @@ -605,12 +1925,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "7", + "raw": "37", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 7.0, + "value": 37.0, "suffix": "None" } } @@ -646,12 +1966,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "8", + "raw": "38", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 8.0, + "value": 38.0, "suffix": "None" } } @@ -687,12 +2007,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "9", + "raw": "39", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 9.0, + "value": 39.0, "suffix": "None" } } @@ -728,12 +2048,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "10", + "raw": "40", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 10.0, + "value": 40.0, "suffix": "None" } } @@ -769,12 +2089,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "11", + "raw": "41", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 11.0, + "value": 41.0, "suffix": "None" } } @@ -810,12 +2130,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "12", + "raw": "42", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 12.0, + "value": 42.0, "suffix": "None" } } @@ -851,12 +2171,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "13", + "raw": "43", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 13.0, + "value": 43.0, "suffix": "None" } } @@ -892,12 +2212,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "14", + "raw": "44", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 14.0, + "value": 44.0, "suffix": "None" } } @@ -933,12 +2253,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "15", + "raw": "45", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 15.0, + "value": 45.0, "suffix": "None" } } @@ -974,12 +2294,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "16", + "raw": "46", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 16.0, + "value": 46.0, "suffix": "None" } } @@ -1015,12 +2335,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "17", + "raw": "47", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 17.0, + "value": 47.0, "suffix": "None" } } @@ -1056,12 +2376,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "18", + "raw": "48", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 18.0, + "value": 48.0, "suffix": "None" } } @@ -1097,12 +2417,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "19", + "raw": "49", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 19.0, + "value": 49.0, "suffix": "None" } } @@ -1138,12 +2458,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "20", + "raw": "50", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 20.0, + "value": 50.0, "suffix": "None" } } @@ -1179,12 +2499,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "21", + "raw": "51", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 21.0, + "value": 51.0, "suffix": "None" } } @@ -1220,12 +2540,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "22", + "raw": "52", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 22.0, + "value": 52.0, "suffix": "None" } } @@ -1261,12 +2581,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "23", + "raw": "53", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 23.0, + "value": 53.0, "suffix": "None" } } @@ -1302,12 +2622,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "24", + "raw": "54", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 24.0, + "value": 54.0, "suffix": "None" } } @@ -1343,12 +2663,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "25", + "raw": "55", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 25.0, + "value": 55.0, "suffix": "None" } } @@ -1384,12 +2704,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "26", + "raw": "56", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 26.0, + "value": 56.0, "suffix": "None" } } @@ -1425,12 +2745,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "27", + "raw": "57", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 27.0, + "value": 57.0, "suffix": "None" } } @@ -1466,12 +2786,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "28", + "raw": "58", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 28.0, + "value": 58.0, "suffix": "None" } } @@ -1507,12 +2827,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "29", + "raw": "59", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 29.0, + "value": 59.0, "suffix": "None" } } @@ -1548,12 +2868,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "30", + "raw": "60", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 30.0, + "value": 60.0, "suffix": "None" } } @@ -1589,12 +2909,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "31", + "raw": "61", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 31.0, + "value": 61.0, "suffix": "None" } } @@ -1630,12 +2950,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "32", + "raw": "62", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 32.0, + "value": 62.0, "suffix": "None" } } @@ -1671,12 +2991,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "33", + "raw": "63", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 33.0, + "value": 63.0, "suffix": "None" } } @@ -1712,12 +3032,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "34", + "raw": "64", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 34.0, + "value": 64.0, "suffix": "None" } } @@ -1753,12 +3073,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "35", + "raw": "65", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 35.0, + "value": 65.0, "suffix": "None" } } @@ -1794,12 +3114,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "36", + "raw": "66", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 36.0, + "value": 66.0, "suffix": "None" } } @@ -1835,12 +3155,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "37", + "raw": "67", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 37.0, + "value": 67.0, "suffix": "None" } } @@ -1876,12 +3196,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "38", + "raw": "68", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 38.0, + "value": 68.0, "suffix": "None" } } @@ -1917,12 +3237,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "39", + "raw": "69", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 39.0, + "value": 69.0, "suffix": "None" } } @@ -1958,12 +3278,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "40", + "raw": "70", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 40.0, + "value": 70.0, "suffix": "None" } } @@ -1999,12 +3319,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "41", + "raw": "71", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 41.0, + "value": 71.0, "suffix": "None" } } @@ -2040,12 +3360,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "42", + "raw": "72", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 42.0, + "value": 72.0, "suffix": "None" } } @@ -2081,12 +3401,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "43", + "raw": "73", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 43.0, + "value": 73.0, "suffix": "None" } } @@ -2122,12 +3442,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "44", + "raw": "74", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 44.0, + "value": 74.0, "suffix": "None" } } @@ -2163,12 +3483,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "45", + "raw": "75", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 45.0, + "value": 75.0, "suffix": "None" } } @@ -2204,12 +3524,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "46", + "raw": "76", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 46.0, + "value": 76.0, "suffix": "None" } } @@ -2245,12 +3565,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "47", + "raw": "77", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 47.0, + "value": 77.0, "suffix": "None" } } @@ -2286,12 +3606,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "48", + "raw": "78", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 48.0, + "value": 78.0, "suffix": "None" } } @@ -2327,12 +3647,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "49", + "raw": "79", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 49.0, + "value": 79.0, "suffix": "None" } } @@ -2368,12 +3688,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "50", + "raw": "80", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 50.0, + "value": 80.0, "suffix": "None" } } @@ -2409,12 +3729,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "51", + "raw": "81", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 51.0, + "value": 81.0, "suffix": "None" } } @@ -2450,12 +3770,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "52", + "raw": "82", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 52.0, + "value": 82.0, "suffix": "None" } } @@ -2491,12 +3811,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "53", + "raw": "83", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 53.0, + "value": 83.0, "suffix": "None" } } @@ -2532,12 +3852,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "54", + "raw": "84", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 54.0, + "value": 84.0, "suffix": "None" } } @@ -2573,12 +3893,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "55", + "raw": "85", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 55.0, + "value": 85.0, "suffix": "None" } } @@ -2614,12 +3934,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "56", + "raw": "86", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 56.0, + "value": 86.0, "suffix": "None" } } @@ -2655,12 +3975,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "57", + "raw": "87", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 57.0, + "value": 87.0, "suffix": "None" } } @@ -2696,12 +4016,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "58", + "raw": "88", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 58.0, + "value": 88.0, "suffix": "None" } } @@ -2737,12 +4057,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "59", + "raw": "89", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 59.0, + "value": 89.0, "suffix": "None" } } @@ -2778,12 +4098,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "60", + "raw": "90", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 60.0, + "value": 90.0, "suffix": "None" } } @@ -2819,12 +4139,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "61", + "raw": "91", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 61.0, + "value": 91.0, "suffix": "None" } } @@ -2860,12 +4180,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "62", + "raw": "92", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 62.0, + "value": 92.0, "suffix": "None" } } @@ -2901,12 +4221,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "63", + "raw": "93", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 63.0, + "value": 93.0, "suffix": "None" } } @@ -2942,12 +4262,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "64", + "raw": "94", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 64.0, + "value": 94.0, "suffix": "None" } } @@ -2983,12 +4303,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "65", + "raw": "95", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 65.0, + "value": 95.0, "suffix": "None" } } @@ -3024,12 +4344,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "66", + "raw": "96", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 66.0, + "value": 96.0, "suffix": "None" } } @@ -3065,12 +4385,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "67", + "raw": "97", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 67.0, + "value": 97.0, "suffix": "None" } } @@ -3106,12 +4426,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "68", + "raw": "98", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 68.0, + "value": 98.0, "suffix": "None" } } @@ -3147,12 +4467,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "69", + "raw": "99", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 69.0, + "value": 99.0, "suffix": "None" } } @@ -3188,12 +4508,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "70", + "raw": "100", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 70.0, + "value": 100.0, "suffix": "None" } } @@ -3256,12 +4576,12 @@ description: Result of parsing add_lots.kcl { "commentStart": 0, "end": 0, - "raw": "4970", + "raw": "10100", "start": 0, "type": "Literal", "type": "Literal", "value": { - "value": 4970.0, + "value": 10100.0, "suffix": "None" } }, diff --git a/rust/kcl-lib/tests/add_lots/input.kcl b/rust/kcl-lib/tests/add_lots/input.kcl index bc31baaf0cf..9694032cd72 100644 --- a/rust/kcl-lib/tests/add_lots/input.kcl +++ b/rust/kcl-lib/tests/add_lots/input.kcl @@ -2,6 +2,6 @@ fn f(i) { return i * 2 } -x = f(0) + f(1) + f(2) + f(3) + f(4) + f(5) + f(6) + f(7) + f(8) + f(9) + f(10) + f(11) + f(12) + f(13) + f(14) + f(15) + f(16) + f(17) + f(18) + f(19) + f(20) + f(21) + f(22) + f(23) + f(24) + f(25) + f(26) + f(27) + f(28) + f(29) + f(30) + f(31) + f(32) + f(33) + f(34) + f(35) + f(36) + f(37) + f(38) + f(39) + f(40) + f(41) + f(42) + f(43) + f(44) + f(45) + f(46) + f(47) + f(48) + f(49) + f(50) + f(51) + f(52) + f(53) + f(54) + f(55) + f(56) + f(57) + f(58) + f(59) + f(60) + f(61) + f(62) + f(63) + f(64) + f(65) + f(66) + f(67) + f(68) + f(69) + f(70) +x = f(0) + f(1) + f(2) + f(3) + f(4) + f(5) + f(6) + f(7) + f(8) + f(9) + f(10) + f(11) + f(12) + f(13) + f(14) + f(15) + f(16) + f(17) + f(18) + f(19) + f(20) + f(21) + f(22) + f(23) + f(24) + f(25) + f(26) + f(27) + f(28) + f(29) + f(30) + f(31) + f(32) + f(33) + f(34) + f(35) + f(36) + f(37) + f(38) + f(39) + f(40) + f(41) + f(42) + f(43) + f(44) + f(45) + f(46) + f(47) + f(48) + f(49) + f(50) + f(51) + f(52) + f(53) + f(54) + f(55) + f(56) + f(57) + f(58) + f(59) + f(60) + f(61) + f(62) + f(63) + f(64) + f(65) + f(66) + f(67) + f(68) + f(69) + f(70) + f(71) + f(72) + f(73) + f(74) + f(75) + f(76) + f(77) + f(78) + f(79) + f(80) + f(81) + f(82) + f(83) + f(84) + f(85) + f(86) + f(87) + f(88) + f(89) + f(90) + f(91) + f(92) + f(93) + f(94) + f(95) + f(96) + f(97) + f(98) + f(99) + f(100) -assertEqual(x, 4970, 0.1, "Big sum") +assertEqual(x, 10100, 0.1, "Big sum") diff --git a/rust/kcl-lib/tests/add_lots/ops.snap b/rust/kcl-lib/tests/add_lots/ops.snap index 1c2700a9ebb..7d0644b7ade 100644 --- a/rust/kcl-lib/tests/add_lots/ops.snap +++ b/rust/kcl-lib/tests/add_lots/ops.snap @@ -1278,6 +1278,546 @@ description: Operations executed add_lots.kcl }, "sourceRange": [] }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupEnd" + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "f", + "functionSourceRange": [ + 4, + 26, + 0 + ], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, { "type": "GroupEnd" } diff --git a/rust/kcl-lib/tests/add_lots/program_memory.snap b/rust/kcl-lib/tests/add_lots/program_memory.snap index 385a17446d0..d3f6198aab7 100644 --- a/rust/kcl-lib/tests/add_lots/program_memory.snap +++ b/rust/kcl-lib/tests/add_lots/program_memory.snap @@ -8,7 +8,7 @@ description: Variables in memory after executing add_lots.kcl }, "x": { "type": "Number", - "value": 4970.0, + "value": 10100.0, "ty": { "type": "Default", "len": { diff --git a/rust/kcl-lib/tests/add_lots/unparsed.snap b/rust/kcl-lib/tests/add_lots/unparsed.snap index edfbd75b4db..c52044e4fcb 100644 --- a/rust/kcl-lib/tests/add_lots/unparsed.snap +++ b/rust/kcl-lib/tests/add_lots/unparsed.snap @@ -6,6 +6,6 @@ fn f(i) { return i * 2 } -x = f(0) + f(1) + f(2) + f(3) + f(4) + f(5) + f(6) + f(7) + f(8) + f(9) + f(10) + f(11) + f(12) + f(13) + f(14) + f(15) + f(16) + f(17) + f(18) + f(19) + f(20) + f(21) + f(22) + f(23) + f(24) + f(25) + f(26) + f(27) + f(28) + f(29) + f(30) + f(31) + f(32) + f(33) + f(34) + f(35) + f(36) + f(37) + f(38) + f(39) + f(40) + f(41) + f(42) + f(43) + f(44) + f(45) + f(46) + f(47) + f(48) + f(49) + f(50) + f(51) + f(52) + f(53) + f(54) + f(55) + f(56) + f(57) + f(58) + f(59) + f(60) + f(61) + f(62) + f(63) + f(64) + f(65) + f(66) + f(67) + f(68) + f(69) + f(70) +x = f(0) + f(1) + f(2) + f(3) + f(4) + f(5) + f(6) + f(7) + f(8) + f(9) + f(10) + f(11) + f(12) + f(13) + f(14) + f(15) + f(16) + f(17) + f(18) + f(19) + f(20) + f(21) + f(22) + f(23) + f(24) + f(25) + f(26) + f(27) + f(28) + f(29) + f(30) + f(31) + f(32) + f(33) + f(34) + f(35) + f(36) + f(37) + f(38) + f(39) + f(40) + f(41) + f(42) + f(43) + f(44) + f(45) + f(46) + f(47) + f(48) + f(49) + f(50) + f(51) + f(52) + f(53) + f(54) + f(55) + f(56) + f(57) + f(58) + f(59) + f(60) + f(61) + f(62) + f(63) + f(64) + f(65) + f(66) + f(67) + f(68) + f(69) + f(70) + f(71) + f(72) + f(73) + f(74) + f(75) + f(76) + f(77) + f(78) + f(79) + f(80) + f(81) + f(82) + f(83) + f(84) + f(85) + f(86) + f(87) + f(88) + f(89) + f(90) + f(91) + f(92) + f(93) + f(94) + f(95) + f(96) + f(97) + f(98) + f(99) + f(100) -assertEqual(x, 4970, 0.1, "Big sum") +assertEqual(x, 10100, 0.1, "Big sum")