diff --git a/compiler/ast-passes/src/canonicalization/canonicalizer.rs b/compiler/ast-passes/src/canonicalization/canonicalizer.rs index 0bec06f5a2..86aa80cbe8 100644 --- a/compiler/ast-passes/src/canonicalization/canonicalizer.rs +++ b/compiler/ast-passes/src/canonicalization/canonicalizer.rs @@ -18,6 +18,8 @@ //! such that it applies changes to the AST nodes for canonicalization. //! An example of these changes are transforming Self -> to the circuit name. +use std::cell::RefCell; + use leo_ast::*; use leo_errors::{AstError, Result}; use leo_span::{sym, Span, Symbol}; @@ -104,23 +106,14 @@ impl Canonicalizer { } } - fn canonicalize_self_type(&self, type_option: Option<&Type>) -> Option { - match type_option { - Some(type_) => match type_ { - Type::SelfType => Some(Type::Identifier(self.circuit_name.as_ref().unwrap().clone())), - Type::Array(type_, dimensions) => Some(Type::Array( - Box::new(self.canonicalize_self_type(Some(type_)).unwrap()), - dimensions.clone(), - )), - Type::Tuple(types) => Some(Type::Tuple( - types - .iter() - .map(|type_| self.canonicalize_self_type(Some(type_)).unwrap()) - .collect(), - )), - _ => Some(type_.clone()), - }, - None => None, + fn canonicalize_self_type(&self, type_: &Type) -> Type { + match type_ { + Type::SelfType => Type::Identifier(self.circuit_name.as_ref().unwrap().clone()), + Type::Array(type_, dimensions) => { + Type::Array(Box::new(self.canonicalize_self_type(type_)), dimensions.clone()) + } + Type::Tuple(types) => Type::Tuple(types.iter().map(|type_| self.canonicalize_self_type(type_)).collect()), + _ => type_.clone(), } } @@ -174,7 +167,7 @@ impl Canonicalizer { Expression::Cast(cast) => { let inner = Box::new(self.canonicalize_expression(&cast.inner)); - let target_type = self.canonicalize_self_type(Some(&cast.target_type)).unwrap(); + let target_type = self.canonicalize_self_type(&cast.target_type); return Expression::Cast(CastExpression { inner, @@ -231,7 +224,7 @@ impl Canonicalizer { AccessExpression::Static(static_access) => AccessExpression::Static(StaticAccess { inner: Box::new(self.canonicalize_expression(&static_access.inner)), name: static_access.name.clone(), - type_: self.canonicalize_self_type(static_access.type_.as_ref()), + type_: RefCell::new(self.canonicalize_self_type(&static_access.type_.borrow())), span: static_access.span.clone(), }), }; @@ -371,7 +364,7 @@ impl Canonicalizer { } Statement::Definition(definition) => { let value = self.canonicalize_expression(&definition.value); - let type_ = self.canonicalize_self_type(Some(&definition.type_)).unwrap(); + let type_ = self.canonicalize_self_type(&definition.type_); Statement::Definition(DefinitionStatement { declaration_type: definition.declaration_type.clone(), @@ -409,7 +402,7 @@ impl Canonicalizer { }) } Statement::Iteration(iteration) => { - let type_ = self.canonicalize_self_type(Some(&iteration.type_)).unwrap(); + let type_ = self.canonicalize_self_type(&iteration.type_); let start = self.canonicalize_expression(&iteration.start); let stop = self.canonicalize_expression(&iteration.stop); let block = self.canonicalize_block(&iteration.block); @@ -465,7 +458,7 @@ impl Canonicalizer { fn canonicalize_function_input(&mut self, input: &FunctionInput) -> FunctionInput { if let FunctionInput::Variable(variable) = input { - let type_ = self.canonicalize_self_type(Some(&variable.type_)).unwrap(); + let type_ = self.canonicalize_self_type(&variable.type_); return FunctionInput::Variable(FunctionInputVariable { identifier: variable.identifier.clone(), @@ -495,7 +488,7 @@ impl Canonicalizer { .iter() .map(|input| self.canonicalize_function_input(input)) .collect(); - let output = self.canonicalize_self_type(function.output.as_ref()); + let output = self.canonicalize_self_type(&function.output); let block = self.canonicalize_block(&function.block); return CircuitMember::CircuitFunction(Box::new(Function { @@ -687,20 +680,15 @@ impl ReconstructingReducer for Canonicalizer { annotations: IndexMap, input: Vec, const_: bool, - output: Option, + output: Type, block: Block, ) -> Result { - let new_output = match output { - None => Some(Type::Tuple(vec![])), - _ => output, - }; - Ok(Function { identifier, annotations, input, const_, - output: new_output, + output, block, core_mapping: function.core_mapping.clone(), span: function.span.clone(), diff --git a/compiler/ast/src/accesses/static_access.rs b/compiler/ast/src/accesses/static_access.rs index c61d4976f1..5d3455e002 100644 --- a/compiler/ast/src/accesses/static_access.rs +++ b/compiler/ast/src/accesses/static_access.rs @@ -19,7 +19,7 @@ use crate::{Expression, Identifier, Node, Type}; use leo_span::Span; use serde::{Deserialize, Serialize}; -use std::fmt; +use std::{cell::RefCell, fmt}; /// An access expression to a static member, e.g., a constant in a circuit. /// An example would be `Foo::Const` or `Foo::function` in `Foo::function()`. @@ -30,9 +30,9 @@ pub struct StaticAccess { pub inner: Box, /// The static member in `inner` that is being accessed. pub name: Identifier, - /// An optional type initially None, it is later assigned during type inference snapshot if necessary. + /// A refcell type initially (), it is later assigned during type checking if necessary. // FIXME(Centril): Shouldn't be in an AST. Remove it as part of an architectural revamp. - pub type_: Option, + pub type_: RefCell, /// The span for the entire expression `inner::name`. pub span: Span, } diff --git a/compiler/ast/src/functions/function.rs b/compiler/ast/src/functions/function.rs index 11b5686367..92f4bba7d3 100644 --- a/compiler/ast/src/functions/function.rs +++ b/compiler/ast/src/functions/function.rs @@ -34,7 +34,7 @@ pub struct Function { /// The function returns a constant value. pub const_: bool, /// The function return type, if explicitly specified, or `()` if not. - pub output: Option, + pub output: Type, /// Any mapping to the core library. /// Always `None` when initially parsed. pub core_mapping: Cell>, @@ -93,12 +93,8 @@ impl Function { write!(f, "function {}", self.identifier)?; let parameters = self.input.iter().map(|x| x.to_string()).collect::>().join(","); - let returns = self.output.as_ref().map(|type_| type_.to_string()); - if returns.is_none() { - write!(f, "({}) {}", parameters, self.block) - } else { - write!(f, "({}) -> {} {}", parameters, returns.unwrap(), self.block) - } + let returns = self.output.to_string(); + write!(f, "({}) -> {} {}", parameters, returns, self.block) } } diff --git a/compiler/ast/src/reducer/reconstructing_director.rs b/compiler/ast/src/reducer/reconstructing_director.rs index dac65809bd..cc12423ad6 100644 --- a/compiler/ast/src/reducer/reconstructing_director.rs +++ b/compiler/ast/src/reducer/reconstructing_director.rs @@ -182,11 +182,7 @@ impl ReconstructingDirector { pub fn reduce_static_access(&mut self, static_access: &StaticAccess) -> Result { let value = self.reduce_expression(&static_access.inner)?; let name = self.reduce_identifier(&static_access.name)?; - let type_ = static_access - .type_ - .as_ref() - .map(|type_| self.reduce_type(type_, &static_access.span)) - .transpose()?; + let type_ = self.reduce_type(&static_access.type_.borrow(), &static_access.span)?; self.reducer.reduce_static_access(static_access, value, type_, name) } @@ -578,11 +574,7 @@ impl ReconstructingDirector { inputs.push(self.reduce_function_input(input)?); } - let output = function - .output - .as_ref() - .map(|type_| self.reduce_type(type_, &function.span)) - .transpose()?; + let output = self.reduce_type(&function.output, &function.span)?; let block = self.reduce_block(&function.block)?; diff --git a/compiler/ast/src/reducer/reconstructing_reducer.rs b/compiler/ast/src/reducer/reconstructing_reducer.rs index 4b0b3938d5..7f368c8c4a 100644 --- a/compiler/ast/src/reducer/reconstructing_reducer.rs +++ b/compiler/ast/src/reducer/reconstructing_reducer.rs @@ -18,6 +18,8 @@ //! It implements default methods for each node to be made //! given the information of the old node. +use std::cell::RefCell; + use crate::*; use leo_errors::Result; @@ -176,13 +178,13 @@ pub trait ReconstructingReducer { &mut self, static_access: &StaticAccess, value: Expression, - type_: Option, + type_: Type, name: Identifier, ) -> Result { Ok(StaticAccess { inner: Box::new(value), name, - type_, + type_: RefCell::new(type_), span: static_access.span.clone(), }) } @@ -472,7 +474,7 @@ pub trait ReconstructingReducer { annotations: IndexMap, input: Vec, const_: bool, - output: Option, + output: Type, block: Block, ) -> Result { Ok(Function { diff --git a/compiler/parser/src/parser/expression.rs b/compiler/parser/src/parser/expression.rs index c78ca3e6e3..3420fd6070 100644 --- a/compiler/parser/src/parser/expression.rs +++ b/compiler/parser/src/parser/expression.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with the Leo library. If not, see . +use std::cell::RefCell; + use super::*; use leo_errors::{ParserError, Result}; @@ -375,7 +377,7 @@ impl ParserContext<'_> { expr = Expression::Access(AccessExpression::Static(StaticAccess { span: expr.span() + &ident.span, inner: Box::new(expr), - type_: None, + type_: RefCell::new(Type::Tuple(Vec::new())), name: ident, })); } diff --git a/compiler/parser/src/parser/file.rs b/compiler/parser/src/parser/file.rs index 6318e66600..1f25449d1a 100644 --- a/compiler/parser/src/parser/file.rs +++ b/compiler/parser/src/parser/file.rs @@ -442,9 +442,9 @@ impl ParserContext<'_> { // Parse return type. let output = if self.eat(Token::Arrow).is_some() { - Some(self.parse_type()?.0) + self.parse_type()?.0 } else { - None + Type::Tuple(Vec::new()) }; // Parse the function body. diff --git a/tests/expectations/parser/parser/circuits/const_functions.leo.out b/tests/expectations/parser/parser/circuits/const_functions.leo.out index 0cd2d5e744..0ab3138fdf 100644 --- a/tests/expectations/parser/parser/circuits/const_functions.leo.out +++ b/tests/expectations/parser/parser/circuits/const_functions.leo.out @@ -19,7 +19,8 @@ outputs: identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function x() { \\\"}\"}" input: [] const_: true - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: @@ -61,7 +62,8 @@ outputs: input: - SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function x(self) { \\\"}\"}" const_: true - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: @@ -103,7 +105,8 @@ outputs: input: - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":32,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function c(const self) { \\\"}\"}" const_: true - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: @@ -158,7 +161,8 @@ outputs: path: "" content: " const function b(const self, x: u32) {" const_: true - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: @@ -213,7 +217,8 @@ outputs: path: "" content: " const function b(const self, const x: u32) {" const_: true - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/circuits/field_and_functions.leo.out b/tests/expectations/parser/parser/circuits/field_and_functions.leo.out index 92db113716..87fdd6fc9c 100644 --- a/tests/expectations/parser/parser/circuits/field_and_functions.leo.out +++ b/tests/expectations/parser/parser/circuits/field_and_functions.leo.out @@ -36,7 +36,8 @@ outputs: identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: @@ -77,7 +78,8 @@ outputs: identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/circuits/functions.leo.out b/tests/expectations/parser/parser/circuits/functions.leo.out index c6db22f69c..418505ce86 100644 --- a/tests/expectations/parser/parser/circuits/functions.leo.out +++ b/tests/expectations/parser/parser/circuits/functions.leo.out @@ -16,7 +16,8 @@ outputs: identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: @@ -57,7 +58,8 @@ outputs: identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function y() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: @@ -98,7 +100,8 @@ outputs: identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function z() {\\\"}\"}" input: [] const_: true - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/circuits/ref_self.leo.out b/tests/expectations/parser/parser/circuits/ref_self.leo.out index 36a7f97eae..b3c3c5975e 100644 --- a/tests/expectations/parser/parser/circuits/ref_self.leo.out +++ b/tests/expectations/parser/parser/circuits/ref_self.leo.out @@ -17,7 +17,8 @@ outputs: input: - RefSelfKeyword: "{\"name\":\"&self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x(&self) {\\\"}\"}" const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/circuits/self.leo.out b/tests/expectations/parser/parser/circuits/self.leo.out index ab817ab360..fd996967f2 100644 --- a/tests/expectations/parser/parser/circuits/self.leo.out +++ b/tests/expectations/parser/parser/circuits/self.leo.out @@ -17,7 +17,8 @@ outputs: input: - SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}" const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/expression/access/array_access.leo.out b/tests/expectations/parser/parser/expression/access/array_access.leo.out index 06628e8fc3..5041dd4e32 100644 --- a/tests/expectations/parser/parser/expression/access/array_access.leo.out +++ b/tests/expectations/parser/parser/expression/access/array_access.leo.out @@ -237,7 +237,8 @@ outputs: path: "" content: "x(y)::y(x)" name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 diff --git a/tests/expectations/parser/parser/expression/access/call.leo.out b/tests/expectations/parser/parser/expression/access/call.leo.out index d92bccdcd6..3a35ac7ab6 100644 --- a/tests/expectations/parser/parser/expression/access/call.leo.out +++ b/tests/expectations/parser/parser/expression/access/call.leo.out @@ -70,7 +70,8 @@ outputs: inner: Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -93,7 +94,8 @@ outputs: inner: Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 diff --git a/tests/expectations/parser/parser/expression/access/circuit_static.leo.out b/tests/expectations/parser/parser/expression/access/circuit_static.leo.out index 869d6a393e..9f45fb8237 100644 --- a/tests/expectations/parser/parser/expression/access/circuit_static.leo.out +++ b/tests/expectations/parser/parser/expression/access/circuit_static.leo.out @@ -7,7 +7,8 @@ outputs: inner: Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y\\\"}\"}" name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -20,7 +21,8 @@ outputs: inner: Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X::Y\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -36,7 +38,8 @@ outputs: inner: Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -45,7 +48,8 @@ outputs: path: "" content: "x::y::z" name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -60,7 +64,8 @@ outputs: inner: Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -84,7 +89,8 @@ outputs: inner: Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -109,7 +115,8 @@ outputs: inner: Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y[1u8]\\\"}\"}" name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y[1u8]\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 diff --git a/tests/expectations/parser/parser/expression/literal/access.leo.out b/tests/expectations/parser/parser/expression/literal/access.leo.out index e2dbf60e24..e0bdaac835 100644 --- a/tests/expectations/parser/parser/expression/literal/access.leo.out +++ b/tests/expectations/parser/parser/expression/literal/access.leo.out @@ -51,7 +51,8 @@ outputs: inner: Identifier: "{\"name\":\"address\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"address::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"address::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -116,7 +117,8 @@ outputs: inner: Identifier: "{\"name\":\"bool\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"bool::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"bool::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -182,7 +184,8 @@ outputs: inner: Identifier: "{\"name\":\"char\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"char::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"char::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -247,7 +250,8 @@ outputs: inner: Identifier: "{\"name\":\"field\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"field::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"field::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -365,7 +369,8 @@ outputs: inner: Identifier: "{\"name\":\"group\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"group::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"group::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -563,7 +568,8 @@ outputs: inner: Identifier: "{\"name\":\"i8\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i8::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i8::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -586,7 +592,8 @@ outputs: inner: Identifier: "{\"name\":\"i16\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i16::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i16::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -609,7 +616,8 @@ outputs: inner: Identifier: "{\"name\":\"i32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i32::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i32::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -632,7 +640,8 @@ outputs: inner: Identifier: "{\"name\":\"i64\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i64::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i64::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -655,7 +664,8 @@ outputs: inner: Identifier: "{\"name\":\"i128\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i128::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i128::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -853,7 +863,8 @@ outputs: inner: Identifier: "{\"name\":\"u8\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u8::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u8::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -876,7 +887,8 @@ outputs: inner: Identifier: "{\"name\":\"u16\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u16::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u16::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -899,7 +911,8 @@ outputs: inner: Identifier: "{\"name\":\"u32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u32::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u32::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -922,7 +935,8 @@ outputs: inner: Identifier: "{\"name\":\"u64\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u64::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u64::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 @@ -945,7 +959,8 @@ outputs: inner: Identifier: "{\"name\":\"u128\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u128::call()\\\"}\"}" name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u128::call()\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 diff --git a/tests/expectations/parser/parser/expression/unary/negate.leo.out b/tests/expectations/parser/parser/expression/unary/negate.leo.out index 649b722072..b9b7b13156 100644 --- a/tests/expectations/parser/parser/expression/unary/negate.leo.out +++ b/tests/expectations/parser/parser/expression/unary/negate.leo.out @@ -43,7 +43,8 @@ outputs: inner: Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x::y\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 diff --git a/tests/expectations/parser/parser/expression/unary/not.leo.out b/tests/expectations/parser/parser/expression/unary/not.leo.out index 71716da156..7f781ebe04 100644 --- a/tests/expectations/parser/parser/expression/unary/not.leo.out +++ b/tests/expectations/parser/parser/expression/unary/not.leo.out @@ -43,7 +43,8 @@ outputs: inner: Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x::y\\\"}\"}" - type_: ~ + type_: + Tuple: [] span: line_start: 1 line_stop: 1 diff --git a/tests/expectations/parser/parser/functions/annotated.leo.out b/tests/expectations/parser/parser/functions/annotated.leo.out index d9e264e6cf..1a145b4d3f 100644 --- a/tests/expectations/parser/parser/functions/annotated.leo.out +++ b/tests/expectations/parser/parser/functions/annotated.leo.out @@ -25,7 +25,8 @@ outputs: identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function a() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: @@ -77,7 +78,8 @@ outputs: identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function b() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: @@ -129,7 +131,8 @@ outputs: identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function c() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: @@ -180,7 +183,8 @@ outputs: identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function d() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/functions/annotated_param.leo.out b/tests/expectations/parser/parser/functions/annotated_param.leo.out index 5e5e8b0796..f3c999bdf2 100644 --- a/tests/expectations/parser/parser/functions/annotated_param.leo.out +++ b/tests/expectations/parser/parser/functions/annotated_param.leo.out @@ -26,7 +26,8 @@ outputs: identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/functions/annotated_twice.leo.out b/tests/expectations/parser/parser/functions/annotated_twice.leo.out index 7afe638d67..b8349608f2 100644 --- a/tests/expectations/parser/parser/functions/annotated_twice.leo.out +++ b/tests/expectations/parser/parser/functions/annotated_twice.leo.out @@ -35,7 +35,8 @@ outputs: identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/functions/bounded_recursion.leo.out b/tests/expectations/parser/parser/functions/bounded_recursion.leo.out index f9c4f602f9..25f3a5c370 100644 --- a/tests/expectations/parser/parser/functions/bounded_recursion.leo.out +++ b/tests/expectations/parser/parser/functions/bounded_recursion.leo.out @@ -28,7 +28,8 @@ outputs: path: "" content: "function x(const y: u32) {" const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/functions/const_function.leo.out b/tests/expectations/parser/parser/functions/const_function.leo.out index 142f12dfb9..f75b40f28f 100644 --- a/tests/expectations/parser/parser/functions/const_function.leo.out +++ b/tests/expectations/parser/parser/functions/const_function.leo.out @@ -15,7 +15,8 @@ outputs: identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const function x() {\\\"}\"}" input: [] const_: true - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/functions/const_param.leo.out b/tests/expectations/parser/parser/functions/const_param.leo.out index f1302d128d..7e0806869c 100644 --- a/tests/expectations/parser/parser/functions/const_param.leo.out +++ b/tests/expectations/parser/parser/functions/const_param.leo.out @@ -41,7 +41,8 @@ outputs: path: "" content: "function x(x: u32, const y: i32) {" const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: @@ -108,7 +109,8 @@ outputs: path: "" content: "function x(const x: u32, y: i32) {" const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/functions/const_self_bad.leo.out b/tests/expectations/parser/parser/functions/const_self_bad.leo.out index 3b02d74ff3..5f314cf248 100644 --- a/tests/expectations/parser/parser/functions/const_self_bad.leo.out +++ b/tests/expectations/parser/parser/functions/const_self_bad.leo.out @@ -16,7 +16,8 @@ outputs: input: - ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}" const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/functions/empty.leo.out b/tests/expectations/parser/parser/functions/empty.leo.out index 4bd3bfbc1a..70fd7db2a7 100644 --- a/tests/expectations/parser/parser/functions/empty.leo.out +++ b/tests/expectations/parser/parser/functions/empty.leo.out @@ -15,7 +15,8 @@ outputs: identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/functions/empty2.leo.out b/tests/expectations/parser/parser/functions/empty2.leo.out index 60c3f10b1c..dc427f7383 100644 --- a/tests/expectations/parser/parser/functions/empty2.leo.out +++ b/tests/expectations/parser/parser/functions/empty2.leo.out @@ -15,7 +15,8 @@ outputs: identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: [] diff --git a/tests/expectations/parser/parser/functions/infinite_recursion.leo.out b/tests/expectations/parser/parser/functions/infinite_recursion.leo.out index 93a823f907..3771595d1d 100644 --- a/tests/expectations/parser/parser/functions/infinite_recursion.leo.out +++ b/tests/expectations/parser/parser/functions/infinite_recursion.leo.out @@ -15,7 +15,8 @@ outputs: identifier: "{\"name\":\"inf\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function inf() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/functions/param_array.leo.out b/tests/expectations/parser/parser/functions/param_array.leo.out index b648d79414..f2207b9bae 100644 --- a/tests/expectations/parser/parser/functions/param_array.leo.out +++ b/tests/expectations/parser/parser/functions/param_array.leo.out @@ -30,7 +30,8 @@ outputs: path: "" content: "function x(x: [u8; 12]) {" const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/functions/param_circuit.leo.out b/tests/expectations/parser/parser/functions/param_circuit.leo.out index 2d18f67ce0..0dcb209b34 100644 --- a/tests/expectations/parser/parser/functions/param_circuit.leo.out +++ b/tests/expectations/parser/parser/functions/param_circuit.leo.out @@ -28,7 +28,8 @@ outputs: path: "" content: "function x(x: MyCircuit) {" const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/functions/param_tuple.leo.out b/tests/expectations/parser/parser/functions/param_tuple.leo.out index 17e104a53a..3cf90a9021 100644 --- a/tests/expectations/parser/parser/functions/param_tuple.leo.out +++ b/tests/expectations/parser/parser/functions/param_tuple.leo.out @@ -30,7 +30,8 @@ outputs: path: "" content: "function x(x: (u32, i32)) {" const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/functions/params.leo.out b/tests/expectations/parser/parser/functions/params.leo.out index 26c4fe8b37..28bf3aa1e6 100644 --- a/tests/expectations/parser/parser/functions/params.leo.out +++ b/tests/expectations/parser/parser/functions/params.leo.out @@ -41,7 +41,8 @@ outputs: path: "" content: "function x(x: u32, y: i32) {" const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/serialize/linear_regression.leo.out b/tests/expectations/parser/parser/serialize/linear_regression.leo.out index 58e8a73965..49aa6226dd 100644 --- a/tests/expectations/parser/parser/serialize/linear_regression.leo.out +++ b/tests/expectations/parser/parser/serialize/linear_regression.leo.out @@ -688,7 +688,8 @@ outputs: inner: Identifier: "{\"name\":\"LinearRegression\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":31,\\\"col_stop\\\":47,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let reg: LinearRegression = LinearRegression::new(points);\\\"}\"}" name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":49,\\\"col_stop\\\":52,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let reg: LinearRegression = LinearRegression::new(points);\\\"}\"}" - type_: ~ + type_: + Tuple: [] arguments: - Identifier: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":53,\\\"col_stop\\\":59,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let reg: LinearRegression = LinearRegression::new(points);\\\"}\"}" - Definition: diff --git a/tests/expectations/parser/parser/serialize/palindrome.leo.out b/tests/expectations/parser/parser/serialize/palindrome.leo.out index 25841225d5..c30dfafbf1 100644 --- a/tests/expectations/parser/parser/serialize/palindrome.leo.out +++ b/tests/expectations/parser/parser/serialize/palindrome.leo.out @@ -401,7 +401,8 @@ outputs: identifier: "{\"name\":\"test_is_palindrome\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":10,\\\"col_stop\\\":28,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_is_palindrome() {\\\"}\"}" input: [] const_: false - output: ~ + output: + Tuple: [] core_mapping: ~ block: statements: diff --git a/tests/expectations/parser/parser/serialize/pedersen_hash.leo.out b/tests/expectations/parser/parser/serialize/pedersen_hash.leo.out index b3bbe3797b..dff2be19c1 100644 --- a/tests/expectations/parser/parser/serialize/pedersen_hash.leo.out +++ b/tests/expectations/parser/parser/serialize/pedersen_hash.leo.out @@ -158,7 +158,8 @@ outputs: inner: Identifier: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":36,\\\"col_stop\\\":48,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const pedersen: PerdesenHash = PedersenHash::new(parameters);\\\"}\"}" name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":50,\\\"col_stop\\\":53,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const pedersen: PerdesenHash = PedersenHash::new(parameters);\\\"}\"}" - type_: ~ + type_: + Tuple: [] arguments: - Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":54,\\\"col_stop\\\":64,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const pedersen: PerdesenHash = PedersenHash::new(parameters);\\\"}\"}" - Return: