remove parened field

This commit is contained in:
gluax 2022-03-14 07:58:51 -07:00
parent 377c65be21
commit 2c30cba70f
17 changed files with 30 additions and 167 deletions

View File

@ -376,7 +376,6 @@ impl Canonicalizer {
Statement::Definition(DefinitionStatement { Statement::Definition(DefinitionStatement {
declaration_type: definition.declaration_type.clone(), declaration_type: definition.declaration_type.clone(),
variable_names: definition.variable_names.clone(), variable_names: definition.variable_names.clone(),
parened: definition.parened,
type_, type_,
value, value,
span: definition.span.clone(), span: definition.span.clone(),
@ -621,18 +620,11 @@ impl ReconstructingReducer for Canonicalizer {
type_: Option<Type>, type_: Option<Type>,
value: Expression, value: Expression,
) -> Result<DefinitionStatement> { ) -> Result<DefinitionStatement> {
match &type_ { let type_ = self.canonicalize_self_type(type_.as_ref());
Some(Type::Tuple(elements)) if elements.len() != 1 => {}
_ if definition.parened => {
return Err(AstError::invalid_parens_around_single_variable(&definition.span).into());
}
_ => {}
}
Ok(DefinitionStatement { Ok(DefinitionStatement {
declaration_type: definition.declaration_type.clone(), declaration_type: definition.declaration_type.clone(),
variable_names, variable_names,
parened: definition.parened,
type_, type_,
value, value,
span: definition.span.clone(), span: definition.span.clone(),

View File

@ -48,7 +48,7 @@ impl Importer {
let pretty_package = package.join("."); let pretty_package = package.join(".");
let resolved_package = let resolved_package =
match wrapped_resolver.resolve_package(&package.iter().map(|x| &**x).collect::<Vec<_>>()[..], &span)? { match wrapped_resolver.resolve_package(&package.iter().map(|x| &**x).collect::<Vec<_>>(), &span)? {
Some(x) => x, Some(x) => x,
None => return Err(AstError::unresolved_import(pretty_package, &span).into()), None => return Err(AstError::unresolved_import(pretty_package, &span).into()),
}; };

View File

@ -286,7 +286,6 @@ pub trait ReconstructingReducer {
Ok(DefinitionStatement { Ok(DefinitionStatement {
declaration_type: definition.declaration_type.clone(), declaration_type: definition.declaration_type.clone(),
variable_names, variable_names,
parened: definition.parened,
type_, type_,
value, value,
span: definition.span.clone(), span: definition.span.clone(),

View File

@ -33,8 +33,6 @@ pub struct DefinitionStatement {
pub declaration_type: Declare, pub declaration_type: Declare,
/// The bindings / variable names to declare. /// The bindings / variable names to declare.
pub variable_names: Vec<VariableName>, pub variable_names: Vec<VariableName>,
/// Tracks whether the variable(s) are in parens.
pub parened: bool,
/// The types of the bindings, if specified, or inferred otherwise. /// The types of the bindings, if specified, or inferred otherwise.
pub type_: Option<Type>, pub type_: Option<Type>,
/// An initializer value for the bindings. /// An initializer value for the bindings.

View File

@ -295,14 +295,17 @@ impl ParserContext<'_> {
let declare = self.expect_oneof(&[Token::Let, Token::Const])?; let declare = self.expect_oneof(&[Token::Let, Token::Const])?;
// Parse variable names. // Parse variable names.
let (variable_names, parened) = if self.peek_is_left_par() { let variable_names = if self.peek_is_left_par() {
( let vars = self.parse_paren_comma_list(|p| p.parse_variable_name(&declare).map(Some))
self.parse_paren_comma_list(|p| p.parse_variable_name(&declare).map(Some)) .map(|(vars, ..)| vars)?;
.map(|(vars, ..)| vars)?,
true, if vars.len() == 1 {
) return Err(ParserError::invalid_parens_around_single_variable(vars[0].span()).into());
}
vars
} else { } else {
(vec![self.parse_variable_name(&declare)?], false) vec![self.parse_variable_name(&declare)?]
}; };
// Parse an optional type ascription. // Parse an optional type ascription.
@ -323,7 +326,6 @@ impl ParserContext<'_> {
_ => unreachable!("parse_definition_statement_ shouldn't produce this"), _ => unreachable!("parse_definition_statement_ shouldn't produce this"),
}, },
variable_names, variable_names,
parened,
type_, type_,
value: expr, value: expr,
}) })

View File

@ -46,7 +46,7 @@ fn eat_identifier(input_tendril: &StrTendril) -> Option<StrTendril> {
if input_tendril.is_empty() { if input_tendril.is_empty() {
return None; return None;
} }
let input = input_tendril[..].as_bytes(); let input = input_tendril.as_bytes();
if !input[0].is_ascii_alphabetic() { if !input[0].is_ascii_alphabetic() {
return None; return None;
@ -73,7 +73,7 @@ impl Token {
if escaped { if escaped {
let string = input_tendril.to_string(); let string = input_tendril.to_string();
let escaped = &string[1..string.len()]; let escaped = &string[1..input_tendril.len()];
if escaped.len() != 1 { if escaped.len() != 1 {
return Err(ParserError::lexer_escaped_char_incorrect_length(escaped).into()); return Err(ParserError::lexer_escaped_char_incorrect_length(escaped).into());
@ -158,7 +158,7 @@ impl Token {
if input_tendril.is_empty() { if input_tendril.is_empty() {
return Err(ParserError::lexer_empty_input_tendril().into()); return Err(ParserError::lexer_empty_input_tendril().into());
} }
let input = input_tendril[..].as_bytes(); let input = input_tendril.as_bytes();
if !input[0].is_ascii_digit() { if !input[0].is_ascii_digit() {
return Err(ParserError::lexer_eat_integer_leading_zero(String::from_utf8_lossy(input)).into()); return Err(ParserError::lexer_eat_integer_leading_zero(String::from_utf8_lossy(input)).into());
} }
@ -205,7 +205,7 @@ impl Token {
if input_tendril.is_empty() { if input_tendril.is_empty() {
return Err(ParserError::lexer_empty_input_tendril().into()); return Err(ParserError::lexer_empty_input_tendril().into());
} }
let input = input_tendril[..].as_bytes(); let input = input_tendril.as_bytes();
match input[0] { match input[0] {
x if x.is_ascii_whitespace() => return Ok((1, Token::WhiteSpace)), x if x.is_ascii_whitespace() => return Ok((1, Token::WhiteSpace)),
b'"' => { b'"' => {

View File

@ -138,12 +138,4 @@ create_errors!(
msg: "tuples of 1 element are not allowed", msg: "tuples of 1 element are not allowed",
help: None, help: None,
} }
/// For when a user puts parens around a single defined variable.
@formatted
invalid_parens_around_single_variable {
args: (),
msg: "do not put parens around single variable names",
help: None,
}
); );

View File

@ -382,4 +382,12 @@ create_errors!(
msg: format!("There was an emoji found in the escaped unicode character: `{}`.", input), msg: format!("There was an emoji found in the escaped unicode character: `{}`.", input),
help: None, help: None,
} }
/// For when a user puts parens around a single defined variable.
@formatted
invalid_parens_around_single_variable {
args: (),
msg: "do not put parens around single variable names",
help: None,
}
); );

View File

@ -95,7 +95,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"num_points\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":13,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let num_points = 5i32;\\\"}\"}" identifier: "{\"name\":\"num_points\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":13,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let num_points = 5i32;\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -107,7 +106,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"x_sum\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x_sum = 0i32; \\\"}\"}" identifier: "{\"name\":\"x_sum\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x_sum = 0i32; \\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -119,7 +117,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"y_sum\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let y_sum = 0i32; \\\"}\"}" identifier: "{\"name\":\"y_sum\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let y_sum = 0i32; \\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -131,7 +128,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"xy_sum\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let xy_sum = 0i32; \\\"}\"}" identifier: "{\"name\":\"xy_sum\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let xy_sum = 0i32; \\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -143,7 +139,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"x2_sum\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x2_sum = 0i32; \\\"}\"}" identifier: "{\"name\":\"x2_sum\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x2_sum = 0i32; \\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -294,7 +289,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"numerator\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":13,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let numerator = (num_points * xy_sum) - (x_sum * y_sum); \\\"}\"}" identifier: "{\"name\":\"numerator\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":13,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let numerator = (num_points * xy_sum) - (x_sum * y_sum); \\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -318,7 +312,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"denominator\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":13,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let denominator = (num_points * x2_sum) - (x_sum * x_sum);\\\"}\"}" identifier: "{\"name\":\"denominator\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":13,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let denominator = (num_points * x2_sum) - (x_sum * x_sum);\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -342,7 +335,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let slope = numerator / denominator;\\\"}\"}" identifier: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let slope = numerator / denominator;\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -376,7 +368,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"num_points\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":13,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let num_points = 5i32; \\\"}\"}" identifier: "{\"name\":\"num_points\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":13,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let num_points = 5i32; \\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -388,7 +379,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"x_sum\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x_sum = 0i32;\\\"}\"}" identifier: "{\"name\":\"x_sum\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x_sum = 0i32;\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -400,7 +390,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"y_sum\",\"span\":\"{\\\"line_start\\\":45,\\\"line_stop\\\":45,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let y_sum = 0i32;\\\"}\"}" identifier: "{\"name\":\"y_sum\",\"span\":\"{\\\"line_start\\\":45,\\\"line_stop\\\":45,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let y_sum = 0i32;\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -511,7 +500,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":7,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let points: [Point; 5] = [\\\"}\"}" identifier: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":7,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let points: [Point; 5] = [\\\"}\"}"
parened: false
type_: type_:
Array: Array:
- Identifier: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":16,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let points: [Point; 5] = [\\\"}\"}" - Identifier: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":16,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let points: [Point; 5] = [\\\"}\"}"
@ -634,7 +622,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"reg\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let reg = LinearRegression::new(points);\\\"}\"}" identifier: "{\"name\":\"reg\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let reg = LinearRegression::new(points);\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Call: Call:
@ -652,7 +639,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let slope = reg.slope();\\\"}\"}" identifier: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let slope = reg.slope();\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Call: Call:
@ -669,7 +655,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"offset\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":7,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let offset = reg.offset(slope);\\\"}\"}" identifier: "{\"name\":\"offset\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":7,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let offset = reg.offset(slope);\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Call: Call:

View File

@ -56,7 +56,6 @@ outputs:
variable_names: variable_names:
- mutable: false - mutable: false
identifier: "{\"name\":\"str_len\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":11,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const str_len = 20u32; // saving const for convenience\\\"}\"}" identifier: "{\"name\":\"str_len\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":11,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const str_len = 20u32; // saving const for convenience\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -68,7 +67,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = true;\\\"}\"}" identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = true;\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -78,7 +76,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let processed = 0u8;\\\"}\"}" identifier: "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let processed = 0u8;\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -106,7 +103,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":13,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let start_sym = str[start];\\\"}\"}" identifier: "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":13,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let start_sym = str[start];\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Access: Access:
@ -133,7 +129,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":17,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let skipped = 0u8;\\\"}\"}" identifier: "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":17,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let skipped = 0u8;\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -145,7 +140,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"end_empty\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":17,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let end_empty = 0u8;\\\"}\"}" identifier: "{\"name\":\"end_empty\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":17,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let end_empty = 0u8;\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:
@ -157,7 +151,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":17,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let end_sym = ' ';\\\"}\"}" identifier: "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":17,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let end_sym = ' ';\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Value: Value:

View File

@ -64,7 +64,6 @@ outputs:
variable_names: variable_names:
- mutable: true - mutable: true
identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let digest: group = 0group;\\\"}\"}" identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let digest: group = 0group;\\\"}\"}"
parened: false
type_: Group type_: Group
value: value:
Value: Value:
@ -144,7 +143,6 @@ outputs:
variable_names: variable_names:
- mutable: false - mutable: false
identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}" identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}"
parened: false
type_: ~ type_: ~
value: value:
Call: Call:

View File

@ -14,7 +14,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = expr; content: let x = expr;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}" Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = expr;\\\"}\"}"
@ -37,7 +36,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = (); content: let x = ();
parened: false
type_: ~ type_: ~
value: value:
TupleInit: TupleInit:
@ -68,7 +66,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = x+y; content: let x = x+y;
parened: false
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -103,7 +100,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: "let x = (x,y);" content: "let x = (x,y);"
parened: false
type_: ~ type_: ~
value: value:
TupleInit: TupleInit:
@ -136,7 +132,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = x(); content: let x = x();
parened: false
type_: ~ type_: ~
value: value:
Call: Call:
@ -169,7 +164,6 @@ outputs:
col_stop: 8 col_stop: 8
path: "" path: ""
content: const x = expr; content: const x = expr;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}" Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":11,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const x = expr;\\\"}\"}"
@ -192,7 +186,6 @@ outputs:
col_stop: 8 col_stop: 8
path: "" path: ""
content: const x = (); content: const x = ();
parened: false
type_: ~ type_: ~
value: value:
TupleInit: TupleInit:
@ -223,7 +216,6 @@ outputs:
col_stop: 8 col_stop: 8
path: "" path: ""
content: const x = x+y; content: const x = x+y;
parened: false
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -258,7 +250,6 @@ outputs:
col_stop: 8 col_stop: 8
path: "" path: ""
content: "const x = (x,y);" content: "const x = (x,y);"
parened: false
type_: ~ type_: ~
value: value:
TupleInit: TupleInit:
@ -291,7 +282,6 @@ outputs:
col_stop: 8 col_stop: 8
path: "" path: ""
content: const x = x(); content: const x = x();
parened: false
type_: ~ type_: ~
value: value:
Call: Call:
@ -324,7 +314,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: "let x: u32 = expr;" content: "let x: u32 = expr;"
parened: false
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -348,7 +337,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: "let x: u32 = ();" content: "let x: u32 = ();"
parened: false
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -380,7 +368,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: "let x: u32 = x+y;" content: "let x: u32 = x+y;"
parened: false
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -416,7 +403,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: "let x: u32 = (x,y);" content: "let x: u32 = (x,y);"
parened: false
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -450,7 +436,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: "let x: u32 = x();" content: "let x: u32 = x();"
parened: false
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -484,7 +469,6 @@ outputs:
col_stop: 8 col_stop: 8
path: "" path: ""
content: "const x: u32 = expr;" content: "const x: u32 = expr;"
parened: false
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -508,7 +492,6 @@ outputs:
col_stop: 8 col_stop: 8
path: "" path: ""
content: "const x: u32 = ();" content: "const x: u32 = ();"
parened: false
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -540,7 +523,6 @@ outputs:
col_stop: 8 col_stop: 8
path: "" path: ""
content: "const x: u32 = x+y;" content: "const x: u32 = x+y;"
parened: false
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -576,7 +558,6 @@ outputs:
col_stop: 8 col_stop: 8
path: "" path: ""
content: "const x: u32 = (x,y);" content: "const x: u32 = (x,y);"
parened: false
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -610,7 +591,6 @@ outputs:
col_stop: 8 col_stop: 8
path: "" path: ""
content: "const x: u32 = x();" content: "const x: u32 = x();"
parened: false
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -653,7 +633,6 @@ outputs:
col_stop: 10 col_stop: 10
path: "" path: ""
content: "let (x, y) = expr;" content: "let (x, y) = expr;"
parened: true
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}" Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let (x, y) = expr;\\\"}\"}"
@ -685,7 +664,6 @@ outputs:
col_stop: 10 col_stop: 10
path: "" path: ""
content: "let (x, y) = ();" content: "let (x, y) = ();"
parened: true
type_: ~ type_: ~
value: value:
TupleInit: TupleInit:
@ -725,7 +703,6 @@ outputs:
col_stop: 10 col_stop: 10
path: "" path: ""
content: "let (x, y) = x+y;" content: "let (x, y) = x+y;"
parened: true
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -769,7 +746,6 @@ outputs:
col_stop: 10 col_stop: 10
path: "" path: ""
content: "let (x, y) = (x,y);" content: "let (x, y) = (x,y);"
parened: true
type_: ~ type_: ~
value: value:
TupleInit: TupleInit:
@ -811,7 +787,6 @@ outputs:
col_stop: 10 col_stop: 10
path: "" path: ""
content: "let (x, y) = x();" content: "let (x, y) = x();"
parened: true
type_: ~ type_: ~
value: value:
Call: Call:
@ -853,7 +828,6 @@ outputs:
col_stop: 12 col_stop: 12
path: "" path: ""
content: "const (x, y) = expr;" content: "const (x, y) = expr;"
parened: true
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}" Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const (x, y) = expr;\\\"}\"}"
@ -885,7 +859,6 @@ outputs:
col_stop: 12 col_stop: 12
path: "" path: ""
content: "const (x, y) = ();" content: "const (x, y) = ();"
parened: true
type_: ~ type_: ~
value: value:
TupleInit: TupleInit:
@ -925,7 +898,6 @@ outputs:
col_stop: 12 col_stop: 12
path: "" path: ""
content: "const (x, y) = x+y;" content: "const (x, y) = x+y;"
parened: true
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -969,7 +941,6 @@ outputs:
col_stop: 12 col_stop: 12
path: "" path: ""
content: "const (x, y) = (x,y);" content: "const (x, y) = (x,y);"
parened: true
type_: ~ type_: ~
value: value:
TupleInit: TupleInit:
@ -1011,7 +982,6 @@ outputs:
col_stop: 12 col_stop: 12
path: "" path: ""
content: "const (x, y) = x();" content: "const (x, y) = x();"
parened: true
type_: ~ type_: ~
value: value:
Call: Call:
@ -1053,7 +1023,6 @@ outputs:
col_stop: 10 col_stop: 10
path: "" path: ""
content: "let (x, y): u32 = expr;" content: "let (x, y): u32 = expr;"
parened: true
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -1086,7 +1055,6 @@ outputs:
col_stop: 10 col_stop: 10
path: "" path: ""
content: "let (x, y): u32 = ();" content: "let (x, y): u32 = ();"
parened: true
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -1127,7 +1095,6 @@ outputs:
col_stop: 10 col_stop: 10
path: "" path: ""
content: "let (x, y): u32 = x+y;" content: "let (x, y): u32 = x+y;"
parened: true
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -1172,7 +1139,6 @@ outputs:
col_stop: 10 col_stop: 10
path: "" path: ""
content: "let (x, y): u32 = (x,y);" content: "let (x, y): u32 = (x,y);"
parened: true
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -1215,7 +1181,6 @@ outputs:
col_stop: 10 col_stop: 10
path: "" path: ""
content: "let (x, y): u32 = x();" content: "let (x, y): u32 = x();"
parened: true
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -1258,7 +1223,6 @@ outputs:
col_stop: 12 col_stop: 12
path: "" path: ""
content: "const (x, y): u32 = expr;" content: "const (x, y): u32 = expr;"
parened: true
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -1291,7 +1255,6 @@ outputs:
col_stop: 12 col_stop: 12
path: "" path: ""
content: "const (x, y): u32 = ();" content: "const (x, y): u32 = ();"
parened: true
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -1332,7 +1295,6 @@ outputs:
col_stop: 12 col_stop: 12
path: "" path: ""
content: "const (x, y): u32 = x+y;" content: "const (x, y): u32 = x+y;"
parened: true
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -1377,7 +1339,6 @@ outputs:
col_stop: 12 col_stop: 12
path: "" path: ""
content: "const (x, y): u32 = (x,y);" content: "const (x, y): u32 = (x,y);"
parened: true
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -1420,7 +1381,6 @@ outputs:
col_stop: 12 col_stop: 12
path: "" path: ""
content: "const (x, y): u32 = x();" content: "const (x, y): u32 = x();"
parened: true
type_: type_:
IntegerType: U32 IntegerType: U32
value: value:
@ -1463,7 +1423,6 @@ outputs:
col_stop: 9 col_stop: 9
path: "" path: ""
content: "let (x,y,) = ();" content: "let (x,y,) = ();"
parened: true
type_: ~ type_: ~
value: value:
TupleInit: TupleInit:
@ -1482,37 +1441,6 @@ outputs:
col_stop: 16 col_stop: 16
path: "" path: ""
content: "let (x,y,) = ();" content: "let (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,) = ();\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 7
path: ""
content: "let (x,) = ();"
parened: true
type_: ~
value:
TupleInit:
elements: []
span:
line_start: 1
line_stop: 1
col_start: 12
col_stop: 14
path: ""
content: "let (x,) = ();"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 14
path: ""
content: "let (x,) = ();"
- Definition: - Definition:
declaration_type: Let declaration_type: Let
variable_names: variable_names:
@ -1525,7 +1453,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: "let x: [[u8; 2]; 2] = [[0,0], [0,0]];" content: "let x: [[u8; 2]; 2] = [[0,0], [0,0]];"
parened: false
type_: type_:
Array: Array:
- Array: - Array:

View File

@ -25,3 +25,5 @@ outputs:
- "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: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 | ^" - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^" - "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^"
- "Error [EPAR0370044]: do not put parens around single variable names\n --> test:1:6\n |\n 1 | let (x) = ...;\n | ^"
- "Error [EPAR0370044]: do not put parens around single variable names\n --> test:1:6\n |\n 1 | let (x,) = ...;\n | ^"

View File

@ -14,7 +14,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = a . b; content: let x = a . b;
parened: false
type_: ~ type_: ~
value: value:
Access: Access:
@ -49,7 +48,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: "let x = a :: b;" content: "let x = a :: b;"
parened: false
type_: ~ type_: ~
value: value:
Access: Access:
@ -84,7 +82,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = a == b; content: let x = a == b;
parened: false
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -119,7 +116,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = a != b; content: let x = a != b;
parened: false
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -154,7 +150,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = a > b; content: let x = a > b;
parened: false
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -189,7 +184,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = a >= b; content: let x = a >= b;
parened: false
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -224,7 +218,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = a < b; content: let x = a < b;
parened: false
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -259,7 +252,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = a <= b; content: let x = a <= b;
parened: false
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -294,7 +286,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = a > b; content: let x = a > b;
parened: false
type_: ~ type_: ~
value: value:
Binary: Binary:
@ -329,7 +320,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = a as b; content: let x = a as b;
parened: false
type_: ~ type_: ~
value: value:
Cast: Cast:

View File

@ -33,7 +33,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = aimport; content: let x = aimport;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"aimport\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aimport;\\\"}\"}" Identifier: "{\"name\":\"aimport\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aimport;\\\"}\"}"
@ -56,7 +55,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = a_; content: let x = a_;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"a_\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a_;\\\"}\"}" Identifier: "{\"name\":\"a_\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a_;\\\"}\"}"
@ -79,7 +77,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = aas; content: let x = aas;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"aas\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aas;\\\"}\"}" Identifier: "{\"name\":\"aas\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aas;\\\"}\"}"
@ -102,7 +99,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = aconsole; content: let x = aconsole;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"aconsole\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aconsole;\\\"}\"}" Identifier: "{\"name\":\"aconsole\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aconsole;\\\"}\"}"
@ -125,7 +121,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = aconst; content: let x = aconst;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"aconst\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aconst;\\\"}\"}" Identifier: "{\"name\":\"aconst\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aconst;\\\"}\"}"
@ -148,7 +143,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = alet; content: let x = alet;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"alet\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = alet;\\\"}\"}" Identifier: "{\"name\":\"alet\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = alet;\\\"}\"}"
@ -171,7 +165,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = afor; content: let x = afor;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"afor\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = afor;\\\"}\"}" Identifier: "{\"name\":\"afor\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = afor;\\\"}\"}"
@ -194,7 +187,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = aif; content: let x = aif;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"aif\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aif;\\\"}\"}" Identifier: "{\"name\":\"aif\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aif;\\\"}\"}"
@ -217,7 +209,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = aelse; content: let x = aelse;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"aelse\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aelse;\\\"}\"}" Identifier: "{\"name\":\"aelse\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aelse;\\\"}\"}"
@ -240,7 +231,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = ai8; content: let x = ai8;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"ai8\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai8;\\\"}\"}" Identifier: "{\"name\":\"ai8\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai8;\\\"}\"}"
@ -263,7 +253,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = ai16; content: let x = ai16;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"ai16\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai16;\\\"}\"}" Identifier: "{\"name\":\"ai16\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai16;\\\"}\"}"
@ -286,7 +275,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = ai32; content: let x = ai32;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"ai32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai32;\\\"}\"}" Identifier: "{\"name\":\"ai32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai32;\\\"}\"}"
@ -309,7 +297,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = ai64; content: let x = ai64;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"ai64\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai64;\\\"}\"}" Identifier: "{\"name\":\"ai64\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai64;\\\"}\"}"
@ -332,7 +319,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = ai128; content: let x = ai128;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"ai128\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai128;\\\"}\"}" Identifier: "{\"name\":\"ai128\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai128;\\\"}\"}"
@ -355,7 +341,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = au8; content: let x = au8;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"au8\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au8;\\\"}\"}" Identifier: "{\"name\":\"au8\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au8;\\\"}\"}"
@ -378,7 +363,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = au16; content: let x = au16;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"au16\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au16;\\\"}\"}" Identifier: "{\"name\":\"au16\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au16;\\\"}\"}"
@ -401,7 +385,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = au32; content: let x = au32;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"au32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au32;\\\"}\"}" Identifier: "{\"name\":\"au32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au32;\\\"}\"}"
@ -424,7 +407,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = au64; content: let x = au64;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"au64\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au64;\\\"}\"}" Identifier: "{\"name\":\"au64\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au64;\\\"}\"}"
@ -447,7 +429,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = au128; content: let x = au128;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"au128\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au128;\\\"}\"}" Identifier: "{\"name\":\"au128\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au128;\\\"}\"}"
@ -470,7 +451,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = areturn; content: let x = areturn;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"areturn\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = areturn;\\\"}\"}" Identifier: "{\"name\":\"areturn\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = areturn;\\\"}\"}"
@ -493,7 +473,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = aself; content: let x = aself;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"aself\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aself;\\\"}\"}" Identifier: "{\"name\":\"aself\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aself;\\\"}\"}"
@ -516,7 +495,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = aSelf; content: let x = aSelf;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"aSelf\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aSelf;\\\"}\"}" Identifier: "{\"name\":\"aSelf\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aSelf;\\\"}\"}"
@ -539,7 +517,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = atrue; content: let x = atrue;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"atrue\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = atrue;\\\"}\"}" Identifier: "{\"name\":\"atrue\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = atrue;\\\"}\"}"
@ -562,7 +539,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = afalse; content: let x = afalse;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"afalse\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = afalse;\\\"}\"}" Identifier: "{\"name\":\"afalse\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = afalse;\\\"}\"}"
@ -585,7 +561,6 @@ outputs:
col_stop: 6 col_stop: 6
path: "" path: ""
content: let x = a0; content: let x = a0;
parened: false
type_: ~ type_: ~
value: value:
Identifier: "{\"name\":\"a0\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a0;\\\"}\"}" Identifier: "{\"name\":\"a0\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a0;\\\"}\"}"

View File

@ -97,6 +97,4 @@ const (x, y): u32 = x();
let (x,y,) = (); let (x,y,) = ();
let (x,) = ();
let x: [[u8; 2]; 2] = [[0,0], [0,0]]; let x: [[u8; 2]; 2] = [[0,0], [0,0]];

View File

@ -52,3 +52,7 @@ let (x,y,,) = ();
let (,x,y) = (); let (,x,y) = ();
let (x,,y) = (); let (x,,y) = ();
let (x) = ...;
let (x,) = ...;