tuples removed

This commit is contained in:
gluax 2022-03-28 10:35:36 -07:00
parent 95d508566f
commit 27921a61e6
54 changed files with 340 additions and 2082 deletions

View File

@ -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 <https://www.gnu.org/licenses/>.
mod tuple_access;
pub use tuple_access::*;

View File

@ -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 <https://www.gnu.org/licenses/>.
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<Expression>,
/// 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;
}
}

View File

@ -24,5 +24,3 @@ pub use imported_modules::*;
pub mod positive_number;
pub use positive_number::*;
pub mod vec_tendril_json;

View File

@ -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 <https://www.gnu.org/licenses/>.
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use tendril::StrTendril;
#[allow(clippy::ptr_arg)]
pub fn serialize<S: Serializer>(tendril: &Vec<StrTendril>, serializer: S) -> Result<S::Ok, S::Error> {
tendril
.iter()
.map(|x| x.as_ref())
.collect::<Vec<_>>()
.serialize(serializer)
}
pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result<Vec<StrTendril>, D::Error> {
Ok(Vec::<String>::deserialize(deserializer)?
.into_iter()
.map(|x| x.into())
.collect())
}

View File

@ -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 <https://www.gnu.org/licenses/>.
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),
}
}
}

View File

@ -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),
}
}

View File

@ -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 <https://www.gnu.org/licenses/>.
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<Expression>,
/// 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;
}
}

View File

@ -28,7 +28,6 @@ pub enum InputValue {
Field(String),
Group(GroupValue),
Integer(IntegerType, String),
Tuple(Vec<InputValue>),
}
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::<Vec<_>>().join(", ");
write!(f, "({})", values)
}
}
}
}

View File

@ -22,9 +22,6 @@
#![doc = include_str!("../README.md")]
pub mod accesses;
pub use self::accesses::*;
pub mod chars;
pub use self::chars::*;

View File

@ -35,14 +35,6 @@ impl<R: ReconstructingReducer> ReconstructingDirector<R> {
pub fn reduce_type(&mut self, type_: &Type, span: &Span) -> Result<Type> {
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<R: ReconstructingReducer> ReconstructingDirector<R> {
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<R: ReconstructingReducer> ReconstructingDirector<R> {
self.reducer.reduce_ternary(ternary, condition, if_true, if_false)
}
pub fn reduce_tuple_access(&mut self, tuple_access: &TupleAccess) -> Result<TupleAccess> {
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<AccessExpression> {
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<TupleInitExpression> {
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<CallExpression> {
let function = self.reduce_expression(&call.function)?;

View File

@ -113,25 +113,6 @@ pub trait ReconstructingReducer {
})
}
fn reduce_tuple_access(&mut self, tuple_access: &TupleAccess, tuple: Expression) -> Result<TupleAccess> {
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<Expression>,
) -> Result<TupleInitExpression> {
Ok(TupleInitExpression {
elements,
span: tuple_init.span.clone(),
})
}
fn reduce_call(
&mut self,
call: &CallExpression,

View File

@ -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<Type>),
/// 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::<Vec<_>>().join(", ");
write!(f, "({})", types)
}
Type::Err => write!(f, "error"),
}
}

View File

@ -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())
}
}

View File

@ -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<AssigneeAccess>) -> Result<Identifier> {
let identifier;
pub fn construct_assignee_access(expr: Expression, _accesses: &mut Vec<AssigneeAccess>) -> Result<Identifier> {
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)
}
///

View File

@ -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)?;
(

View File

@ -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)

View File

@ -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 | ^^^^^^^^^^"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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: ""

View File

@ -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;

View File

@ -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 | ^"

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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 | ^"

View File

@ -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:

View File

@ -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

View File

@ -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:

View File

@ -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 | ^"

View File

@ -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:

View File

@ -8,4 +8,3 @@ X()
x(y)
x(y, z)
x(x, y, z)
x.0(x)

View File

@ -1,11 +0,0 @@
/*
namespace: ParseExpression
expectation: Pass
*/
x.0
x.1
x.2
x.0.0
x.1.1
x.2.2

View File

@ -1,19 +0,0 @@
/*
namespace: ParseExpression
expectation: Pass
*/
//not tuples
(x)
(y)
(z)
//tuples
(x,)
(x,y)
(x,y,z)
(123,123)
()
(())

View File

@ -4,5 +4,5 @@ expectation: Pass
*/
const function x() {
return ();
return 0;
}

View File

@ -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;
}

View File

@ -1,8 +0,0 @@
/*
namespace: Parse
expectation: Pass
*/
function x() {
return ();
}

View File

@ -1,8 +0,0 @@
/*
namespace: Parse
expectation: Pass
*/
function x(x: (u32, i32)) {
return ();
}

View File

@ -4,5 +4,5 @@ expectation: Pass
*/
function x(x: u32, y: i32) {
return ();
return 0;
}

View File

@ -4,5 +4,5 @@ expectation: Pass
*/
function x(x: u32, y: i32) -> u32 {
return ();
return 0;
}

View File

@ -4,5 +4,5 @@ expectation: Pass
*/
function x() -> u32 {
return ();
return 0;
}

View File

@ -1,8 +0,0 @@
/*
namespace: Parse
expectation: Pass
*/
function x() -> (u32, u32) {
return ();
}

View File

@ -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);

View File

@ -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;

View File

@ -6,20 +6,20 @@ expectation: Pass
{}
{
return ();
return 0;
}
{{}}
{
{
return ();
return 0;
}
}
{
if x {
return ();
return 0;
}
}

View File

@ -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;
}

View File

@ -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;

View File

@ -5,10 +5,6 @@ expectation: Pass
expr;
();
x+y;
(x,y);
x();

View File

@ -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;
}

View File

@ -5,13 +5,5 @@ expectation: Pass
return expr;
return ();
return ();
return x+y;
return (x,y);
return
5;

View File

@ -64,10 +64,6 @@ xu128=b;
xreturn=b;
xself=b;
xSelf=b;
xtrue=b;
xfalse=b;