diff --git a/compiler/ast/src/accesses/mod.rs b/compiler/ast/src/accesses/mod.rs
deleted file mode 100644
index 23b2e3321a..0000000000
--- a/compiler/ast/src/accesses/mod.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (C) 2019-2022 Aleo Systems Inc.
-// This file is part of the Leo library.
-
-// The Leo library is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// The Leo library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with the Leo library. If not, see .
-
-mod tuple_access;
-pub use tuple_access::*;
diff --git a/compiler/ast/src/accesses/tuple_access.rs b/compiler/ast/src/accesses/tuple_access.rs
deleted file mode 100644
index 89e8e1429e..0000000000
--- a/compiler/ast/src/accesses/tuple_access.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (C) 2019-2022 Aleo Systems Inc.
-// This file is part of the Leo library.
-
-// The Leo library is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// The Leo library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with the Leo library. If not, see .
-
-use crate::{Expression, Node, PositiveNumber};
-use leo_span::Span;
-
-use std::fmt;
-
-use serde::{Deserialize, Serialize};
-
-/// An tuple access expression, e.g., `tuple.index`.
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
-pub struct TupleAccess {
- /// An expression evaluating to some tuple type, e.g., `(5, 2)`.
- pub tuple: Box,
- /// The index to access in the tuple expression. E.g., `0` for `(5, 2)` would yield `5`.
- pub index: PositiveNumber,
- /// The span for the entire expression `tuple.index`.
- pub span: Span,
-}
-
-impl fmt::Display for TupleAccess {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "{}.{}", self.tuple, self.index)
- }
-}
-
-impl Node for TupleAccess {
- fn span(&self) -> &Span {
- &self.span
- }
-
- fn set_span(&mut self, span: Span) {
- self.span = span;
- }
-}
diff --git a/compiler/ast/src/common/mod.rs b/compiler/ast/src/common/mod.rs
index e53ff1a1af..ad45846431 100644
--- a/compiler/ast/src/common/mod.rs
+++ b/compiler/ast/src/common/mod.rs
@@ -24,5 +24,3 @@ pub use imported_modules::*;
pub mod positive_number;
pub use positive_number::*;
-
-pub mod vec_tendril_json;
diff --git a/compiler/ast/src/common/vec_tendril_json.rs b/compiler/ast/src/common/vec_tendril_json.rs
deleted file mode 100644
index 79c288428f..0000000000
--- a/compiler/ast/src/common/vec_tendril_json.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (C) 2019-2022 Aleo Systems Inc.
-// This file is part of the Leo library.
-
-// The Leo library is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// The Leo library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with the Leo library. If not, see .
-
-use serde::{Deserialize, Deserializer, Serialize, Serializer};
-use tendril::StrTendril;
-
-#[allow(clippy::ptr_arg)]
-pub fn serialize(tendril: &Vec, serializer: S) -> Result {
- tendril
- .iter()
- .map(|x| x.as_ref())
- .collect::>()
- .serialize(serializer)
-}
-
-pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result, D::Error> {
- Ok(Vec::::deserialize(deserializer)?
- .into_iter()
- .map(|x| x.into())
- .collect())
-}
diff --git a/compiler/ast/src/expression/accesses.rs b/compiler/ast/src/expression/accesses.rs
deleted file mode 100644
index 1cab84d36d..0000000000
--- a/compiler/ast/src/expression/accesses.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (C) 2019-2022 Aleo Systems Inc.
-// This file is part of the Leo library.
-
-// The Leo library is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// The Leo library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with the Leo library. If not, see .
-
-use super::*;
-use crate::accesses::*;
-
-/// An access expressions, extracting a smaller part out of a whole.
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
-pub enum AccessExpression {
- /// Access to a tuple field using its position, e.g., `tuple.1`.
- Tuple(TupleAccess),
-}
-
-impl fmt::Display for AccessExpression {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- use AccessExpression::*;
-
- match self {
- Tuple(access) => access.fmt(f),
- }
- }
-}
-
-impl Node for AccessExpression {
- fn span(&self) -> &Span {
- use AccessExpression::*;
-
- match &self {
- Tuple(access) => access.span(),
- }
- }
-
- fn set_span(&mut self, span: Span) {
- use AccessExpression::*;
-
- match self {
- Tuple(access) => access.set_span(span),
- }
- }
-}
diff --git a/compiler/ast/src/expression/mod.rs b/compiler/ast/src/expression/mod.rs
index 684ec093c7..e4f0e7a117 100644
--- a/compiler/ast/src/expression/mod.rs
+++ b/compiler/ast/src/expression/mod.rs
@@ -21,16 +21,12 @@ use leo_span::Span;
use serde::{Deserialize, Serialize};
use std::fmt;
-mod accesses;
-pub use accesses::*;
mod binary;
pub use binary::*;
mod unary;
pub use unary::*;
mod ternary;
pub use ternary::*;
-mod tuple_init;
-pub use tuple_init::*;
mod value;
pub use value::*;
mod call;
@@ -51,10 +47,6 @@ pub enum Expression {
Unary(UnaryExpression),
/// A ternary conditional expression `cond ? if_expr : else_expr`.
Ternary(TernaryExpression),
- /// An access expression of some sort, e.g., `array[idx]` or `foo.bar`.
- Access(AccessExpression),
- /// A tuple expression e.g., `(foo, 42, true)`.
- TupleInit(TupleInitExpression),
/// A call expression like `my_fun(args)`.
Call(CallExpression),
/// An expression of type "error".
@@ -71,9 +63,7 @@ impl Node for Expression {
Binary(n) => n.span(),
Unary(n) => n.span(),
Ternary(n) => n.span(),
- TupleInit(n) => n.span(),
Call(n) => n.span(),
- Access(n) => n.span(),
Err(n) => n.span(),
}
}
@@ -86,9 +76,7 @@ impl Node for Expression {
Binary(n) => n.set_span(span),
Unary(n) => n.set_span(span),
Ternary(n) => n.set_span(span),
- TupleInit(n) => n.set_span(span),
Call(n) => n.set_span(span),
- Access(n) => n.set_span(span),
Err(n) => n.set_span(span),
}
}
@@ -103,9 +91,7 @@ impl fmt::Display for Expression {
Binary(n) => n.fmt(f),
Unary(n) => n.fmt(f),
Ternary(n) => n.fmt(f),
- TupleInit(n) => n.fmt(f),
Call(n) => n.fmt(f),
- Access(n) => n.fmt(f),
Err(n) => n.fmt(f),
}
}
diff --git a/compiler/ast/src/expression/tuple_init.rs b/compiler/ast/src/expression/tuple_init.rs
deleted file mode 100644
index 7167b63300..0000000000
--- a/compiler/ast/src/expression/tuple_init.rs
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (C) 2019-2022 Aleo Systems Inc.
-// This file is part of the Leo library.
-
-// The Leo library is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// The Leo library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with the Leo library. If not, see .
-
-use super::*;
-
-/// A tuple construction expression, e.g., `(foo, false, 42)`.
-#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
-pub struct TupleInitExpression {
- /// The elements of the tuple.
- /// In the example above, it would be `foo`, `false`, and `42`.
- pub elements: Vec,
- /// The span from `(` to `)`.
- pub span: Span,
-}
-
-impl fmt::Display for TupleInitExpression {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "(")?;
- for (i, member) in self.elements.iter().enumerate() {
- write!(f, "{}", member)?;
- if i < self.elements.len() - 1 {
- write!(f, ", ")?;
- }
- }
- write!(f, ")")
- }
-}
-
-impl Node for TupleInitExpression {
- fn span(&self) -> &Span {
- &self.span
- }
-
- fn set_span(&mut self, span: Span) {
- self.span = span;
- }
-}
diff --git a/compiler/ast/src/input/input_value.rs b/compiler/ast/src/input/input_value.rs
index b041b3d4d1..e31121079d 100644
--- a/compiler/ast/src/input/input_value.rs
+++ b/compiler/ast/src/input/input_value.rs
@@ -28,7 +28,6 @@ pub enum InputValue {
Field(String),
Group(GroupValue),
Integer(IntegerType, String),
- Tuple(Vec),
}
impl TryFrom<(Type, Expression)> for InputValue {
@@ -60,20 +59,6 @@ impl TryFrom<(Type, Expression)> for InputValue {
}
}
}
- (Type::Tuple(types), Expression::TupleInit(tuple_init)) => {
- let size = tuple_init.elements.len();
- let mut elements = Vec::with_capacity(size);
-
- if size != types.len() {
- return Err(InputError::tuple_length_mismatch(size, types.len(), tuple_init.span()).into());
- }
-
- for (i, element) in tuple_init.elements.into_iter().enumerate() {
- elements.push(Self::try_from((types[i].clone(), element))?);
- }
-
- Self::Tuple(elements)
- }
(_type_, expr) => return Err(InputError::illegal_expression(&expr, expr.span()).into()),
})
}
@@ -88,10 +73,6 @@ impl fmt::Display for InputValue {
InputValue::Group(ref group) => write!(f, "{}", group),
InputValue::Field(ref field) => write!(f, "{}", field),
InputValue::Integer(ref type_, ref number) => write!(f, "{}{:?}", number, type_),
- InputValue::Tuple(ref tuple) => {
- let values = tuple.iter().map(|x| x.to_string()).collect::>().join(", ");
- write!(f, "({})", values)
- }
}
}
}
diff --git a/compiler/ast/src/lib.rs b/compiler/ast/src/lib.rs
index be4eb84c78..b988b348cd 100644
--- a/compiler/ast/src/lib.rs
+++ b/compiler/ast/src/lib.rs
@@ -22,9 +22,6 @@
#![doc = include_str!("../README.md")]
-pub mod accesses;
-pub use self::accesses::*;
-
pub mod chars;
pub use self::chars::*;
diff --git a/compiler/ast/src/reducer/reconstructing_director.rs b/compiler/ast/src/reducer/reconstructing_director.rs
index 9f1110f951..06161ac65c 100644
--- a/compiler/ast/src/reducer/reconstructing_director.rs
+++ b/compiler/ast/src/reducer/reconstructing_director.rs
@@ -35,14 +35,6 @@ impl ReconstructingDirector {
pub fn reduce_type(&mut self, type_: &Type, span: &Span) -> Result {
let new = match type_ {
- Type::Tuple(types) => {
- let mut reduced_types = vec![];
- for type_ in types.iter() {
- reduced_types.push(self.reduce_type(type_, span)?);
- }
-
- Type::Tuple(reduced_types)
- }
Type::Identifier(identifier) => Type::Identifier(self.reduce_identifier(identifier)?),
_ => type_.clone(),
};
@@ -58,10 +50,6 @@ impl ReconstructingDirector {
Expression::Binary(binary) => Expression::Binary(self.reduce_binary(binary)?),
Expression::Unary(unary) => Expression::Unary(self.reduce_unary(unary)?),
Expression::Ternary(ternary) => Expression::Ternary(self.reduce_ternary(ternary)?),
- Expression::Access(access) => Expression::Access(self.reduce_access(access)?),
-
- Expression::TupleInit(tuple_init) => Expression::TupleInit(self.reduce_tuple_init(tuple_init)?),
-
Expression::Call(call) => Expression::Call(self.reduce_call(call)?),
Expression::Err(s) => Expression::Err(s.clone()),
};
@@ -123,31 +111,6 @@ impl ReconstructingDirector {
self.reducer.reduce_ternary(ternary, condition, if_true, if_false)
}
- pub fn reduce_tuple_access(&mut self, tuple_access: &TupleAccess) -> Result {
- let tuple = self.reduce_expression(&tuple_access.tuple)?;
-
- self.reducer.reduce_tuple_access(tuple_access, tuple)
- }
-
- pub fn reduce_access(&mut self, access: &AccessExpression) -> Result {
- use AccessExpression::*;
-
- let new = match access {
- Tuple(access) => Tuple(self.reduce_tuple_access(access)?),
- };
-
- Ok(new)
- }
-
- pub fn reduce_tuple_init(&mut self, tuple_init: &TupleInitExpression) -> Result {
- let mut elements = vec![];
- for element in tuple_init.elements.iter() {
- elements.push(self.reduce_expression(element)?);
- }
-
- self.reducer.reduce_tuple_init(tuple_init, elements)
- }
-
pub fn reduce_call(&mut self, call: &CallExpression) -> Result {
let function = self.reduce_expression(&call.function)?;
diff --git a/compiler/ast/src/reducer/reconstructing_reducer.rs b/compiler/ast/src/reducer/reconstructing_reducer.rs
index b52aacec81..9521010288 100644
--- a/compiler/ast/src/reducer/reconstructing_reducer.rs
+++ b/compiler/ast/src/reducer/reconstructing_reducer.rs
@@ -113,25 +113,6 @@ pub trait ReconstructingReducer {
})
}
- fn reduce_tuple_access(&mut self, tuple_access: &TupleAccess, tuple: Expression) -> Result {
- Ok(TupleAccess {
- tuple: Box::new(tuple),
- index: tuple_access.index.clone(),
- span: tuple_access.span.clone(),
- })
- }
-
- fn reduce_tuple_init(
- &mut self,
- tuple_init: &TupleInitExpression,
- elements: Vec,
- ) -> Result {
- Ok(TupleInitExpression {
- elements,
- span: tuple_init.span.clone(),
- })
- }
-
fn reduce_call(
&mut self,
call: &CallExpression,
diff --git a/compiler/ast/src/types/type_.rs b/compiler/ast/src/types/type_.rs
index 07700ec31e..0c19983eee 100644
--- a/compiler/ast/src/types/type_.rs
+++ b/compiler/ast/src/types/type_.rs
@@ -36,9 +36,6 @@ pub enum Type {
/// An integer type.
IntegerType(IntegerType),
- /// A tuple type `(T_0, T_1, ...)` made up of a list of types.
- Tuple(Vec),
-
/// A reference to either a nominal type (e.g., a `circuit`) or a type alias.
Identifier(Identifier),
@@ -69,10 +66,7 @@ impl Type {
(Type::Group, Type::Group) => true,
(Type::IntegerType(left), Type::IntegerType(right)) => left.eq(right),
(Type::Identifier(left), Type::Identifier(right)) => left.eq(right),
- (Type::Tuple(left), Type::Tuple(right)) => left
- .iter()
- .zip(right)
- .all(|(left_type, right_type)| left_type.eq_flat(right_type)),
+
_ => false,
}
}
@@ -88,11 +82,6 @@ impl fmt::Display for Type {
Type::Group => write!(f, "group"),
Type::IntegerType(ref integer_type) => write!(f, "{}", integer_type),
Type::Identifier(ref variable) => write!(f, "circuit {}", variable),
- Type::Tuple(ref tuple) => {
- let types = tuple.iter().map(|x| x.to_string()).collect::>().join(", ");
-
- write!(f, "({})", types)
- }
Type::Err => write!(f, "error"),
}
}
diff --git a/compiler/parser/src/parser/expression.rs b/compiler/parser/src/parser/expression.rs
index 7632f162b6..2e9409e10a 100644
--- a/compiler/parser/src/parser/expression.rs
+++ b/compiler/parser/src/parser/expression.rs
@@ -252,16 +252,8 @@ impl ParserContext<'_> {
while let Some(token) = self.eat_any(&[Token::Dot, Token::LeftParen]) {
match token.token {
Token::Dot => {
- if let Some((num, span)) = self.eat_int() {
- expr = Expression::Access(AccessExpression::Tuple(TupleAccess {
- span: expr.span() + &span,
- tuple: Box::new(expr),
- index: num,
- }));
- } else {
- let next = self.peek()?;
- return Err(ParserError::unexpected_str(&next.token, "int or ident", &next.span).into());
- }
+ let next = self.peek()?;
+ return Err(ParserError::unexpected_str(&next.token, "int or ident", &next.span).into());
}
Token::LeftParen => {
let mut arguments = Vec::new();
@@ -321,10 +313,7 @@ impl ParserContext<'_> {
if args.len() == 1 {
Ok(args.remove(0))
} else {
- Ok(Expression::TupleInit(TupleInitExpression {
- span: span + &end_span,
- elements: args,
- }))
+ Err(ParserError::unexpected("A tuple expression.", "A valid expression.", &(span + &end_span)).into())
}
}
diff --git a/compiler/parser/src/parser/statement.rs b/compiler/parser/src/parser/statement.rs
index a0ada17f6c..ce2fdaa0a6 100644
--- a/compiler/parser/src/parser/statement.rs
+++ b/compiler/parser/src/parser/statement.rs
@@ -33,20 +33,11 @@ impl ParserContext<'_> {
/// Returns an [`Identifier`] AST node if the given [`Expression`] AST node evaluates to an
/// identifier access. The access is stored in the given accesses.
///
- pub fn construct_assignee_access(expr: Expression, accesses: &mut Vec) -> Result {
- let identifier;
+ pub fn construct_assignee_access(expr: Expression, _accesses: &mut Vec) -> Result {
match expr {
- Expression::Access(access) => match access {
- AccessExpression::Tuple(expr) => {
- identifier = Self::construct_assignee_access(*expr.tuple, accesses)?;
- accesses.push(AssigneeAccess::Tuple(expr.index, expr.span));
- }
- },
-
- Expression::Identifier(id) => identifier = id,
+ Expression::Identifier(id) => Ok(id),
_ => return Err(ParserError::invalid_assignment_target(expr.span()).into()),
}
- Ok(identifier)
}
///
diff --git a/compiler/parser/src/parser/type_.rs b/compiler/parser/src/parser/type_.rs
index e1376b2b64..4b8caefb07 100644
--- a/compiler/parser/src/parser/type_.rs
+++ b/compiler/parser/src/parser/type_.rs
@@ -61,9 +61,6 @@ impl ParserContext<'_> {
Ok(if let Some(ident) = self.eat_identifier() {
let span = ident.span.clone();
(Type::Identifier(ident), span)
- } else if self.peek_is_left_par() {
- let (types, _, span) = self.parse_paren_comma_list(|p| p.parse_type().map(|t| Some(t.0)))?;
- (Type::Tuple(types), span)
} else {
let token = self.expect_oneof(TYPE_TOKENS)?;
(
diff --git a/tests/expectations/parser/parser/expression/access/call.leo.out b/tests/expectations/parser/parser/expression/access/call.leo.out
index 2472f55b58..51bf44b889 100644
--- a/tests/expectations/parser/parser/expression/access/call.leo.out
+++ b/tests/expectations/parser/parser/expression/access/call.leo.out
@@ -63,27 +63,3 @@ outputs:
col_stop: 11
path: ""
content: "x(x, y, z)"
- - Call:
- function:
- Access:
- Tuple:
- tuple:
- Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}"
- index:
- value: "0"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 4
- path: ""
- content: x.0(x)
- arguments:
- - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 7
- path: ""
- content: x.0(x)
diff --git a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out
index 4114e3fa46..929acf4609 100644
--- a/tests/expectations/parser/parser/expression/literal/group_fail.leo.out
+++ b/tests/expectations/parser/parser/expression/literal/group_fail.leo.out
@@ -2,15 +2,15 @@
namespace: ParseExpression
expectation: Fail
outputs:
- - "did not consume all input: 'group' @ 1:3-8\n"
+ - "Error [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:1\n |\n 1 | ()group\n | ^^"
- "did not consume all input: 'group' @ 1:6-11\n"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,)group\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '+'\n --> test:1:2\n |\n 1 | (+, -,)group\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,+, -)group\n | ^"
- - "did not consume all input: 'group' @ 1:6-11\n"
- - "did not consume all input: 'group' @ 1:12-17\n"
- - "did not consume all input: 'group' @ 1:15-20\n"
+ - "Error [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:1\n |\n 1 | (x,y)group\n | ^^^^^"
+ - "Error [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:1\n |\n 1 | (123,456u8)group\n | ^^^^^^^^^^^"
+ - "Error [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:1\n |\n 1 | (123,456field)group\n | ^^^^^^^^^^^^^^"
- "Error [EPAR0370004]: Unexpected white space between terms (123,456) and group\n --> test:1:10\n |\n 1 | (123, 456) group\n | ^"
- "did not consume all input: 'group' @ 1:8-13\n"
- - "did not consume all input: 'group' @ 1:16-21\n"
- - "did not consume all input: 'bool' @ 1:11-15\n"
+ - "Error [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:1\n |\n 1 | (123, 456, 789)group\n | ^^^^^^^^^^^^^^^"
+ - "Error [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:1\n |\n 1 | (123, 456)bool\n | ^^^^^^^^^^"
diff --git a/tests/expectations/parser/parser/functions/const_function.leo.out b/tests/expectations/parser/parser/functions/const_function.leo.out
index 279b8694e6..b860726f28 100644
--- a/tests/expectations/parser/parser/functions/const_function.leo.out
+++ b/tests/expectations/parser/parser/functions/const_function.leo.out
@@ -15,22 +15,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 4
- line_stop: 4
- col_start: 12
- col_stop: 14
- path: ""
- content: " return ();"
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 4
+ line_stop: 4
+ col_start: 12
+ col_stop: 13
+ path: ""
+ content: " return 0;"
span:
line_start: 4
line_stop: 4
col_start: 5
- col_stop: 14
+ col_stop: 13
path: ""
- content: " return ();"
+ content: " return 0;"
span:
line_start: 3
line_stop: 5
diff --git a/tests/expectations/parser/parser/functions/const_param.leo.out b/tests/expectations/parser/parser/functions/const_param.leo.out
index 7e1e9b437a..1abefd7344 100644
--- a/tests/expectations/parser/parser/functions/const_param.leo.out
+++ b/tests/expectations/parser/parser/functions/const_param.leo.out
@@ -41,22 +41,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 4
- line_stop: 4
- col_start: 12
- col_stop: 14
- path: ""
- content: " return ();"
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 4
+ line_stop: 4
+ col_start: 12
+ col_stop: 13
+ path: ""
+ content: " return 0;"
span:
line_start: 4
line_stop: 4
col_start: 5
- col_stop: 14
+ col_stop: 13
path: ""
- content: " return ();"
+ content: " return 0;"
span:
line_start: 3
line_stop: 5
@@ -107,22 +108,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 8
- line_stop: 8
- col_start: 12
- col_stop: 14
- path: ""
- content: " return ();"
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 8
+ line_stop: 8
+ col_start: 12
+ col_stop: 13
+ path: ""
+ content: " return 0;"
span:
line_start: 8
line_stop: 8
col_start: 5
- col_stop: 14
+ col_stop: 13
path: ""
- content: " return ();"
+ content: " return 0;"
span:
line_start: 7
line_stop: 9
diff --git a/tests/expectations/parser/parser/functions/params.leo.out b/tests/expectations/parser/parser/functions/params.leo.out
index 908451d00c..555c27d59b 100644
--- a/tests/expectations/parser/parser/functions/params.leo.out
+++ b/tests/expectations/parser/parser/functions/params.leo.out
@@ -41,22 +41,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 4
- line_stop: 4
- col_start: 12
- col_stop: 14
- path: ""
- content: " return ();"
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 4
+ line_stop: 4
+ col_start: 12
+ col_stop: 13
+ path: ""
+ content: " return 0;"
span:
line_start: 4
line_stop: 4
col_start: 5
- col_stop: 14
+ col_stop: 13
path: ""
- content: " return ();"
+ content: " return 0;"
span:
line_start: 3
line_stop: 5
diff --git a/tests/expectations/parser/parser/functions/params_return.leo.out b/tests/expectations/parser/parser/functions/params_return.leo.out
index afda5e6cfc..6be865eaa0 100644
--- a/tests/expectations/parser/parser/functions/params_return.leo.out
+++ b/tests/expectations/parser/parser/functions/params_return.leo.out
@@ -42,22 +42,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 4
- line_stop: 4
- col_start: 12
- col_stop: 14
- path: ""
- content: " return ();"
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 4
+ line_stop: 4
+ col_start: 12
+ col_stop: 13
+ path: ""
+ content: " return 0;"
span:
line_start: 4
line_stop: 4
col_start: 5
- col_stop: 14
+ col_stop: 13
path: ""
- content: " return ();"
+ content: " return 0;"
span:
line_start: 3
line_stop: 5
diff --git a/tests/expectations/parser/parser/functions/return.leo.out b/tests/expectations/parser/parser/functions/return.leo.out
index de005bdb0e..c3e05b9ae2 100644
--- a/tests/expectations/parser/parser/functions/return.leo.out
+++ b/tests/expectations/parser/parser/functions/return.leo.out
@@ -16,22 +16,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 4
- line_stop: 4
- col_start: 12
- col_stop: 14
- path: ""
- content: " return ();"
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 4
+ line_stop: 4
+ col_start: 12
+ col_stop: 13
+ path: ""
+ content: " return 0;"
span:
line_start: 4
line_stop: 4
col_start: 5
- col_stop: 14
+ col_stop: 13
path: ""
- content: " return ();"
+ content: " return 0;"
span:
line_start: 3
line_stop: 5
diff --git a/tests/expectations/parser/parser/inputs/input_success.leo.out b/tests/expectations/parser/parser/inputs/input_success.leo.out
index e5b57a942f..e8089469d1 100644
--- a/tests/expectations/parser/parser/inputs/input_success.leo.out
+++ b/tests/expectations/parser/parser/inputs/input_success.leo.out
@@ -126,48 +126,6 @@ outputs:
col_stop: 11
path: ""
content: "e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
- - type_:
- Tuple:
- - Boolean
- - Boolean
- name: "{\"name\":\"h\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"h: (bool, bool) = (true, false); \\\"}\"}"
- value:
- TupleInit:
- elements:
- - Value:
- Boolean:
- - "true"
- - span:
- line_start: 9
- line_stop: 9
- col_start: 20
- col_stop: 24
- path: ""
- content: "h: (bool, bool) = (true, false); "
- - Value:
- Boolean:
- - "false"
- - span:
- line_start: 9
- line_stop: 9
- col_start: 26
- col_stop: 31
- path: ""
- content: "h: (bool, bool) = (true, false); "
- span:
- line_start: 9
- line_stop: 9
- col_start: 19
- col_stop: 32
- path: ""
- content: "h: (bool, bool) = (true, false); "
- span:
- line_start: 9
- line_stop: 9
- col_start: 4
- col_stop: 16
- path: ""
- content: "h: (bool, bool) = (true, false); "
span:
line_start: 3
line_stop: 3
@@ -178,68 +136,68 @@ outputs:
- name: registers
definitions:
- type_: Boolean
- name: "{\"name\":\"r0\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r0: bool = true; \\\"}\"}"
+ name: "{\"name\":\"r0\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r0: bool = true; \\\"}\"}"
value:
Value:
Boolean:
- "true"
- span:
- line_start: 12
- line_stop: 12
+ line_start: 11
+ line_stop: 11
col_start: 13
col_stop: 17
path: ""
content: "r0: bool = true; "
span:
- line_start: 12
- line_stop: 12
+ line_start: 11
+ line_stop: 11
col_start: 5
col_stop: 9
path: ""
content: "r0: bool = true; "
- type_:
IntegerType: U8
- name: "{\"name\":\"r1\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r1: u8 = 2; \\\"}\"}"
+ name: "{\"name\":\"r1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r1: u8 = 2; \\\"}\"}"
value:
Value:
Implicit:
- "2"
+ - span:
+ line_start: 12
+ line_stop: 12
+ col_start: 13
+ col_stop: 14
+ path: ""
+ content: "r1: u8 = 2; "
+ span:
+ line_start: 12
+ line_stop: 12
+ col_start: 5
+ col_stop: 7
+ path: ""
+ content: "r1: u8 = 2; "
+ - type_: Field
+ name: "{\"name\":\"r2\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r2: field = 0; \\\"}\"}"
+ value:
+ Value:
+ Implicit:
+ - "0"
- span:
line_start: 13
line_stop: 13
col_start: 13
col_stop: 14
path: ""
- content: "r1: u8 = 2; "
+ content: "r2: field = 0; "
span:
line_start: 13
line_stop: 13
col_start: 5
- col_stop: 7
- path: ""
- content: "r1: u8 = 2; "
- - type_: Field
- name: "{\"name\":\"r2\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r2: field = 0; \\\"}\"}"
- value:
- Value:
- Implicit:
- - "0"
- - span:
- line_start: 14
- line_stop: 14
- col_start: 13
- col_stop: 14
- path: ""
- content: "r2: field = 0; "
- span:
- line_start: 14
- line_stop: 14
- col_start: 5
col_stop: 10
path: ""
content: "r2: field = 0; "
- type_: Group
- name: "{\"name\":\"r3\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r3: group = (0, 1)group; \\\"}\"}"
+ name: "{\"name\":\"r3\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r3: group = (0, 1)group; \\\"}\"}"
value:
Value:
Group:
@@ -248,8 +206,8 @@ outputs:
Number:
- "0"
- span:
- line_start: 15
- line_stop: 15
+ line_start: 14
+ line_stop: 14
col_start: 14
col_stop: 15
path: ""
@@ -258,91 +216,49 @@ outputs:
Number:
- "1"
- span:
- line_start: 15
- line_stop: 15
+ line_start: 14
+ line_stop: 14
col_start: 17
col_stop: 18
path: ""
content: "r3: group = (0, 1)group; "
span:
- line_start: 15
- line_stop: 15
+ line_start: 14
+ line_stop: 14
col_start: 14
col_stop: 24
path: ""
content: "r3: group = (0, 1)group; "
span:
- line_start: 15
- line_stop: 15
+ line_start: 14
+ line_stop: 14
col_start: 5
col_stop: 10
path: ""
content: "r3: group = (0, 1)group; "
- type_: Address
- name: "{\"name\":\"r4\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
+ name: "{\"name\":\"r4\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
value:
Value:
Address:
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
- span:
- line_start: 16
- line_stop: 16
+ line_start: 15
+ line_stop: 15
col_start: 15
col_stop: 78
path: ""
content: "r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
span:
- line_start: 16
- line_stop: 16
+ line_start: 15
+ line_stop: 15
col_start: 5
col_stop: 12
path: ""
content: "r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
- - type_:
- Tuple:
- - Boolean
- - Boolean
- name: "{\"name\":\"r7\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r7: (bool, bool) = (true, false); \\\"}\"}"
- value:
- TupleInit:
- elements:
- - Value:
- Boolean:
- - "true"
- - span:
- line_start: 17
- line_stop: 17
- col_start: 21
- col_stop: 25
- path: ""
- content: "r7: (bool, bool) = (true, false); "
- - Value:
- Boolean:
- - "false"
- - span:
- line_start: 17
- line_stop: 17
- col_start: 27
- col_stop: 32
- path: ""
- content: "r7: (bool, bool) = (true, false); "
- span:
- line_start: 17
- line_stop: 17
- col_start: 20
- col_stop: 33
- path: ""
- content: "r7: (bool, bool) = (true, false); "
- span:
- line_start: 17
- line_stop: 17
- col_start: 5
- col_stop: 17
- path: ""
- content: "r7: (bool, bool) = (true, false); "
span:
- line_start: 11
- line_stop: 11
+ line_start: 10
+ line_stop: 10
col_start: 2
col_stop: 11
path: ""
@@ -350,68 +266,68 @@ outputs:
- name: constants
definitions:
- type_: Boolean
- name: "{\"name\":\"c0\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c0: bool = true; \\\"}\"}"
+ name: "{\"name\":\"c0\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c0: bool = true; \\\"}\"}"
value:
Value:
Boolean:
- "true"
- span:
- line_start: 20
- line_stop: 20
+ line_start: 18
+ line_stop: 18
col_start: 13
col_stop: 17
path: ""
content: "c0: bool = true; "
span:
- line_start: 20
- line_stop: 20
+ line_start: 18
+ line_stop: 18
col_start: 5
col_stop: 9
path: ""
content: "c0: bool = true; "
- type_:
IntegerType: U8
- name: "{\"name\":\"c1\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c1: u8 = 2; \\\"}\"}"
+ name: "{\"name\":\"c1\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c1: u8 = 2; \\\"}\"}"
value:
Value:
Implicit:
- "2"
- span:
- line_start: 21
- line_stop: 21
+ line_start: 19
+ line_stop: 19
col_start: 13
col_stop: 14
path: ""
content: "c1: u8 = 2; "
span:
- line_start: 21
- line_stop: 21
+ line_start: 19
+ line_stop: 19
col_start: 5
col_stop: 7
path: ""
content: "c1: u8 = 2; "
- type_: Field
- name: "{\"name\":\"c2\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c2: field = 0; \\\"}\"}"
+ name: "{\"name\":\"c2\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c2: field = 0; \\\"}\"}"
value:
Value:
Implicit:
- "0"
- span:
- line_start: 22
- line_stop: 22
+ line_start: 20
+ line_stop: 20
col_start: 13
col_stop: 14
path: ""
content: "c2: field = 0; "
span:
- line_start: 22
- line_stop: 22
+ line_start: 20
+ line_stop: 20
col_start: 5
col_stop: 10
path: ""
content: "c2: field = 0; "
- type_: Group
- name: "{\"name\":\"c3\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c3: group = (0, 1)group; \\\"}\"}"
+ name: "{\"name\":\"c3\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c3: group = (0, 1)group; \\\"}\"}"
value:
Value:
Group:
@@ -420,8 +336,8 @@ outputs:
Number:
- "0"
- span:
- line_start: 23
- line_stop: 23
+ line_start: 21
+ line_stop: 21
col_start: 14
col_stop: 15
path: ""
@@ -430,91 +346,49 @@ outputs:
Number:
- "1"
- span:
- line_start: 23
- line_stop: 23
+ line_start: 21
+ line_stop: 21
col_start: 17
col_stop: 18
path: ""
content: "c3: group = (0, 1)group; "
span:
- line_start: 23
- line_stop: 23
+ line_start: 21
+ line_stop: 21
col_start: 14
col_stop: 24
path: ""
content: "c3: group = (0, 1)group; "
span:
- line_start: 23
- line_stop: 23
+ line_start: 21
+ line_stop: 21
col_start: 5
col_stop: 10
path: ""
content: "c3: group = (0, 1)group; "
- type_: Address
- name: "{\"name\":\"c4\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
+ name: "{\"name\":\"c4\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
value:
Value:
Address:
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
- span:
- line_start: 24
- line_stop: 24
+ line_start: 22
+ line_stop: 22
col_start: 15
col_stop: 78
path: ""
content: "c4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
span:
- line_start: 24
- line_stop: 24
+ line_start: 22
+ line_stop: 22
col_start: 5
col_stop: 12
path: ""
content: "c4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
- - type_:
- Tuple:
- - Boolean
- - Boolean
- name: "{\"name\":\"c7\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c7: (bool, bool) = (true, false); \\\"}\"}"
- value:
- TupleInit:
- elements:
- - Value:
- Boolean:
- - "true"
- - span:
- line_start: 25
- line_stop: 25
- col_start: 21
- col_stop: 25
- path: ""
- content: "c7: (bool, bool) = (true, false); "
- - Value:
- Boolean:
- - "false"
- - span:
- line_start: 25
- line_stop: 25
- col_start: 27
- col_stop: 32
- path: ""
- content: "c7: (bool, bool) = (true, false); "
- span:
- line_start: 25
- line_stop: 25
- col_start: 20
- col_stop: 33
- path: ""
- content: "c7: (bool, bool) = (true, false); "
- span:
- line_start: 25
- line_stop: 25
- col_start: 5
- col_stop: 17
- path: ""
- content: "c7: (bool, bool) = (true, false); "
span:
- line_start: 19
- line_stop: 19
+ line_start: 17
+ line_stop: 17
col_start: 2
col_stop: 11
path: ""
diff --git a/tests/expectations/parser/parser/statement/assign.leo.out b/tests/expectations/parser/parser/statement/assign.leo.out
index b9760d5364..ac520eb734 100644
--- a/tests/expectations/parser/parser/statement/assign.leo.out
+++ b/tests/expectations/parser/parser/statement/assign.leo.out
@@ -23,35 +23,6 @@ outputs:
col_stop: 9
path: ""
content: x = expr;
- - Assign:
- operation: Assign
- assignee:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = ();\\\"}\"}"
- accesses: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 2
- path: ""
- content: x = ();
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 5
- col_stop: 7
- path: ""
- content: x = ();
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 7
- path: ""
- content: x = ();
- Assign:
operation: Assign
assignee:
@@ -85,37 +56,6 @@ outputs:
col_stop: 8
path: ""
content: x = x+y;
- - Assign:
- operation: Assign
- assignee:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}"
- accesses: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 2
- path: ""
- content: "x = (x,y);"
- value:
- TupleInit:
- elements:
- - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}"
- - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 5
- col_stop: 10
- path: ""
- content: "x = (x,y);"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 10
- path: ""
- content: "x = (x,y);"
- Assign:
operation: Assign
assignee:
@@ -168,35 +108,6 @@ outputs:
col_stop: 10
path: ""
content: x += expr;
- - Assign:
- operation: Add
- assignee:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x += ();\\\"}\"}"
- accesses: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 2
- path: ""
- content: x += ();
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 6
- col_stop: 8
- path: ""
- content: x += ();
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 8
- path: ""
- content: x += ();
- Assign:
operation: Add
assignee:
@@ -282,35 +193,6 @@ outputs:
col_stop: 10
path: ""
content: x -= expr;
- - Assign:
- operation: Sub
- assignee:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x -= ();\\\"}\"}"
- accesses: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 2
- path: ""
- content: x -= ();
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 6
- col_stop: 8
- path: ""
- content: x -= ();
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 8
- path: ""
- content: x -= ();
- Assign:
operation: Sub
assignee:
@@ -396,35 +278,6 @@ outputs:
col_stop: 10
path: ""
content: x *= expr;
- - Assign:
- operation: Mul
- assignee:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x *= ();\\\"}\"}"
- accesses: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 2
- path: ""
- content: x *= ();
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 6
- col_stop: 8
- path: ""
- content: x *= ();
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 8
- path: ""
- content: x *= ();
- Assign:
operation: Mul
assignee:
@@ -489,36 +342,6 @@ outputs:
col_stop: 9
path: ""
content: x *= x();
- - Assign:
- operation: Mul
- assignee:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0 *= y;\\\"}\"}"
- accesses:
- - Tuple:
- - value: "0"
- - span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 4
- path: ""
- content: x.0 *= y;
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 4
- path: ""
- content: x.0 *= y;
- value:
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0 *= y;\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 9
- path: ""
- content: x.0 *= y;
- Assign:
operation: Div
assignee:
@@ -540,35 +363,6 @@ outputs:
col_stop: 10
path: ""
content: x /= expr;
- - Assign:
- operation: Div
- assignee:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x /= ();\\\"}\"}"
- accesses: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 2
- path: ""
- content: x /= ();
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 6
- col_stop: 8
- path: ""
- content: x /= ();
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 8
- path: ""
- content: x /= ();
- Assign:
operation: Div
assignee:
@@ -633,36 +427,6 @@ outputs:
col_stop: 9
path: ""
content: x /= x();
- - Assign:
- operation: Div
- assignee:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0 /= y;\\\"}\"}"
- accesses:
- - Tuple:
- - value: "0"
- - span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 4
- path: ""
- content: x.0 /= y;
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 4
- path: ""
- content: x.0 /= y;
- value:
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0 /= y;\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 9
- path: ""
- content: x.0 /= y;
- Assign:
operation: Pow
assignee:
@@ -684,35 +448,6 @@ outputs:
col_stop: 11
path: ""
content: x **= expr;
- - Assign:
- operation: Pow
- assignee:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x **= ();\\\"}\"}"
- accesses: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 2
- path: ""
- content: x **= ();
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 7
- col_stop: 9
- path: ""
- content: x **= ();
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 9
- path: ""
- content: x **= ();
- Assign:
operation: Pow
assignee:
@@ -746,64 +481,3 @@ outputs:
col_stop: 10
path: ""
content: x **= x+y;
- - Assign:
- operation: Pow
- assignee:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x **= x();\\\"}\"}"
- accesses: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 2
- path: ""
- content: x **= x();
- value:
- Call:
- function:
- Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x **= x();\\\"}\"}"
- arguments: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 7
- col_stop: 10
- path: ""
- content: x **= x();
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 10
- path: ""
- content: x **= x();
- - Assign:
- operation: Pow
- assignee:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0 **= y;\\\"}\"}"
- accesses:
- - Tuple:
- - value: "0"
- - span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 4
- path: ""
- content: x.0 **= y;
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 4
- path: ""
- content: x.0 **= y;
- value:
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0 **= y;\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 10
- path: ""
- content: x.0 **= y;
diff --git a/tests/expectations/parser/parser/statement/assign_fail.leo.out b/tests/expectations/parser/parser/statement/assign_fail.leo.out
index 4440cb96d8..a4ac3d898c 100644
--- a/tests/expectations/parser/parser/statement/assign_fail.leo.out
+++ b/tests/expectations/parser/parser/statement/assign_fail.leo.out
@@ -11,7 +11,7 @@ outputs:
- "Error [EPAR0370005]: expected ; -- got 'as'\n --> test:1:3\n |\n 1 | x as u32 = y;\n | ^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '['\n --> test:1:1\n |\n 1 | [x, x, x] = y;\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '['\n --> test:1:1\n |\n 1 | [x; 3] = y;\n | ^"
- - "Error [EPAR0370011]: invalid assignment target\n --> test:1:1\n |\n 1 | (x, x, x) = y;\n | ^^^^^^^^^"
+ - "Error [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:1\n |\n 1 | (x, x, x) = y;\n | ^^^^^^^^^"
- "Error [EPAR0370005]: expected ; -- got '{'\n --> test:1:3\n |\n 1 | x {x: y, y: z} = y;\n | ^"
- "Error [EPAR0370011]: invalid assignment target\n --> test:1:1\n |\n 1 | x() = y;\n | ^^^"
- "Error [EPAR0370009]: unexpected string: expected 'int or ident', got 'y'\n --> test:1:3\n |\n 1 | x.y() = y;\n | ^"
diff --git a/tests/expectations/parser/parser/statement/block.leo.out b/tests/expectations/parser/parser/statement/block.leo.out
index 4ad226b576..8b88799c01 100644
--- a/tests/expectations/parser/parser/statement/block.leo.out
+++ b/tests/expectations/parser/parser/statement/block.leo.out
@@ -15,22 +15,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 2
- line_stop: 2
- col_start: 8
- col_stop: 10
- path: ""
- content: return ();
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 2
+ line_stop: 2
+ col_start: 8
+ col_stop: 9
+ path: ""
+ content: return 0;
span:
line_start: 2
line_stop: 2
col_start: 1
- col_stop: 10
+ col_stop: 9
path: ""
- content: return ();
+ content: return 0;
span:
line_start: 1
line_stop: 3
@@ -62,22 +63,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 3
- line_stop: 3
- col_start: 8
- col_stop: 10
- path: ""
- content: return ();
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 3
+ line_stop: 3
+ col_start: 8
+ col_stop: 9
+ path: ""
+ content: return 0;
span:
line_start: 3
line_stop: 3
col_start: 1
- col_stop: 10
+ col_stop: 9
path: ""
- content: return ();
+ content: return 0;
span:
line_start: 2
line_stop: 4
@@ -101,22 +103,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 3
- line_stop: 3
- col_start: 8
- col_stop: 10
- path: ""
- content: return ();
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 3
+ line_stop: 3
+ col_start: 8
+ col_stop: 9
+ path: ""
+ content: return 0;
span:
line_start: 3
line_stop: 3
col_start: 1
- col_stop: 10
+ col_stop: 9
path: ""
- content: return ();
+ content: return 0;
span:
line_start: 2
line_stop: 4
diff --git a/tests/expectations/parser/parser/statement/conditional.leo.out b/tests/expectations/parser/parser/statement/conditional.leo.out
index 3fd8752374..48d793e620 100644
--- a/tests/expectations/parser/parser/statement/conditional.leo.out
+++ b/tests/expectations/parser/parser/statement/conditional.leo.out
@@ -9,22 +9,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 2
- line_stop: 2
- col_start: 8
- col_stop: 10
- path: ""
- content: return ();
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 2
+ line_stop: 2
+ col_start: 8
+ col_stop: 9
+ path: ""
+ content: return 0;
span:
line_start: 2
line_stop: 2
col_start: 1
- col_stop: 10
+ col_stop: 9
path: ""
- content: return ();
+ content: return 0;
span:
line_start: 1
line_stop: 3
@@ -40,44 +41,6 @@ outputs:
col_stop: 2
path: ""
content: "if x {\n ...\n}"
- - Conditional:
- condition:
- Identifier: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if Self {\\\"}\"}"
- block:
- statements:
- - Return:
- expression:
- TupleInit:
- elements: []
- span:
- line_start: 2
- line_stop: 2
- col_start: 8
- col_stop: 10
- path: ""
- content: return ();
- span:
- line_start: 2
- line_stop: 2
- col_start: 1
- col_stop: 10
- path: ""
- content: return ();
- span:
- line_start: 1
- line_stop: 3
- col_start: 9
- col_stop: 2
- path: ""
- content: "if Self {\n ...\n}"
- next: ~
- span:
- line_start: 1
- line_stop: 3
- col_start: 1
- col_stop: 2
- path: ""
- content: "if Self {\n ...\n}"
- Conditional:
condition:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"if (x) {\\\"}\"}"
@@ -85,22 +48,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 2
- line_stop: 2
- col_start: 8
- col_stop: 10
- path: ""
- content: return ();
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 2
+ line_stop: 2
+ col_start: 8
+ col_stop: 9
+ path: ""
+ content: return 0;
span:
line_start: 2
line_stop: 2
col_start: 1
- col_stop: 10
+ col_stop: 9
path: ""
- content: return ();
+ content: return 0;
span:
line_start: 1
line_stop: 3
@@ -247,22 +211,23 @@ outputs:
content: expr;
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 3
- line_stop: 3
- col_start: 8
- col_stop: 10
- path: ""
- content: return ();
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 3
+ line_stop: 3
+ col_start: 8
+ col_stop: 9
+ path: ""
+ content: return 0;
span:
line_start: 3
line_stop: 3
col_start: 1
- col_stop: 10
+ col_stop: 9
path: ""
- content: return ();
+ content: return 0;
span:
line_start: 1
line_stop: 4
diff --git a/tests/expectations/parser/parser/statement/definition.leo.out b/tests/expectations/parser/parser/statement/definition.leo.out
index e55ecc0284..56f9c11987 100644
--- a/tests/expectations/parser/parser/statement/definition.leo.out
+++ b/tests/expectations/parser/parser/statement/definition.leo.out
@@ -24,36 +24,6 @@ outputs:
col_stop: 13
path: ""
content: let x = expr;
- - Definition:
- declaration_type: Let
- variable_names:
- - mutable: true
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 5
- col_stop: 6
- path: ""
- content: let x = ();
- type_: ~
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 9
- col_stop: 11
- path: ""
- content: let x = ();
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 11
- path: ""
- content: let x = ();
- Definition:
declaration_type: Let
variable_names:
@@ -88,38 +58,6 @@ outputs:
col_stop: 12
path: ""
content: let x = x+y;
- - Definition:
- declaration_type: Let
- variable_names:
- - mutable: true
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 5
- col_stop: 6
- path: ""
- content: "let x = (x,y);"
- type_: ~
- value:
- TupleInit:
- elements:
- - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}"
- - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 9
- col_stop: 14
- path: ""
- content: "let x = (x,y);"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 14
- path: ""
- content: "let x = (x,y);"
- Definition:
declaration_type: Let
variable_names:
@@ -174,36 +112,6 @@ outputs:
col_stop: 15
path: ""
content: const x = expr;
- - Definition:
- declaration_type: Const
- variable_names:
- - mutable: false
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 7
- col_stop: 8
- path: ""
- content: const x = ();
- type_: ~
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 11
- col_stop: 13
- path: ""
- content: const x = ();
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 13
- path: ""
- content: const x = ();
- Definition:
declaration_type: Const
variable_names:
@@ -238,38 +146,6 @@ outputs:
col_stop: 14
path: ""
content: const x = x+y;
- - Definition:
- declaration_type: Const
- variable_names:
- - mutable: false
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 7
- col_stop: 8
- path: ""
- content: "const x = (x,y);"
- type_: ~
- value:
- TupleInit:
- elements:
- - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}"
- - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 11
- col_stop: 16
- path: ""
- content: "const x = (x,y);"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 16
- path: ""
- content: "const x = (x,y);"
- Definition:
declaration_type: Const
variable_names:
@@ -325,37 +201,6 @@ outputs:
col_stop: 18
path: ""
content: "let x: u32 = expr;"
- - Definition:
- declaration_type: Let
- variable_names:
- - mutable: true
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 5
- col_stop: 6
- path: ""
- content: "let x: u32 = ();"
- type_:
- IntegerType: U32
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 14
- col_stop: 16
- path: ""
- content: "let x: u32 = ();"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 16
- path: ""
- content: "let x: u32 = ();"
- Definition:
declaration_type: Let
variable_names:
@@ -391,39 +236,6 @@ outputs:
col_stop: 17
path: ""
content: "let x: u32 = x+y;"
- - Definition:
- declaration_type: Let
- variable_names:
- - mutable: true
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 5
- col_stop: 6
- path: ""
- content: "let x: u32 = (x,y);"
- type_:
- IntegerType: U32
- value:
- TupleInit:
- elements:
- - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}"
- - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x: u32 = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 14
- col_stop: 19
- path: ""
- content: "let x: u32 = (x,y);"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 19
- path: ""
- content: "let x: u32 = (x,y);"
- Definition:
declaration_type: Let
variable_names:
@@ -480,37 +292,6 @@ outputs:
col_stop: 20
path: ""
content: "const x: u32 = expr;"
- - Definition:
- declaration_type: Const
- variable_names:
- - mutable: false
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 7
- col_stop: 8
- path: ""
- content: "const x: u32 = ();"
- type_:
- IntegerType: U32
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 16
- col_stop: 18
- path: ""
- content: "const x: u32 = ();"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 18
- path: ""
- content: "const x: u32 = ();"
- Definition:
declaration_type: Const
variable_names:
@@ -546,39 +327,6 @@ outputs:
col_stop: 19
path: ""
content: "const x: u32 = x+y;"
- - Definition:
- declaration_type: Const
- variable_names:
- - mutable: false
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 7
- col_stop: 8
- path: ""
- content: "const x: u32 = (x,y);"
- type_:
- IntegerType: U32
- value:
- TupleInit:
- elements:
- - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}"
- - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x: u32 = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 16
- col_stop: 21
- path: ""
- content: "const x: u32 = (x,y);"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 21
- path: ""
- content: "const x: u32 = (x,y);"
- Definition:
declaration_type: Const
variable_names:
@@ -643,45 +391,6 @@ outputs:
col_stop: 18
path: ""
content: "let (x, y) = expr;"
- - Definition:
- declaration_type: Let
- variable_names:
- - mutable: true
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 6
- col_stop: 7
- path: ""
- content: "let (x, y) = ();"
- - mutable: true
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 9
- col_stop: 10
- path: ""
- content: "let (x, y) = ();"
- type_: ~
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 14
- col_stop: 16
- path: ""
- content: "let (x, y) = ();"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 16
- path: ""
- content: "let (x, y) = ();"
- Definition:
declaration_type: Let
variable_names:
@@ -725,47 +434,6 @@ outputs:
col_stop: 17
path: ""
content: "let (x, y) = x+y;"
- - Definition:
- declaration_type: Let
- variable_names:
- - mutable: true
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 6
- col_stop: 7
- path: ""
- content: "let (x, y) = (x,y);"
- - mutable: true
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 9
- col_stop: 10
- path: ""
- content: "let (x, y) = (x,y);"
- type_: ~
- value:
- TupleInit:
- elements:
- - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}"
- - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 14
- col_stop: 19
- path: ""
- content: "let (x, y) = (x,y);"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 19
- path: ""
- content: "let (x, y) = (x,y);"
- Definition:
declaration_type: Let
variable_names:
@@ -838,45 +506,6 @@ outputs:
col_stop: 20
path: ""
content: "const (x, y) = expr;"
- - Definition:
- declaration_type: Const
- variable_names:
- - mutable: false
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 8
- col_stop: 9
- path: ""
- content: "const (x, y) = ();"
- - mutable: false
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 11
- col_stop: 12
- path: ""
- content: "const (x, y) = ();"
- type_: ~
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 16
- col_stop: 18
- path: ""
- content: "const (x, y) = ();"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 18
- path: ""
- content: "const (x, y) = ();"
- Definition:
declaration_type: Const
variable_names:
@@ -920,47 +549,6 @@ outputs:
col_stop: 19
path: ""
content: "const (x, y) = x+y;"
- - Definition:
- declaration_type: Const
- variable_names:
- - mutable: false
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 8
- col_stop: 9
- path: ""
- content: "const (x, y) = (x,y);"
- - mutable: false
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 11
- col_stop: 12
- path: ""
- content: "const (x, y) = (x,y);"
- type_: ~
- value:
- TupleInit:
- elements:
- - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":17,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}"
- - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":19,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 16
- col_stop: 21
- path: ""
- content: "const (x, y) = (x,y);"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 21
- path: ""
- content: "const (x, y) = (x,y);"
- Definition:
declaration_type: Const
variable_names:
@@ -1034,46 +622,6 @@ outputs:
col_stop: 23
path: ""
content: "let (x, y): u32 = expr;"
- - Definition:
- declaration_type: Let
- variable_names:
- - mutable: true
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 6
- col_stop: 7
- path: ""
- content: "let (x, y): u32 = ();"
- - mutable: true
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 9
- col_stop: 10
- path: ""
- content: "let (x, y): u32 = ();"
- type_:
- IntegerType: U32
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 19
- col_stop: 21
- path: ""
- content: "let (x, y): u32 = ();"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 21
- path: ""
- content: "let (x, y): u32 = ();"
- Definition:
declaration_type: Let
variable_names:
@@ -1118,48 +666,6 @@ outputs:
col_stop: 22
path: ""
content: "let (x, y): u32 = x+y;"
- - Definition:
- declaration_type: Let
- variable_names:
- - mutable: true
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 6
- col_stop: 7
- path: ""
- content: "let (x, y): u32 = (x,y);"
- - mutable: true
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 9
- col_stop: 10
- path: ""
- content: "let (x, y): u32 = (x,y);"
- type_:
- IntegerType: U32
- value:
- TupleInit:
- elements:
- - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}"
- - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y): u32 = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 19
- col_stop: 24
- path: ""
- content: "let (x, y): u32 = (x,y);"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 24
- path: ""
- content: "let (x, y): u32 = (x,y);"
- Definition:
declaration_type: Let
variable_names:
@@ -1234,46 +740,6 @@ outputs:
col_stop: 25
path: ""
content: "const (x, y): u32 = expr;"
- - Definition:
- declaration_type: Const
- variable_names:
- - mutable: false
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 8
- col_stop: 9
- path: ""
- content: "const (x, y): u32 = ();"
- - mutable: false
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 11
- col_stop: 12
- path: ""
- content: "const (x, y): u32 = ();"
- type_:
- IntegerType: U32
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 21
- col_stop: 23
- path: ""
- content: "const (x, y): u32 = ();"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 23
- path: ""
- content: "const (x, y): u32 = ();"
- Definition:
declaration_type: Const
variable_names:
@@ -1318,48 +784,6 @@ outputs:
col_stop: 24
path: ""
content: "const (x, y): u32 = x+y;"
- - Definition:
- declaration_type: Const
- variable_names:
- - mutable: false
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 8
- col_stop: 9
- path: ""
- content: "const (x, y): u32 = (x,y);"
- - mutable: false
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 11
- col_stop: 12
- path: ""
- content: "const (x, y): u32 = (x,y);"
- type_:
- IntegerType: U32
- value:
- TupleInit:
- elements:
- - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":22,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}"
- - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y): u32 = (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 21
- col_stop: 26
- path: ""
- content: "const (x, y): u32 = (x,y);"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 26
- path: ""
- content: "const (x, y): u32 = (x,y);"
- Definition:
declaration_type: Const
variable_names:
@@ -1402,45 +826,6 @@ outputs:
col_stop: 24
path: ""
content: "const (x, y): u32 = x();"
- - Definition:
- declaration_type: Let
- variable_names:
- - mutable: true
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 6
- col_stop: 7
- path: ""
- content: "let (x,y,) = ();"
- - mutable: true
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x,y,) = ();\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 8
- col_stop: 9
- path: ""
- content: "let (x,y,) = ();"
- type_: ~
- value:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 14
- col_stop: 16
- path: ""
- content: "let (x,y,) = ();"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 16
- path: ""
- content: "let (x,y,) = ();"
- Definition:
declaration_type: Let
variable_names:
diff --git a/tests/expectations/parser/parser/statement/definition_fail.leo.out b/tests/expectations/parser/parser/statement/definition_fail.leo.out
index 080bf09d84..cdaf512fdd 100644
--- a/tests/expectations/parser/parser/statement/definition_fail.leo.out
+++ b/tests/expectations/parser/parser/statement/definition_fail.leo.out
@@ -3,24 +3,24 @@ namespace: ParseStatement
expectation: Fail
outputs:
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = expr;\n | ^^^^^^^"
- - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = ();\n | ^^^^^^^"
+ - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = ();\n | ^^^^^^^\nError [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:13\n |\n 1 | let mut x = ();\n | ^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x+y;\n | ^^^^^^^"
- - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = (x,y);\n | ^^^^^^^"
+ - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = (x,y);\n | ^^^^^^^\nError [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:13\n |\n 1 | let mut x = (x,y);\n | ^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x();\n | ^^^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = expr;\n | ^^^^^^^^^"
- - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = ();\n | ^^^^^^^^^"
+ - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = ();\n | ^^^^^^^^^\nError [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:15\n |\n 1 | const mut x = ();\n | ^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x+y;\n | ^^^^^^^^^"
- - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = (x,y);\n | ^^^^^^^^^"
+ - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = (x,y);\n | ^^^^^^^^^\nError [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:15\n |\n 1 | const mut x = (x,y);\n | ^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x();\n | ^^^^^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = expr;\n | ^^^^^^^"
- - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = ();\n | ^^^^^^^"
+ - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = ();\n | ^^^^^^^\nError [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:18\n |\n 1 | let mut x: u32 = ();\n | ^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x+y;\n | ^^^^^^^"
- - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = (x,y);\n | ^^^^^^^"
+ - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = (x,y);\n | ^^^^^^^\nError [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:18\n |\n 1 | let mut x: u32 = (x,y);\n | ^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x();\n | ^^^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = expr;\n | ^^^^^^^^^"
- - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = ();\n | ^^^^^^^^^"
+ - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = ();\n | ^^^^^^^^^\nError [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:20\n |\n 1 | const mut x: u32 = ();\n | ^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x+y;\n | ^^^^^^^^^"
- - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = (x,y);\n | ^^^^^^^^^"
+ - "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = (x,y);\n | ^^^^^^^^^\nError [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:20\n |\n 1 | const mut x: u32 = (x,y);\n | ^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x();\n | ^^^^^^^^^"
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^"
diff --git a/tests/expectations/parser/parser/statement/expression.leo.out b/tests/expectations/parser/parser/statement/expression.leo.out
index d03278d686..06cbb5ad23 100644
--- a/tests/expectations/parser/parser/statement/expression.leo.out
+++ b/tests/expectations/parser/parser/statement/expression.leo.out
@@ -12,24 +12,6 @@ outputs:
col_stop: 5
path: ""
content: expr;
- - Expression:
- expression:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 3
- path: ""
- content: ();
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 3
- path: ""
- content: ();
- Expression:
expression:
Binary:
@@ -52,26 +34,6 @@ outputs:
col_stop: 4
path: ""
content: x+y;
- - Expression:
- expression:
- TupleInit:
- elements:
- - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}"
- - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 6
- path: ""
- content: "(x,y);"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 6
- path: ""
- content: "(x,y);"
- Expression:
expression:
Call:
diff --git a/tests/expectations/parser/parser/statement/iteration.leo.out b/tests/expectations/parser/parser/statement/iteration.leo.out
index 05513bd21e..c4e876a74e 100644
--- a/tests/expectations/parser/parser/statement/iteration.leo.out
+++ b/tests/expectations/parser/parser/statement/iteration.leo.out
@@ -72,22 +72,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 2
- line_stop: 2
- col_start: 8
- col_stop: 10
- path: ""
- content: return ();
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 2
+ line_stop: 2
+ col_start: 8
+ col_stop: 9
+ path: ""
+ content: return 0;
span:
line_start: 2
line_stop: 2
col_start: 1
- col_stop: 10
+ col_stop: 9
path: ""
- content: return ();
+ content: return 0;
span:
line_start: 1
line_stop: 3
@@ -132,22 +133,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 2
- line_stop: 2
- col_start: 8
- col_stop: 10
- path: ""
- content: return ();
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 2
+ line_stop: 2
+ col_start: 8
+ col_stop: 9
+ path: ""
+ content: return 0;
span:
line_start: 2
line_stop: 2
col_start: 1
- col_stop: 10
+ col_stop: 9
path: ""
- content: return ();
+ content: return 0;
span:
line_start: 1
line_stop: 3
@@ -182,22 +184,23 @@ outputs:
statements:
- Return:
expression:
- TupleInit:
- elements: []
- span:
- line_start: 2
- line_stop: 2
- col_start: 8
- col_stop: 10
- path: ""
- content: return ();
+ Value:
+ Implicit:
+ - "0"
+ - span:
+ line_start: 2
+ line_stop: 2
+ col_start: 8
+ col_stop: 9
+ path: ""
+ content: return 0;
span:
line_start: 2
line_stop: 2
col_start: 1
- col_stop: 10
+ col_stop: 9
path: ""
- content: return ();
+ content: return 0;
span:
line_start: 1
line_stop: 3
diff --git a/tests/expectations/parser/parser/statement/return.leo.out b/tests/expectations/parser/parser/statement/return.leo.out
index 2994e613bc..ed1fb34ada 100644
--- a/tests/expectations/parser/parser/statement/return.leo.out
+++ b/tests/expectations/parser/parser/statement/return.leo.out
@@ -12,84 +12,6 @@ outputs:
col_stop: 12
path: ""
content: return expr;
- - Return:
- expression:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 8
- col_stop: 10
- path: ""
- content: return ();
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 10
- path: ""
- content: return ();
- - Return:
- expression:
- TupleInit:
- elements: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 8
- col_stop: 10
- path: ""
- content: return ();
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 10
- path: ""
- content: return ();
- - Return:
- expression:
- Binary:
- left:
- Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}"
- right:
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"return x+y;\\\"}\"}"
- op: Add
- span:
- line_start: 1
- line_stop: 1
- col_start: 8
- col_stop: 11
- path: ""
- content: return x+y;
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 11
- path: ""
- content: return x+y;
- - Return:
- expression:
- TupleInit:
- elements:
- - Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}"
- - Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"return (x,y);\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 8
- col_stop: 13
- path: ""
- content: "return (x,y);"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 13
- path: ""
- content: "return (x,y);"
- Return:
expression:
Value:
diff --git a/tests/expectations/parser/parser/unreachable/eat_int.leo.out b/tests/expectations/parser/parser/unreachable/eat_int.leo.out
index e3393e9411..881cd8dfbe 100644
--- a/tests/expectations/parser/parser/unreachable/eat_int.leo.out
+++ b/tests/expectations/parser/parser/unreachable/eat_int.leo.out
@@ -3,54 +3,54 @@ namespace: ParseStatement
expectation: Fail
outputs:
- "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '-'\n --> test:1:3\n |\n 1 | x.-12\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_;\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_.\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_import\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_,\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_*\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_+\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_-\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_/\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_[\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_]\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_{\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_}\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_(\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_)\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_:\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_::\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_?\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0__\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_=\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_==\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_!\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_!=\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_>\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_>=\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_<\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_<=\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_>\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_..\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_as\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_console\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_const\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_let\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_for\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_if\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_else\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_i8\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_i16\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_i32\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_i64\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_i128\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_u8\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_u16\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_u32\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_u64\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_u128\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_;\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_.\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_import\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_,\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_*\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_+\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_-\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_/\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_[\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_]\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_{\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_}\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_(\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_)\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_:\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_::\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_?\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0__\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_=\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_==\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_!\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_!=\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_>\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_>=\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_<\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_<=\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_>\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_..\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_as\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_console\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_const\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_let\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_for\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_if\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_else\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_i8\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_i16\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_i32\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_i64\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_i128\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_u8\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_u16\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_u32\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_u64\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_u128\n | ^"
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_return\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_self\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_Self\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_true\n | ^"
- - "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:4\n |\n 1 | x.0_false\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_return\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_self\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_Self\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_true\n | ^"
+ - "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_false\n | ^"
diff --git a/tests/expectations/parser/parser/unreachable/math_op_pass.leo.out b/tests/expectations/parser/parser/unreachable/math_op_pass.leo.out
index 0c0509b4cd..324d10b3e1 100644
--- a/tests/expectations/parser/parser/unreachable/math_op_pass.leo.out
+++ b/tests/expectations/parser/parser/unreachable/math_op_pass.leo.out
@@ -728,48 +728,6 @@ outputs:
col_stop: 10
path: ""
content: xreturn=b;
- - Assign:
- operation: Assign
- assignee:
- identifier: "{\"name\":\"xself\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xself=b;\\\"}\"}"
- accesses: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 6
- path: ""
- content: xself=b;
- value:
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xself=b;\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 8
- path: ""
- content: xself=b;
- - Assign:
- operation: Assign
- assignee:
- identifier: "{\"name\":\"xSelf\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xSelf=b;\\\"}\"}"
- accesses: []
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 6
- path: ""
- content: xSelf=b;
- value:
- Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xSelf=b;\\\"}\"}"
- span:
- line_start: 1
- line_stop: 1
- col_start: 1
- col_stop: 8
- path: ""
- content: xSelf=b;
- Assign:
operation: Assign
assignee:
diff --git a/tests/parser/expression/access/call.leo b/tests/parser/expression/access/call.leo
index d0d1694350..28d1d9e2ae 100644
--- a/tests/parser/expression/access/call.leo
+++ b/tests/parser/expression/access/call.leo
@@ -8,4 +8,3 @@ X()
x(y)
x(y, z)
x(x, y, z)
-x.0(x)
diff --git a/tests/parser/expression/access/tuple.leo b/tests/parser/expression/access/tuple.leo
deleted file mode 100644
index c96e38953f..0000000000
--- a/tests/parser/expression/access/tuple.leo
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
-namespace: ParseExpression
-expectation: Pass
-*/
-
-x.0
-x.1
-x.2
-x.0.0
-x.1.1
-x.2.2
\ No newline at end of file
diff --git a/tests/parser/expression/tuple.leo b/tests/parser/expression/tuple.leo
deleted file mode 100644
index abfcab0999..0000000000
--- a/tests/parser/expression/tuple.leo
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-namespace: ParseExpression
-expectation: Pass
-*/
-
-//not tuples
-(x)
-(y)
-(z)
-
-//tuples
-(x,)
-(x,y)
-(x,y,z)
-(123,123)
-
-()
-
-(())
\ No newline at end of file
diff --git a/tests/parser/functions/const_function.leo b/tests/parser/functions/const_function.leo
index fd8703b9fc..d65dc46c1a 100644
--- a/tests/parser/functions/const_function.leo
+++ b/tests/parser/functions/const_function.leo
@@ -4,5 +4,5 @@ expectation: Pass
*/
const function x() {
- return ();
+ return 0;
}
diff --git a/tests/parser/functions/const_param.leo b/tests/parser/functions/const_param.leo
index 3fbe5dfdba..a69f08e3d7 100644
--- a/tests/parser/functions/const_param.leo
+++ b/tests/parser/functions/const_param.leo
@@ -4,9 +4,9 @@ expectation: Pass
*/
function x(x: u32, const y: i32) {
- return ();
+ return 0;
}
function x(const x: u32, y: i32) {
- return ();
+ return 0;
}
\ No newline at end of file
diff --git a/tests/parser/functions/empty.leo b/tests/parser/functions/empty.leo
deleted file mode 100644
index 0c463ae036..0000000000
--- a/tests/parser/functions/empty.leo
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-namespace: Parse
-expectation: Pass
-*/
-
-function x() {
- return ();
-}
\ No newline at end of file
diff --git a/tests/parser/functions/param_tuple.leo b/tests/parser/functions/param_tuple.leo
deleted file mode 100644
index 80d9c202f9..0000000000
--- a/tests/parser/functions/param_tuple.leo
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-namespace: Parse
-expectation: Pass
-*/
-
-function x(x: (u32, i32)) {
- return ();
-}
\ No newline at end of file
diff --git a/tests/parser/functions/params.leo b/tests/parser/functions/params.leo
index e42363568c..9392a2784b 100644
--- a/tests/parser/functions/params.leo
+++ b/tests/parser/functions/params.leo
@@ -4,5 +4,5 @@ expectation: Pass
*/
function x(x: u32, y: i32) {
- return ();
+ return 0;
}
\ No newline at end of file
diff --git a/tests/parser/functions/params_return.leo b/tests/parser/functions/params_return.leo
index d1f2b434fd..ed61c09ad3 100644
--- a/tests/parser/functions/params_return.leo
+++ b/tests/parser/functions/params_return.leo
@@ -4,5 +4,5 @@ expectation: Pass
*/
function x(x: u32, y: i32) -> u32 {
- return ();
+ return 0;
}
\ No newline at end of file
diff --git a/tests/parser/functions/return.leo b/tests/parser/functions/return.leo
index ccf8dee32b..1a78e8d5ef 100644
--- a/tests/parser/functions/return.leo
+++ b/tests/parser/functions/return.leo
@@ -4,5 +4,5 @@ expectation: Pass
*/
function x() -> u32 {
- return ();
+ return 0;
}
\ No newline at end of file
diff --git a/tests/parser/functions/return_tuple.leo b/tests/parser/functions/return_tuple.leo
deleted file mode 100644
index 618ddec00d..0000000000
--- a/tests/parser/functions/return_tuple.leo
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-namespace: Parse
-expectation: Pass
-*/
-
-function x() -> (u32, u32) {
- return ();
-}
\ No newline at end of file
diff --git a/tests/parser/inputs/input_success.leo b/tests/parser/inputs/input_success.leo
index 81e778f200..ed24602a59 100644
--- a/tests/parser/inputs/input_success.leo
+++ b/tests/parser/inputs/input_success.leo
@@ -9,7 +9,6 @@ b: u8 = 2;
c: field = 0;
d: group = (0, 1)group;
e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
-h: (bool, bool) = (true, false);
[registers]
r0: bool = true;
@@ -17,7 +16,6 @@ r1: u8 = 2;
r2: field = 0;
r3: group = (0, 1)group;
r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
-r7: (bool, bool) = (true, false);
[constants]
c0: bool = true;
@@ -25,4 +23,3 @@ c1: u8 = 2;
c2: field = 0;
c3: group = (0, 1)group;
c4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
-c7: (bool, bool) = (true, false);
diff --git a/tests/parser/statement/assign.leo b/tests/parser/statement/assign.leo
index 583c3dcbd6..6d368cc6fd 100644
--- a/tests/parser/statement/assign.leo
+++ b/tests/parser/statement/assign.leo
@@ -5,59 +5,34 @@ expectation: Pass
x = expr;
-x = ();
-
x = x+y;
-x = (x,y);
-
x = x();
x += expr;
-x += ();
-
x += x+y;
x += x();
x -= expr;
-x -= ();
-
x -= x+y;
x -= x();
x *= expr;
-x *= ();
-
x *= x+y;
x *= x();
-x.0 *= y;
-
-
x /= expr;
-x /= ();
-
x /= x+y;
x /= x();
-x.0 /= y;
-
x **= expr;
-x **= ();
-
x **= x+y;
-
-x **= x();
-
-
-
-x.0 **= y;
diff --git a/tests/parser/statement/block.leo b/tests/parser/statement/block.leo
index 307cc6928d..199b47cbc4 100644
--- a/tests/parser/statement/block.leo
+++ b/tests/parser/statement/block.leo
@@ -6,20 +6,20 @@ expectation: Pass
{}
{
- return ();
+ return 0;
}
{{}}
{
{
- return ();
+ return 0;
}
}
{
if x {
- return ();
+ return 0;
}
}
diff --git a/tests/parser/statement/conditional.leo b/tests/parser/statement/conditional.leo
index 62a9e7f54e..6740174fbd 100644
--- a/tests/parser/statement/conditional.leo
+++ b/tests/parser/statement/conditional.leo
@@ -4,15 +4,11 @@ expectation: Pass
*/
if x {
- return ();
-}
-
-if Self {
- return ();
+ return 0;
}
if (x) {
- return ();
+ return 0;
}
if (x) {} else {}
@@ -21,5 +17,5 @@ if x+y {} else if x+z {} else {}
if x+y {
expr;
- return ();
+ return 0;
}
\ No newline at end of file
diff --git a/tests/parser/statement/definition.leo b/tests/parser/statement/definition.leo
index 841bd438ed..598cec9594 100644
--- a/tests/parser/statement/definition.leo
+++ b/tests/parser/statement/definition.leo
@@ -5,45 +5,29 @@ expectation: Pass
let x = expr;
-let x = ();
-
let x = x+y;
-let x = (x,y);
-
let x = x();
const x = expr;
-const x = ();
-
const x = x+y;
-const x = (x,y);
-
const x = x();
let x: u32 = expr;
-let x: u32 = ();
-
let x: u32 = x+y;
-let x: u32 = (x,y);
-
let x: u32 = x();
const x: u32 = expr;
-const x: u32 = ();
-
const x: u32 = x+y;
-const x: u32 = (x,y);
-
const x: u32 = x();
@@ -53,48 +37,29 @@ const x: u32 = x();
let (x, y) = expr;
-let (x, y) = ();
-
let (x, y) = x+y;
-let (x, y) = (x,y);
-
let (x, y) = x();
const (x, y) = expr;
-const (x, y) = ();
-
const (x, y) = x+y;
-const (x, y) = (x,y);
-
const (x, y) = x();
let (x, y): u32 = expr;
-let (x, y): u32 = ();
-
let (x, y): u32 = x+y;
-let (x, y): u32 = (x,y);
-
let (x, y): u32 = x();
const (x, y): u32 = expr;
-const (x, y): u32 = ();
-
const (x, y): u32 = x+y;
-const (x, y): u32 = (x,y);
-
const (x, y): u32 = x();
-
-let (x,y,) = ();
-
let x: address = aleo15u4r0gzjtqzepkgurgn7p3u5kkhs9p74rx6aun3uh2s5std6759svgmg53;
diff --git a/tests/parser/statement/expression.leo b/tests/parser/statement/expression.leo
index cc63041b00..1a5b3b1fe1 100644
--- a/tests/parser/statement/expression.leo
+++ b/tests/parser/statement/expression.leo
@@ -5,10 +5,6 @@ expectation: Pass
expr;
-();
-
x+y;
-(x,y);
-
x();
\ No newline at end of file
diff --git a/tests/parser/statement/iteration.leo b/tests/parser/statement/iteration.leo
index 79850fa6b9..506110850c 100644
--- a/tests/parser/statement/iteration.leo
+++ b/tests/parser/statement/iteration.leo
@@ -6,13 +6,13 @@ expectation: Pass
for x in 0..7 {}
for x in 0..7 {
- return ();
+ return 0;
}
for x in 0..99u8 {
- return ();
+ return 0;
}
for x in 0..Self {
- return ();
+ return 0;
}
\ No newline at end of file
diff --git a/tests/parser/statement/return.leo b/tests/parser/statement/return.leo
index e3e835c5df..9451b67f16 100644
--- a/tests/parser/statement/return.leo
+++ b/tests/parser/statement/return.leo
@@ -5,13 +5,5 @@ expectation: Pass
return expr;
-return ();
-
-return ();
-
-return x+y;
-
-return (x,y);
-
return
5;
\ No newline at end of file
diff --git a/tests/parser/unreachable/math_op_pass.leo b/tests/parser/unreachable/math_op_pass.leo
index cec1cc0064..48e55ffb5b 100644
--- a/tests/parser/unreachable/math_op_pass.leo
+++ b/tests/parser/unreachable/math_op_pass.leo
@@ -64,10 +64,6 @@ xu128=b;
xreturn=b;
-xself=b;
-
-xSelf=b;
-
xtrue=b;
xfalse=b;