mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-18 23:02:35 +03:00
Merge pull request #1678 from AleoHQ/bug/more-misc-parser-bug-fixes
[Fix] Fixes more Misc Parser issues.
This commit is contained in:
commit
647b25dc2d
@ -376,7 +376,6 @@ impl Canonicalizer {
|
||||
Statement::Definition(DefinitionStatement {
|
||||
declaration_type: definition.declaration_type.clone(),
|
||||
variable_names: definition.variable_names.clone(),
|
||||
parened: definition.parened,
|
||||
type_,
|
||||
value,
|
||||
span: definition.span.clone(),
|
||||
@ -621,18 +620,11 @@ impl ReconstructingReducer for Canonicalizer {
|
||||
type_: Option<Type>,
|
||||
value: Expression,
|
||||
) -> Result<DefinitionStatement> {
|
||||
match &type_ {
|
||||
Some(Type::Tuple(elements)) if elements.len() != 1 => {}
|
||||
_ if definition.parened => {
|
||||
return Err(AstError::invalid_parens_around_single_variable(&definition.span).into());
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
let type_ = self.canonicalize_self_type(type_.as_ref());
|
||||
|
||||
Ok(DefinitionStatement {
|
||||
declaration_type: definition.declaration_type.clone(),
|
||||
variable_names,
|
||||
parened: definition.parened,
|
||||
type_,
|
||||
value,
|
||||
span: definition.span.clone(),
|
||||
|
@ -48,7 +48,7 @@ impl Importer {
|
||||
let pretty_package = package.join(".");
|
||||
|
||||
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,
|
||||
None => return Err(AstError::unresolved_import(pretty_package, &span).into()),
|
||||
};
|
||||
|
@ -286,7 +286,6 @@ pub trait ReconstructingReducer {
|
||||
Ok(DefinitionStatement {
|
||||
declaration_type: definition.declaration_type.clone(),
|
||||
variable_names,
|
||||
parened: definition.parened,
|
||||
type_,
|
||||
value,
|
||||
span: definition.span.clone(),
|
||||
|
@ -33,8 +33,6 @@ pub struct DefinitionStatement {
|
||||
pub declaration_type: Declare,
|
||||
/// The bindings / variable names to declare.
|
||||
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.
|
||||
pub type_: Option<Type>,
|
||||
/// An initializer value for the bindings.
|
||||
|
@ -295,14 +295,18 @@ impl ParserContext<'_> {
|
||||
let declare = self.expect_oneof(&[Token::Let, Token::Const])?;
|
||||
|
||||
// Parse variable names.
|
||||
let (variable_names, parened) = if self.peek_is_left_par() {
|
||||
(
|
||||
self.parse_paren_comma_list(|p| p.parse_variable_name(&declare).map(Some))
|
||||
.map(|(vars, ..)| vars)?,
|
||||
true,
|
||||
)
|
||||
let variable_names = if self.peek_is_left_par() {
|
||||
let vars = self
|
||||
.parse_paren_comma_list(|p| p.parse_variable_name(&declare).map(Some))
|
||||
.map(|(vars, ..)| vars)?;
|
||||
|
||||
if vars.len() == 1 {
|
||||
self.emit_err(ParserError::invalid_parens_around_single_variable(vars[0].span()));
|
||||
}
|
||||
|
||||
vars
|
||||
} else {
|
||||
(vec![self.parse_variable_name(&declare)?], false)
|
||||
vec![self.parse_variable_name(&declare)?]
|
||||
};
|
||||
|
||||
// Parse an optional type ascription.
|
||||
@ -323,7 +327,6 @@ impl ParserContext<'_> {
|
||||
_ => unreachable!("parse_definition_statement_ shouldn't produce this"),
|
||||
},
|
||||
variable_names,
|
||||
parened,
|
||||
type_,
|
||||
value: expr,
|
||||
})
|
||||
|
@ -75,6 +75,8 @@ impl ParserContext<'_> {
|
||||
})?;
|
||||
if dims.is_empty() && !had_item_err {
|
||||
self.emit_err(ParserError::array_tuple_dimensions_empty(&span));
|
||||
} else if dims.len() == 1 {
|
||||
self.emit_err(ParserError::invalid_parens_around_single_array_dimension_size(&span));
|
||||
}
|
||||
ArrayDimensions(dims.into())
|
||||
})
|
||||
|
@ -46,7 +46,7 @@ fn eat_identifier(input_tendril: &StrTendril) -> Option<StrTendril> {
|
||||
if input_tendril.is_empty() {
|
||||
return None;
|
||||
}
|
||||
let input = input_tendril[..].as_bytes();
|
||||
let input = input_tendril.as_bytes();
|
||||
|
||||
if !input[0].is_ascii_alphabetic() {
|
||||
return None;
|
||||
@ -73,7 +73,7 @@ impl Token {
|
||||
|
||||
if escaped {
|
||||
let string = input_tendril.to_string();
|
||||
let escaped = &string[1..string.len()];
|
||||
let escaped = &string[1..input_tendril.len()];
|
||||
|
||||
if escaped.len() != 1 {
|
||||
return Err(ParserError::lexer_escaped_char_incorrect_length(escaped).into());
|
||||
@ -115,7 +115,9 @@ impl Token {
|
||||
|
||||
if unicode {
|
||||
let string = input_tendril.to_string();
|
||||
if string.find('}').is_none() {
|
||||
if string.find('{').is_none() {
|
||||
return Err(ParserError::lexer_unopened_escaped_unicode_char(string).into());
|
||||
} else if string.find('}').is_none() {
|
||||
return Err(ParserError::lexer_unclosed_escaped_unicode_char(string).into());
|
||||
}
|
||||
|
||||
@ -156,7 +158,7 @@ impl Token {
|
||||
if input_tendril.is_empty() {
|
||||
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() {
|
||||
return Err(ParserError::lexer_eat_integer_leading_zero(String::from_utf8_lossy(input)).into());
|
||||
}
|
||||
@ -164,7 +166,10 @@ impl Token {
|
||||
|
||||
while i < input.len() {
|
||||
if i == 1 && input[0] == b'0' && input[i] == b'x' {
|
||||
return Err(ParserError::lexer_hex_number_provided(&input_tendril[0..3]).into());
|
||||
return Err(ParserError::lexer_hex_number_provided(
|
||||
&input_tendril[0..input_tendril.find('\n').unwrap_or(i) + 1],
|
||||
)
|
||||
.into());
|
||||
}
|
||||
if !input[i].is_ascii_digit() {
|
||||
break;
|
||||
@ -175,7 +180,7 @@ impl Token {
|
||||
Ok((i, Token::Int(input_tendril.subtendril(0, i as u32))))
|
||||
}
|
||||
|
||||
/// Returns the number of bytes in an emoji via a bit mask.
|
||||
/// Returns the number of bytes in an utf-8 encoding that starts with this byte.
|
||||
fn utf8_byte_count(byte: u8) -> usize {
|
||||
let mut mask = 0x80;
|
||||
let mut result = 0;
|
||||
@ -200,7 +205,7 @@ impl Token {
|
||||
if input_tendril.is_empty() {
|
||||
return Err(ParserError::lexer_empty_input_tendril().into());
|
||||
}
|
||||
let input = input_tendril[..].as_bytes();
|
||||
let input = input_tendril.as_bytes();
|
||||
match input[0] {
|
||||
x if x.is_ascii_whitespace() => return Ok((1, Token::WhiteSpace)),
|
||||
b'"' => {
|
||||
@ -215,10 +220,19 @@ impl Token {
|
||||
let mut string = Vec::new();
|
||||
|
||||
while i < input.len() {
|
||||
// If it's an emoji get the length.
|
||||
// Get the length of the utf-8 encoding here
|
||||
// and position i at the last byte.
|
||||
if input[i] & 0x80 > 0 {
|
||||
len = Self::utf8_byte_count(input[i]);
|
||||
i += len - 1;
|
||||
i += len;
|
||||
|
||||
if unicode {
|
||||
return Err(
|
||||
ParserError::lexer_emoji_inside_escaped_unicode_char(&input_tendril[0..i]).into(),
|
||||
);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if !in_escape {
|
||||
@ -305,7 +319,9 @@ impl Token {
|
||||
break;
|
||||
} else if unicode_char {
|
||||
return Err(ParserError::lexer_invalid_char(
|
||||
&input_tendril[0..input_tendril[1..].find('\'').unwrap_or(i + 1)],
|
||||
// grab the contents of everything between the '' if possible.
|
||||
// else just show the character right before stuff went wrong.
|
||||
&input_tendril[0..input_tendril[1..].find('\'').unwrap_or(i - 1) + 1],
|
||||
)
|
||||
.into());
|
||||
} else if input[i] == b'\\' {
|
||||
@ -315,8 +331,11 @@ impl Token {
|
||||
if input[i] == b'x' {
|
||||
hex = true;
|
||||
} else if input[i] == b'u' {
|
||||
if input[i + 1] == b'{' {
|
||||
let one_ahead = input.get(i + 1);
|
||||
if matches!(one_ahead, Some(b'{')) {
|
||||
escaped_unicode = true;
|
||||
} else if one_ahead.is_some() {
|
||||
return Err(ParserError::lexer_expected_valid_escaped_char(input[i + 1]).into());
|
||||
} else {
|
||||
return Err(ParserError::lexer_expected_valid_escaped_char(input[i]).into());
|
||||
}
|
||||
|
@ -138,12 +138,4 @@ create_errors!(
|
||||
msg: "tuples of 1 element are not allowed",
|
||||
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,
|
||||
}
|
||||
);
|
||||
|
@ -366,4 +366,36 @@ create_errors!(
|
||||
msg: "A function received a self argument as not the first argument.",
|
||||
help: None,
|
||||
}
|
||||
|
||||
/// When a escaped unicode char was given but not opened.
|
||||
@backtraced
|
||||
lexer_unopened_escaped_unicode_char {
|
||||
args: (input: impl Display),
|
||||
msg: format!("There was no opening `{{` after starting an escaped unicode `{}`.", input),
|
||||
help: None,
|
||||
}
|
||||
|
||||
/// When a escaped unicode char has an emoji in it.
|
||||
@backtraced
|
||||
lexer_emoji_inside_escaped_unicode_char {
|
||||
args: (input: impl Display),
|
||||
msg: format!("There was an emoji found in the escaped unicode character: `{}`.", input),
|
||||
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,
|
||||
}
|
||||
|
||||
/// For when a user puts parens around a single defined variable.
|
||||
@formatted
|
||||
invalid_parens_around_single_array_dimension_size {
|
||||
args: (),
|
||||
msg: "do not put parens around single dimension array size",
|
||||
help: None,
|
||||
}
|
||||
);
|
||||
|
@ -45,27 +45,6 @@ outputs:
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "[0; 1]"
|
||||
- ArrayInit:
|
||||
element:
|
||||
Value:
|
||||
Implicit:
|
||||
- "0"
|
||||
- span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 2
|
||||
col_stop: 3
|
||||
path: ""
|
||||
content: "[0; (1)]"
|
||||
dimensions:
|
||||
- value: "1"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 9
|
||||
path: ""
|
||||
content: "[0; (1)]"
|
||||
- ArrayInit:
|
||||
element:
|
||||
Value:
|
||||
|
@ -5,3 +5,4 @@ outputs:
|
||||
- "Error [EPAR0370010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^"
|
||||
- "Error [EPAR0370010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^"
|
||||
- "Error [EPAR0370023]: Array dimensions specified as a tuple cannot be empty.\n --> test:1:5\n |\n 1 | [0; ()]\n | ^^"
|
||||
- "Error [EPAR0370045]: do not put parens around single dimension array size\n --> test:1:5\n |\n 1 | [0; (1)]\n | ^^^"
|
||||
|
@ -89,49 +89,6 @@ outputs:
|
||||
col_stop: 13
|
||||
path: ""
|
||||
content: "[0; 1].len()"
|
||||
- Call:
|
||||
function:
|
||||
Access:
|
||||
Member:
|
||||
inner:
|
||||
ArrayInit:
|
||||
element:
|
||||
Value:
|
||||
Implicit:
|
||||
- "0"
|
||||
- span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 2
|
||||
col_stop: 3
|
||||
path: ""
|
||||
content: "[0; (1)].len()"
|
||||
dimensions:
|
||||
- value: "1"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 9
|
||||
path: ""
|
||||
content: "[0; (1)].len()"
|
||||
name: "{\"name\":\"len\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"[0; (1)].len()\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 13
|
||||
path: ""
|
||||
content: "[0; (1)].len()"
|
||||
type_: ~
|
||||
arguments: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: "[0; (1)].len()"
|
||||
- Call:
|
||||
function:
|
||||
Access:
|
||||
|
@ -26,17 +26,19 @@ outputs:
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `9`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `*`."
|
||||
- "Error [EPAR0370035]: Could not lex the following escaped hex due to being given more than two chars: ``."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `117`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `39`."
|
||||
- "Error [EPAR0370038]: The escaped unicode char `bbbbb}\\u{aaaa` is not within valid length of [1, 6]."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `117`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `117`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `117`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `122`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `49`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `49`."
|
||||
- "Error [EPAR0370037]: There was no closing `}` after a escaped unicode `\\u{2764z`."
|
||||
- "Error [EPAR0370028]: Expected a closed char but found `\\u{276g}`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `117`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `117`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `117`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `48`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `48`."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `57`."
|
||||
- "Error [EPAR0370039]: The escaped unicode char `110000` is greater than 0x10FFFF."
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `125`."
|
||||
- "Error [EPAR0370037]: There was no closing `}` after a escaped unicode `\\u{af🦀`."
|
||||
- "Error [EPAR0370029]: Expected valid character but found `'🦀\\`."
|
||||
- "Error [EPAR0370029]: Expected valid character but found `'🦀\\n`."
|
||||
- "Error [EPAR0370029]: Expected valid character but found `'🦀1🦀`."
|
||||
- "Error [EPAR0370029]: Expected valid character but found `'😭😂`."
|
||||
|
@ -1,565 +1,55 @@
|
||||
---
|
||||
namespace: ParseExpression
|
||||
namespace: Token
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 97
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 4
|
||||
path: ""
|
||||
content: "'a'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 90
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 4
|
||||
path: ""
|
||||
content: "'Z'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 34
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: "'\\\"'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 9
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: "'\\t'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 13
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: "'\\r'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 0
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: "'\\0'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 15
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: "'\\u{F}'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 57359
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: "''"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 229
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 9
|
||||
path: ""
|
||||
content: "'\\u{E5}'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 229
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: "'å'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 1248
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "'\\u{4e0}'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 1248
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: "'Ӡ'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 10084
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 11
|
||||
path: ""
|
||||
content: "'\\u{2764}'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 10084
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: "'❤'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 128546
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "'\\u{1F622}'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 128557
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'😭'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 1048607
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 13
|
||||
path: ""
|
||||
content: "'\\u{10001F}'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 42
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x2A'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 127
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x7f'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 0
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x00'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 1
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x01'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 2
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x02'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 3
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x03'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 4
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x04'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 5
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x05'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 6
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x06'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 7
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x07'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 16
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x10'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 17
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x11'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 18
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x12'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 19
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x13'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 20
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x14'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 21
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x15'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 22
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x16'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 23
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x17'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 32
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x20'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 33
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x21'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 34
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x22'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 35
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x23'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 36
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x24'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 37
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x25'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 38
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x26'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 39
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x27'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 48
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x30'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 49
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x31'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 50
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x32'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 51
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x33'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 52
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x34'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 53
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x35'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 54
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x36'"
|
||||
- Value:
|
||||
Char:
|
||||
character:
|
||||
Scalar: 55
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "'\\x37'"
|
||||
- "'a' @ 1:1-4"
|
||||
- "'Z' @ 1:1-4"
|
||||
- "'\"' @ 1:1-5"
|
||||
- "'' @ 1:1-5"
|
||||
- "'' @ 1:1-5"
|
||||
- "'\u0000' @ 1:1-5"
|
||||
- "'\u000f' @ 1:1-8"
|
||||
- "'' @ 1:1-6"
|
||||
- "'å' @ 1:1-9"
|
||||
- "'å' @ 1:1-5"
|
||||
- "'Ӡ' @ 1:1-10"
|
||||
- "'Ӡ' @ 1:1-5"
|
||||
- "'❤' @ 1:1-11"
|
||||
- "'❤' @ 1:1-6"
|
||||
- "'😢' @ 1:1-12"
|
||||
- "'😭' @ 1:1-7"
|
||||
- "'' @ 1:1-13"
|
||||
- "'*' @ 1:1-7"
|
||||
- "'\u007f' @ 1:1-7"
|
||||
- "'\u0000' @ 1:1-7"
|
||||
- "'\u0001' @ 1:1-7"
|
||||
- "'\u0002' @ 1:1-7"
|
||||
- "'\u0003' @ 1:1-7"
|
||||
- "'\u0004' @ 1:1-7"
|
||||
- "'\u0005' @ 1:1-7"
|
||||
- "'\u0006' @ 1:1-7"
|
||||
- "'\u0007' @ 1:1-7"
|
||||
- "'\u0010' @ 1:1-7"
|
||||
- "'\u0011' @ 1:1-7"
|
||||
- "'\u0012' @ 1:1-7"
|
||||
- "'\u0013' @ 1:1-7"
|
||||
- "'\u0014' @ 1:1-7"
|
||||
- "'\u0015' @ 1:1-7"
|
||||
- "'\u0016' @ 1:1-7"
|
||||
- "'\u0017' @ 1:1-7"
|
||||
- "'' @ 1:1-7"
|
||||
- "'!' @ 1:1-7"
|
||||
- "'\"' @ 1:1-7"
|
||||
- "'#' @ 1:1-7"
|
||||
- "'$' @ 1:1-7"
|
||||
- "'%' @ 1:1-7"
|
||||
- "'&' @ 1:1-7"
|
||||
- "''' @ 1:1-7"
|
||||
- "'0' @ 1:1-7"
|
||||
- "'1' @ 1:1-7"
|
||||
- "'2' @ 1:1-7"
|
||||
- "'3' @ 1:1-7"
|
||||
- "'4' @ 1:1-7"
|
||||
- "'5' @ 1:1-7"
|
||||
- "'6' @ 1:1-7"
|
||||
- "'7' @ 1:1-7"
|
||||
|
@ -15,5 +15,5 @@ outputs:
|
||||
- "'\"\n\"' @ 1:1-7"
|
||||
- "'\"\u007f\"' @ 1:1-7"
|
||||
- "'\"aa \\ \" \n aa \t \r \u0000\"' @ 1:1-28"
|
||||
- "'\"test 😒€\"' @ 1:1-15"
|
||||
- "'\"😭😂😘\"' @ 1:1-15"
|
||||
- "'\"test \"' @ 1:1-15"
|
||||
- "'\"\"' @ 1:1-15"
|
||||
|
@ -9,3 +9,5 @@ outputs:
|
||||
- "Error [EPAR0370027]: Expected a closed string but found `\"\\u\"`."
|
||||
- "Error [EPAR0370036]: Expected a valid hex character but found `255`."
|
||||
- "Error [EPAR0370027]: Expected a closed string but found `\"\\x\"`."
|
||||
- "Error [EPAR0370042]: There was no opening `{` after starting an escaped unicode `\\u}`."
|
||||
- "Error [EPAR0370043]: There was an emoji found in the escaped unicode character: `\"\\u6🦀`."
|
||||
|
@ -177,8 +177,6 @@ outputs:
|
||||
- Scalar: 115
|
||||
- Scalar: 116
|
||||
- Scalar: 32
|
||||
- Scalar: 128530
|
||||
- Scalar: 8364
|
||||
- span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
@ -188,9 +186,7 @@ outputs:
|
||||
content: "\"test 😒€\""
|
||||
- Value:
|
||||
String:
|
||||
- - Scalar: 128557
|
||||
- Scalar: 128514
|
||||
- Scalar: 128536
|
||||
- []
|
||||
- span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370032]: Could not lex the following content: `\\`."
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370032]: Could not lex the following content: `$`."
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370032]: Could not lex the following content: `\\1u8`."
|
5
tests/expectations/parser/parser/program/hex_eof.leo.out
Normal file
5
tests/expectations/parser/parser/program/hex_eof.leo.out
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370040]: A hex number `0x..` was provided but hex is not allowed."
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370032]: Could not lex the following content: `|`."
|
5
tests/expectations/parser/parser/program/q_eof.leo.out
Normal file
5
tests/expectations/parser/parser/program/q_eof.leo.out
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370027]: Expected a closed string but found `\"`."
|
5
tests/expectations/parser/parser/program/sq_eof.leo.out
Normal file
5
tests/expectations/parser/parser/program/sq_eof.leo.out
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370028]: Expected a closed char but found `'`."
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370032]: Could not lex the following content: `~`."
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370026]: Expected a valid escape character but found `117`."
|
@ -95,7 +95,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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;\\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -107,7 +106,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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; \\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -119,7 +117,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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; \\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -131,7 +128,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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; \\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -143,7 +139,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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; \\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -294,7 +289,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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); \\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
@ -318,7 +312,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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);\\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
@ -342,7 +335,6 @@ outputs:
|
||||
variable_names:
|
||||
- mutable: true
|
||||
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_: ~
|
||||
value:
|
||||
Binary:
|
||||
@ -376,7 +368,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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; \\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -388,7 +379,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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;\\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -400,7 +390,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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;\\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -511,7 +500,6 @@ outputs:
|
||||
variable_names:
|
||||
- mutable: true
|
||||
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_:
|
||||
Array:
|
||||
- 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:
|
||||
- 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);\\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Call:
|
||||
@ -652,7 +639,6 @@ outputs:
|
||||
variable_names:
|
||||
- mutable: true
|
||||
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_: ~
|
||||
value:
|
||||
Call:
|
||||
@ -669,7 +655,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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);\\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Call:
|
||||
|
@ -56,7 +56,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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\\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -68,7 +67,6 @@ outputs:
|
||||
variable_names:
|
||||
- mutable: 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_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -78,7 +76,6 @@ outputs:
|
||||
variable_names:
|
||||
- mutable: true
|
||||
identifier: "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let processed = 0u8;\\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -106,7 +103,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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];\\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Access:
|
||||
@ -133,7 +129,6 @@ outputs:
|
||||
variable_names:
|
||||
- mutable: true
|
||||
identifier: "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":17,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let skipped = 0u8;\\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -145,7 +140,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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;\\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -157,7 +151,6 @@ outputs:
|
||||
variable_names:
|
||||
- mutable: true
|
||||
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_: ~
|
||||
value:
|
||||
Value:
|
||||
@ -423,10 +416,6 @@ outputs:
|
||||
arguments:
|
||||
- Value:
|
||||
String:
|
||||
- Scalar: 128512
|
||||
- Scalar: 128512
|
||||
- Scalar: 128512
|
||||
- Scalar: 128512
|
||||
- Scalar: 128512
|
||||
- Scalar: 32
|
||||
- Scalar: 32
|
||||
@ -437,12 +426,6 @@ outputs:
|
||||
- Scalar: 32
|
||||
- Scalar: 32
|
||||
- Scalar: 32
|
||||
- Scalar: 32
|
||||
- Scalar: 128512
|
||||
- Scalar: 128512
|
||||
- Scalar: 128512
|
||||
- Scalar: 128512
|
||||
- Scalar: 128512
|
||||
- Console:
|
||||
function:
|
||||
Assert:
|
||||
|
@ -64,7 +64,6 @@ outputs:
|
||||
variable_names:
|
||||
- mutable: true
|
||||
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
|
||||
value:
|
||||
Value:
|
||||
@ -144,7 +143,6 @@ outputs:
|
||||
variable_names:
|
||||
- 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);\\\"}\"}"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Call:
|
||||
|
@ -14,7 +14,6 @@ outputs:
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = expr;
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
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
|
||||
path: ""
|
||||
content: let x = ();
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
TupleInit:
|
||||
@ -68,7 +66,6 @@ outputs:
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = x+y;
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
@ -103,7 +100,6 @@ outputs:
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: "let x = (x,y);"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
TupleInit:
|
||||
@ -136,7 +132,6 @@ outputs:
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = x();
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Call:
|
||||
@ -169,7 +164,6 @@ outputs:
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: const x = expr;
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
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
|
||||
path: ""
|
||||
content: const x = ();
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
TupleInit:
|
||||
@ -223,7 +216,6 @@ outputs:
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: const x = x+y;
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
@ -258,7 +250,6 @@ outputs:
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: "const x = (x,y);"
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
TupleInit:
|
||||
@ -291,7 +282,6 @@ outputs:
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: const x = x();
|
||||
parened: false
|
||||
type_: ~
|
||||
value:
|
||||
Call:
|
||||
@ -324,7 +314,6 @@ outputs:
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: "let x: u32 = expr;"
|
||||
parened: false
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -348,7 +337,6 @@ outputs:
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: "let x: u32 = ();"
|
||||
parened: false
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -380,7 +368,6 @@ outputs:
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: "let x: u32 = x+y;"
|
||||
parened: false
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -416,7 +403,6 @@ outputs:
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: "let x: u32 = (x,y);"
|
||||
parened: false
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -450,7 +436,6 @@ outputs:
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: "let x: u32 = x();"
|
||||
parened: false
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -484,7 +469,6 @@ outputs:
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: "const x: u32 = expr;"
|
||||
parened: false
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -508,7 +492,6 @@ outputs:
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: "const x: u32 = ();"
|
||||
parened: false
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -540,7 +523,6 @@ outputs:
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: "const x: u32 = x+y;"
|
||||
parened: false
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -576,7 +558,6 @@ outputs:
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: "const x: u32 = (x,y);"
|
||||
parened: false
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -610,7 +591,6 @@ outputs:
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: "const x: u32 = x();"
|
||||
parened: false
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -653,7 +633,6 @@ outputs:
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "let (x, y) = expr;"
|
||||
parened: true
|
||||
type_: ~
|
||||
value:
|
||||
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
|
||||
path: ""
|
||||
content: "let (x, y) = ();"
|
||||
parened: true
|
||||
type_: ~
|
||||
value:
|
||||
TupleInit:
|
||||
@ -725,7 +703,6 @@ outputs:
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "let (x, y) = x+y;"
|
||||
parened: true
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
@ -769,7 +746,6 @@ outputs:
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "let (x, y) = (x,y);"
|
||||
parened: true
|
||||
type_: ~
|
||||
value:
|
||||
TupleInit:
|
||||
@ -811,7 +787,6 @@ outputs:
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "let (x, y) = x();"
|
||||
parened: true
|
||||
type_: ~
|
||||
value:
|
||||
Call:
|
||||
@ -853,7 +828,6 @@ outputs:
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "const (x, y) = expr;"
|
||||
parened: true
|
||||
type_: ~
|
||||
value:
|
||||
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
|
||||
path: ""
|
||||
content: "const (x, y) = ();"
|
||||
parened: true
|
||||
type_: ~
|
||||
value:
|
||||
TupleInit:
|
||||
@ -925,7 +898,6 @@ outputs:
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "const (x, y) = x+y;"
|
||||
parened: true
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
@ -969,7 +941,6 @@ outputs:
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "const (x, y) = (x,y);"
|
||||
parened: true
|
||||
type_: ~
|
||||
value:
|
||||
TupleInit:
|
||||
@ -1011,7 +982,6 @@ outputs:
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "const (x, y) = x();"
|
||||
parened: true
|
||||
type_: ~
|
||||
value:
|
||||
Call:
|
||||
@ -1053,7 +1023,6 @@ outputs:
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "let (x, y): u32 = expr;"
|
||||
parened: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -1086,7 +1055,6 @@ outputs:
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "let (x, y): u32 = ();"
|
||||
parened: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -1127,7 +1095,6 @@ outputs:
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "let (x, y): u32 = x+y;"
|
||||
parened: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -1172,7 +1139,6 @@ outputs:
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "let (x, y): u32 = (x,y);"
|
||||
parened: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -1215,7 +1181,6 @@ outputs:
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "let (x, y): u32 = x();"
|
||||
parened: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -1258,7 +1223,6 @@ outputs:
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "const (x, y): u32 = expr;"
|
||||
parened: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -1291,7 +1255,6 @@ outputs:
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "const (x, y): u32 = ();"
|
||||
parened: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -1332,7 +1295,6 @@ outputs:
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "const (x, y): u32 = x+y;"
|
||||
parened: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -1377,7 +1339,6 @@ outputs:
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "const (x, y): u32 = (x,y);"
|
||||
parened: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -1420,7 +1381,6 @@ outputs:
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "const (x, y): u32 = x();"
|
||||
parened: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
value:
|
||||
@ -1463,7 +1423,6 @@ outputs:
|
||||
col_stop: 9
|
||||
path: ""
|
||||
content: "let (x,y,) = ();"
|
||||
parened: true
|
||||
type_: ~
|
||||
value:
|
||||
TupleInit:
|
||||
@ -1482,37 +1441,6 @@ outputs:
|
||||
col_stop: 16
|
||||
path: ""
|
||||
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:
|
||||
declaration_type: Let
|
||||
variable_names:
|
||||
@ -1525,7 +1453,6 @@ outputs:
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: "let x: [[u8; 2]; 2] = [[0,0], [0,0]];"
|
||||
parened: false
|
||||
type_:
|
||||
Array:
|
||||
- Array:
|
||||
|
@ -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: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 [EPAR0370044]: do not put parens around single variable names\n --> test:1:6\n |\n 1 | let (x) = ...;\n | ^\nError [EPAR0370009]: unexpected string: expected 'expression', got '...'\n --> test:1:11\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 | ^\nError [EPAR0370009]: unexpected string: expected 'expression', got '...'\n --> test:1:12\n |\n 1 | let (x,) = ...;\n | ^^^"
|
||||
|
@ -2,6 +2,6 @@
|
||||
namespace: ParseStatement
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370040]: A hex number `0x4..` was provided but hex is not allowed."
|
||||
- "Error [EPAR0370040]: A hex number `0xA..` was provided but hex is not allowed."
|
||||
- "Error [EPAR0370040]: A hex number `0xF..` was provided but hex is not allowed."
|
||||
- "Error [EPAR0370040]: A hex number `0x..` was provided but hex is not allowed."
|
||||
- "Error [EPAR0370040]: A hex number `0x..` was provided but hex is not allowed."
|
||||
- "Error [EPAR0370040]: A hex number `0x..` was provided but hex is not allowed."
|
||||
|
@ -3,3 +3,48 @@ namespace: ParseStatement
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ';'\n --> test:1:1\n |\n 1 | ; x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '.'\n --> test:1:1\n |\n 1 | . x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'import'\n --> test:1:1\n |\n 1 | import x = 10u8;\n | ^^^^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:1\n |\n 1 | , x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected , -- got '='\n --> test:1:5\n |\n 1 | [ x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ']'\n --> test:1:1\n |\n 1 | ] x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370003]: unexpected EOF\n --> test:1:11\n |\n 1 | { x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '}'\n --> test:1:1\n |\n 1 | } x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ) -- got '='\n --> test:1:5\n |\n 1 | ( x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ')'\n --> test:1:1\n |\n 1 | ) x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ':'\n --> test:1:1\n |\n 1 | : x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '::'\n --> test:1:1\n |\n 1 | :: x = 10u8;\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '?'\n --> test:1:1\n |\n 1 | ? x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '_'\n --> test:1:1\n |\n 1 | _ x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '='\n --> test:1:1\n |\n 1 | = x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '=='\n --> test:1:1\n |\n 1 | == x = 10u8;\n | ^^"
|
||||
- "Error [EPAR0370011]: invalid assignment target\n --> test:1:1\n |\n 1 | ! x = 10u8;\n | ^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '!='\n --> test:1:1\n |\n 1 | != x = 10u8;\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '>'\n --> test:1:1\n |\n 1 | > x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '>='\n --> test:1:1\n |\n 1 | >= x = 10u8;\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '<'\n --> test:1:1\n |\n 1 | < x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '<='\n --> test:1:1\n |\n 1 | <= x = 10u8;\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '>'\n --> test:1:1\n |\n 1 | > x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '..'\n --> test:1:1\n |\n 1 | .. x = 10u8;\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'as'\n --> test:1:1\n |\n 1 | as x = 10u8;\n | ^^"
|
||||
- "Error [EPAR0370005]: expected . -- got 'x'\n --> test:1:9\n |\n 1 | console x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected in -- got '='\n --> test:1:7\n |\n 1 | for x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected { -- got '='\n --> test:1:6\n |\n 1 | if x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'else'\n --> test:1:1\n |\n 1 | else x = 10u8;\n | ^^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:4\n |\n 1 | i8 x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:5\n |\n 1 | i16 x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:5\n |\n 1 | i32 x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:5\n |\n 1 | i64 x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:6\n |\n 1 | i128 x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:4\n |\n 1 | u8 x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:5\n |\n 1 | u16 x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:5\n |\n 1 | u32 x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:5\n |\n 1 | u64 x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:6\n |\n 1 | u128 x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '&'\n --> test:1:1\n |\n 1 | & x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '='\n --> test:1:10\n |\n 1 | return x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:6\n |\n 1 | self x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:6\n |\n 1 | Self x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:6\n |\n 1 | true x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:7\n |\n 1 | false x = 10u8;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'x'\n --> test:1:3\n |\n 1 | 0 x = 10u8;\n | ^"
|
||||
|
@ -3,3 +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 [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_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 | ^"
|
||||
|
@ -3,3 +3,54 @@ namespace: ParseStatement
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ';'\n --> test:1:4\n |\n 1 | x::;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '.'\n --> test:1:4\n |\n 1 | x::.\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'import'\n --> test:1:4\n |\n 1 | x::import\n | ^^^^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:4\n |\n 1 | x::,\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '*'\n --> test:1:4\n |\n 1 | x::*\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '+'\n --> test:1:4\n |\n 1 | x::+\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '-'\n --> test:1:4\n |\n 1 | x::-\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '/'\n --> test:1:4\n |\n 1 | x::/\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '['\n --> test:1:4\n |\n 1 | x::[\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ']'\n --> test:1:4\n |\n 1 | x::]\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '{'\n --> test:1:4\n |\n 1 | x::{\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '}'\n --> test:1:4\n |\n 1 | x::}\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '('\n --> test:1:4\n |\n 1 | x::(\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ')'\n --> test:1:4\n |\n 1 | x::)\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ':'\n --> test:1:4\n |\n 1 | x:::\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '::'\n --> test:1:4\n |\n 1 | x::::\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '?'\n --> test:1:4\n |\n 1 | x::?\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '_'\n --> test:1:4\n |\n 1 | x::_\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '='\n --> test:1:4\n |\n 1 | x::=\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '=='\n --> test:1:4\n |\n 1 | x::==\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '!'\n --> test:1:4\n |\n 1 | x::!\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '!='\n --> test:1:4\n |\n 1 | x::!=\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '>'\n --> test:1:4\n |\n 1 | x::>\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '>='\n --> test:1:4\n |\n 1 | x::>=\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '<'\n --> test:1:4\n |\n 1 | x::<\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '<='\n --> test:1:4\n |\n 1 | x::<=\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '>'\n --> test:1:4\n |\n 1 | x::>\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '..'\n --> test:1:4\n |\n 1 | x::..\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'as'\n --> test:1:4\n |\n 1 | x::as\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'console'\n --> test:1:4\n |\n 1 | x::console\n | ^^^^^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'const'\n --> test:1:4\n |\n 1 | x::const\n | ^^^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'let'\n --> test:1:4\n |\n 1 | x::let\n | ^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'for'\n --> test:1:4\n |\n 1 | x::for\n | ^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'if'\n --> test:1:4\n |\n 1 | x::if\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'else'\n --> test:1:4\n |\n 1 | x::else\n | ^^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'i8'\n --> test:1:4\n |\n 1 | x::i8\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'i16'\n --> test:1:4\n |\n 1 | x::i16\n | ^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'i32'\n --> test:1:4\n |\n 1 | x::i32\n | ^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'i64'\n --> test:1:4\n |\n 1 | x::i64\n | ^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'i128'\n --> test:1:4\n |\n 1 | x::i128\n | ^^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'u8'\n --> test:1:4\n |\n 1 | x::u8\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'u16'\n --> test:1:4\n |\n 1 | x::u16\n | ^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'u32'\n --> test:1:4\n |\n 1 | x::u32\n | ^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'u64'\n --> test:1:4\n |\n 1 | x::u64\n | ^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'u128'\n --> test:1:4\n |\n 1 | x::u128\n | ^^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '&'\n --> test:1:4\n |\n 1 | x::&\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'return'\n --> test:1:4\n |\n 1 | x::return\n | ^^^^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'self'\n --> test:1:4\n |\n 1 | x::self\n | ^^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'Self'\n --> test:1:4\n |\n 1 | x::Self\n | ^^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'true'\n --> test:1:4\n |\n 1 | x::true\n | ^^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'false'\n --> test:1:4\n |\n 1 | x::false\n | ^^^^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '0'\n --> test:1:4\n |\n 1 | x::0\n | ^"
|
||||
|
@ -0,0 +1,59 @@
|
||||
---
|
||||
namespace: ParseStatement
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "did not consume all input: 'b' @ 1:13-14\n';' @ 1:14-15\n"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'import'\n --> test:1:11\n |\n 1 | let x = a import b;\n | ^^^^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got ','\n --> test:1:11\n |\n 1 | let x = a , b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ] -- got ';'\n --> test:1:14\n |\n 1 | let x = a [ b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got ']'\n --> test:1:11\n |\n 1 | let x = a ] b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected } -- got ';'\n --> test:1:14\n |\n 1 | let x = a { b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '}'\n --> test:1:11\n |\n 1 | let x = a } b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ) -- got ';'\n --> test:1:14\n |\n 1 | let x = a ( b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got ')'\n --> test:1:11\n |\n 1 | let x = a ) b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got ':'\n --> test:1:11\n |\n 1 | let x = a : b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected : -- got ';'\n --> test:1:14\n |\n 1 | let x = a ? b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '_'\n --> test:1:11\n |\n 1 | let x = a _ b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '='\n --> test:1:11\n |\n 1 | let x = a = b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '!'\n --> test:1:11\n |\n 1 | let x = a ! b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '..'\n --> test:1:11\n |\n 1 | let x = a .. b;\n | ^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'console'\n --> test:1:11\n |\n 1 | let x = a console b;\n | ^^^^^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'const'\n --> test:1:11\n |\n 1 | let x = a const b;\n | ^^^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'let'\n --> test:1:11\n |\n 1 | let x = a let b;\n | ^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'for'\n --> test:1:11\n |\n 1 | let x = a for b;\n | ^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'if'\n --> test:1:11\n |\n 1 | let x = a if b;\n | ^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'else'\n --> test:1:11\n |\n 1 | let x = a else b;\n | ^^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'i8'\n --> test:1:11\n |\n 1 | let x = a i8 b;\n | ^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'i16'\n --> test:1:11\n |\n 1 | let x = a i16 b;\n | ^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'i32'\n --> test:1:11\n |\n 1 | let x = a i32 b;\n | ^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'i64'\n --> test:1:11\n |\n 1 | let x = a i64 b;\n | ^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'i128'\n --> test:1:11\n |\n 1 | let x = a i128 b;\n | ^^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'u8'\n --> test:1:11\n |\n 1 | let x = a u8 b;\n | ^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'u16'\n --> test:1:11\n |\n 1 | let x = a u16 b;\n | ^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'u32'\n --> test:1:11\n |\n 1 | let x = a u32 b;\n | ^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'u64'\n --> test:1:11\n |\n 1 | let x = a u64 b;\n | ^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'u128'\n --> test:1:11\n |\n 1 | let x = a u128 b;\n | ^^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '&'\n --> test:1:11\n |\n 1 | let x = a & b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'return'\n --> test:1:11\n |\n 1 | let x = a return b;\n | ^^^^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'self'\n --> test:1:11\n |\n 1 | let x = a self b;\n | ^^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'Self'\n --> test:1:11\n |\n 1 | let x = a Self b;\n | ^^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'true'\n --> test:1:11\n |\n 1 | let x = a true b;\n | ^^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got 'false'\n --> test:1:11\n |\n 1 | let x = a false b;\n | ^^^^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '0'\n --> test:1:11\n |\n 1 | let x = a 0 b;\n | ^"
|
||||
- "did not consume all input: '=' @ 1:3-4\n'b' @ 1:4-5\n';' @ 1:5-6\n"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '='\n --> test:1:3\n |\n 1 | x.=b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got ','\n --> test:1:2\n |\n 1 | x,=b; // 43\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '='\n --> test:1:3\n |\n 1 | x[=b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got ']'\n --> test:1:2\n |\n 1 | x]=b;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got '='\n --> test:1:3\n |\n 1 | x{=b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '}'\n --> test:1:2\n |\n 1 | x}=b;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ';'\n --> test:1:4\n |\n 1 | x=(;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ')'\n --> test:1:3\n |\n 1 | x=);\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ':'\n --> test:1:3\n |\n 1 | x=:;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '::'\n --> test:1:3\n |\n 1 | x=::;\n | ^^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '='\n --> test:1:3\n |\n 1 | x?=b;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '='\n --> test:1:4\n |\n 1 | x!==b;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '='\n --> test:1:4\n |\n 1 | x>==b;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '='\n --> test:1:4\n |\n 1 | x<==b;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '..'\n --> test:1:2\n |\n 1 | x..=b;\n | ^^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '&'\n --> test:1:2\n |\n 1 | x&=b;\n | ^"
|
@ -0,0 +1,978 @@
|
||||
---
|
||||
namespace: ParseStatement
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- 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 = a . b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = a . b;
|
||||
type_: ~
|
||||
value:
|
||||
Access:
|
||||
Member:
|
||||
inner:
|
||||
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a . b;\\\"}\"}"
|
||||
name: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a . b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 9
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = a . b;
|
||||
type_: ~
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = a . b;
|
||||
- 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 = a :: b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: "let x = a :: b;"
|
||||
type_: ~
|
||||
value:
|
||||
Access:
|
||||
Static:
|
||||
inner:
|
||||
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a :: b;\\\"}\"}"
|
||||
name: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a :: b;\\\"}\"}"
|
||||
type_: ~
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 9
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: "let x = a :: b;"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: "let x = a :: b;"
|
||||
- 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 = a == b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = a == b;
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
left:
|
||||
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a == b;\\\"}\"}"
|
||||
right:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a == b;\\\"}\"}"
|
||||
op: Eq
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 9
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: let x = a == b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: let x = a == b;
|
||||
- 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 = a != b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = a != b;
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
left:
|
||||
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a != b;\\\"}\"}"
|
||||
right:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a != b;\\\"}\"}"
|
||||
op: Ne
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 9
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: let x = a != b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: let x = a != b;
|
||||
- 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 = a > b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = a > b;
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
left:
|
||||
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a > b;\\\"}\"}"
|
||||
right:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a > b;\\\"}\"}"
|
||||
op: Gt
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 9
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = a > b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = a > b;
|
||||
- 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 = a >= b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = a >= b;
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
left:
|
||||
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a >= b;\\\"}\"}"
|
||||
right:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a >= b;\\\"}\"}"
|
||||
op: Ge
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 9
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: let x = a >= b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: let x = a >= b;
|
||||
- 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 = a < b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = a < b;
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
left:
|
||||
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a < b;\\\"}\"}"
|
||||
right:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a < b;\\\"}\"}"
|
||||
op: Lt
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 9
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = a < b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = a < b;
|
||||
- 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 = a <= b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = a <= b;
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
left:
|
||||
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a <= b;\\\"}\"}"
|
||||
right:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a <= b;\\\"}\"}"
|
||||
op: Le
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 9
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: let x = a <= b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: let x = a <= b;
|
||||
- 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 = a > b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = a > b;
|
||||
type_: ~
|
||||
value:
|
||||
Binary:
|
||||
left:
|
||||
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a > b;\\\"}\"}"
|
||||
right:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a > b;\\\"}\"}"
|
||||
op: Gt
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 9
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = a > b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = a > b;
|
||||
- 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 = a as b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = a as b;
|
||||
type_: ~
|
||||
value:
|
||||
Cast:
|
||||
inner:
|
||||
Identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a as b;\\\"}\"}"
|
||||
target_type:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a as b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 9
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: let x = a as b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: let x = a as b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"ximport\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"ximport=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: ximport=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"ximport=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: ximport=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"x_\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x_=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 3
|
||||
path: ""
|
||||
content: x_=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x_=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: x_=b;
|
||||
- Expression:
|
||||
expression:
|
||||
Binary:
|
||||
left:
|
||||
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x==b;\\\"}\"}"
|
||||
right:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x==b;\\\"}\"}"
|
||||
op: Eq
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: x==b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: x==b;
|
||||
- Expression:
|
||||
expression:
|
||||
Binary:
|
||||
left:
|
||||
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x!=b;\\\"}\"}"
|
||||
right:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x!=b;\\\"}\"}"
|
||||
op: Ne
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: x!=b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: x!=b;
|
||||
- Expression:
|
||||
expression:
|
||||
Binary:
|
||||
left:
|
||||
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x>=b;\\\"}\"}"
|
||||
right:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x>=b;\\\"}\"}"
|
||||
op: Ge
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: x>=b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: x>=b;
|
||||
- Expression:
|
||||
expression:
|
||||
Binary:
|
||||
left:
|
||||
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x<=b;\\\"}\"}"
|
||||
right:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x<=b;\\\"}\"}"
|
||||
op: Le
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: x<=b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: x<=b;
|
||||
- Expression:
|
||||
expression:
|
||||
Binary:
|
||||
left:
|
||||
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x>=b;\\\"}\"}"
|
||||
right:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x>=b;\\\"}\"}"
|
||||
op: Ge
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: x>=b;
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: x>=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xas\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xas=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 4
|
||||
path: ""
|
||||
content: xas=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xas=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: xas=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xconsole\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xconsole=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 9
|
||||
path: ""
|
||||
content: xconsole=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xconsole=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 11
|
||||
path: ""
|
||||
content: xconsole=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xconst\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xconst=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: xconst=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xconst=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 9
|
||||
path: ""
|
||||
content: xconst=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xlet\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xlet=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: xlet=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xlet=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: xlet=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xfor\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xfor=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: xfor=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xfor=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: xfor=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xif\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xif=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 4
|
||||
path: ""
|
||||
content: xif=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xif=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: xif=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xelse\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xelse=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: xelse=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xelse=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: xelse=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xi8\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xi8=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 4
|
||||
path: ""
|
||||
content: xi8=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xi8=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: xi8=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xi16\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xi16=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: xi16=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xi16=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: xi16=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xi32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xi32=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: xi32=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xi32=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: xi32=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xi64\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xi64=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: xi64=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xi64=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: xi64=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xi128\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xi128=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: xi128=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xi128=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: xi128=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xu8\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xu8=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 4
|
||||
path: ""
|
||||
content: xu8=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xu8=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: xu8=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xu16\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xu16=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: xu16=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xu16=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: xu16=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xu32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xu32=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: xu32=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xu32=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: xu32=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xu64\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xu64=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: xu64=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xu64=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: xu64=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xu128\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xu128=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: xu128=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xu128=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: xu128=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xreturn\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xreturn=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: xreturn=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xreturn=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
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:
|
||||
identifier: "{\"name\":\"xtrue\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xtrue=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: xtrue=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xtrue=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 8
|
||||
path: ""
|
||||
content: xtrue=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"xfalse\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xfalse=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: xfalse=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"xfalse=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 9
|
||||
path: ""
|
||||
content: xfalse=b;
|
||||
- Assign:
|
||||
operation: Assign
|
||||
assignee:
|
||||
identifier: "{\"name\":\"x0\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x0=b;\\\"}\"}"
|
||||
accesses: []
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 3
|
||||
path: ""
|
||||
content: x0=b;
|
||||
value:
|
||||
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x0=b;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 5
|
||||
path: ""
|
||||
content: x0=b;
|
@ -0,0 +1,24 @@
|
||||
---
|
||||
namespace: ParseStatement
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "did not consume all input: ';' @ 1:11-12\n"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'int or ident', got ';'\n --> test:1:11\n |\n 1 | let x = a.;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got ','\n --> test:1:10\n |\n 1 | let x = a,;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ';'\n --> test:1:11\n |\n 1 | let x = a[;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got ']'\n --> test:1:10\n |\n 1 | let x = a];\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ';'\n --> test:1:11\n |\n 1 | let x = a{;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '}'\n --> test:1:10\n |\n 1 | let x = a};\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got ')'\n --> test:1:10\n |\n 1 | let x = a);\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got ':'\n --> test:1:10\n |\n 1 | let x = a:;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ';'\n --> test:1:11\n |\n 1 | let x = a?;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '='\n --> test:1:10\n |\n 1 | let x = a=;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ';'\n --> test:1:12\n |\n 1 | let x = a==;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '!'\n --> test:1:10\n |\n 1 | let x = a!;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ';'\n --> test:1:12\n |\n 1 | let x = a!=;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ';'\n --> test:1:11\n |\n 1 | let x = a>;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ';'\n --> test:1:12\n |\n 1 | let x = a>=;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ';'\n --> test:1:11\n |\n 1 | let x = a<;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ';'\n --> test:1:12\n |\n 1 | let x = a<=;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ';'\n --> test:1:11\n |\n 1 | let x = a>;\n | ^"
|
||||
- "Error [EPAR0370005]: expected ; -- got '..'\n --> test:1:10\n |\n 1 | let x = a..;\n | ^^"
|
@ -0,0 +1,573 @@
|
||||
---
|
||||
namespace: ParseStatement
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- Expression:
|
||||
expression:
|
||||
Value:
|
||||
Implicit:
|
||||
- ""
|
||||
- span:
|
||||
line_start: 0
|
||||
line_stop: 0
|
||||
col_start: 0
|
||||
col_stop: 0
|
||||
path: ""
|
||||
content: ""
|
||||
span:
|
||||
line_start: 0
|
||||
line_stop: 0
|
||||
col_start: 0
|
||||
col_stop: 0
|
||||
path: ""
|
||||
content: ""
|
||||
- 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 = aimport;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = aimport;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"aimport\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aimport;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 16
|
||||
path: ""
|
||||
content: let x = aimport;
|
||||
- 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 = a_;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = a_;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"a_\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a_;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 11
|
||||
path: ""
|
||||
content: let x = a_;
|
||||
- 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 = aas;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = aas;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"aas\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aas;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: let x = aas;
|
||||
- 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 = aconsole;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = aconsole;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"aconsole\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aconsole;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 17
|
||||
path: ""
|
||||
content: let x = aconsole;
|
||||
- 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 = aconst;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = aconst;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"aconst\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aconst;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: let x = aconst;
|
||||
- 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 = alet;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = alet;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"alet\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = alet;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 13
|
||||
path: ""
|
||||
content: let x = alet;
|
||||
- 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 = afor;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = afor;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"afor\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = afor;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 13
|
||||
path: ""
|
||||
content: let x = afor;
|
||||
- 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 = aif;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = aif;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"aif\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aif;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: let x = aif;
|
||||
- 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 = aelse;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = aelse;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"aelse\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aelse;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = aelse;
|
||||
- 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 = ai8;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = ai8;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"ai8\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai8;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: let x = ai8;
|
||||
- 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 = ai16;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = ai16;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"ai16\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai16;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 13
|
||||
path: ""
|
||||
content: let x = ai16;
|
||||
- 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 = ai32;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = ai32;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"ai32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai32;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 13
|
||||
path: ""
|
||||
content: let x = ai32;
|
||||
- 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 = ai64;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = ai64;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"ai64\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai64;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 13
|
||||
path: ""
|
||||
content: let x = ai64;
|
||||
- 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 = ai128;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = ai128;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"ai128\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = ai128;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = ai128;
|
||||
- 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 = au8;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = au8;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"au8\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au8;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: let x = au8;
|
||||
- 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 = au16;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = au16;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"au16\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au16;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 13
|
||||
path: ""
|
||||
content: let x = au16;
|
||||
- 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 = au32;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = au32;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"au32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au32;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 13
|
||||
path: ""
|
||||
content: let x = au32;
|
||||
- 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 = au64;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = au64;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"au64\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au64;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 13
|
||||
path: ""
|
||||
content: let x = au64;
|
||||
- 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 = au128;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = au128;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"au128\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = au128;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = au128;
|
||||
- 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 = areturn;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = areturn;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"areturn\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = areturn;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 16
|
||||
path: ""
|
||||
content: let x = areturn;
|
||||
- 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 = aself;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = aself;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"aself\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aself;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = aself;
|
||||
- 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 = aSelf;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = aSelf;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"aSelf\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = aSelf;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = aSelf;
|
||||
- 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 = atrue;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = atrue;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"atrue\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = atrue;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: let x = atrue;
|
||||
- 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 = afalse;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = afalse;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"afalse\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = afalse;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: let x = afalse;
|
||||
- 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 = a0;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 5
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: let x = a0;
|
||||
type_: ~
|
||||
value:
|
||||
Identifier: "{\"name\":\"a0\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"let x = a0;\\\"}\"}"
|
||||
span:
|
||||
line_start: 1
|
||||
line_stop: 1
|
||||
col_start: 1
|
||||
col_stop: 11
|
||||
path: ""
|
||||
content: let x = a0;
|
@ -7,8 +7,6 @@ expectation: Pass
|
||||
|
||||
[0; 1]
|
||||
|
||||
[0; (1)]
|
||||
|
||||
[0; (1, 2)]
|
||||
|
||||
[0; (1, 2,)]
|
||||
|
@ -9,3 +9,5 @@ expectation: Fail
|
||||
[...0; 1]
|
||||
|
||||
[0; ()]
|
||||
|
||||
[0; (1)]
|
@ -7,8 +7,6 @@ expectation: Pass
|
||||
|
||||
[0; 1].len()
|
||||
|
||||
[0; (1)].len()
|
||||
|
||||
[0; (1, 2)].len()
|
||||
|
||||
[0; (1, 2, 3)].len()
|
||||
|
@ -44,7 +44,9 @@ expectation: Fail
|
||||
'\u01000000'
|
||||
'\u9999999'
|
||||
'\u{110000}'
|
||||
'\u}'
|
||||
|
||||
'\u{af🦀'
|
||||
'🦀\n'
|
||||
|
||||
'🦀1🦀'
|
||||
'😭😂😘'
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
namespace: ParseExpression
|
||||
namespace: Token
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
|
@ -16,3 +16,7 @@ expectation: Fail
|
||||
"\xFF"
|
||||
|
||||
"\x"
|
||||
|
||||
"\u}"
|
||||
|
||||
"\u6🦀}"
|
9
tests/parser/program/backslash_eof.leo
Normal file
9
tests/parser/program/backslash_eof.leo
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() {
|
||||
let x = 1u8;
|
||||
}
|
||||
\
|
9
tests/parser/program/dollar_eof.leo
Normal file
9
tests/parser/program/dollar_eof.leo
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() {
|
||||
let x = 1u8;
|
||||
}
|
||||
$
|
9
tests/parser/program/escape_u8_eof.leo
Normal file
9
tests/parser/program/escape_u8_eof.leo
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() {
|
||||
let x = 1u8;
|
||||
}
|
||||
\1u8
|
6
tests/parser/program/hex_eof.leo
Normal file
6
tests/parser/program/hex_eof.leo
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() { let a = 0x
|
9
tests/parser/program/pipe_eof.leo
Normal file
9
tests/parser/program/pipe_eof.leo
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() {
|
||||
let x = 1u8;
|
||||
}
|
||||
|
|
9
tests/parser/program/q_eof.leo
Normal file
9
tests/parser/program/q_eof.leo
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() {
|
||||
let x = 1u8;
|
||||
}
|
||||
"
|
9
tests/parser/program/sq_eof.leo
Normal file
9
tests/parser/program/sq_eof.leo
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() {
|
||||
let x = 1u8;
|
||||
}
|
||||
'
|
9
tests/parser/program/tilde_eof.leo
Normal file
9
tests/parser/program/tilde_eof.leo
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() {
|
||||
let x = 1u8;
|
||||
}
|
||||
~
|
7
tests/parser/program/unclosed_unicode_eof_fail.leo
Normal file
7
tests/parser/program/unclosed_unicode_eof_fail.leo
Normal file
@ -0,0 +1,7 @@
|
||||
/*
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main(s1: [char; 13], s2: [char; 4]) -> bool {
|
||||
let d: char = '\u
|
@ -97,6 +97,4 @@ const (x, y): u32 = x();
|
||||
|
||||
let (x,y,) = ();
|
||||
|
||||
let (x,) = ();
|
||||
|
||||
let x: [[u8; 2]; 2] = [[0,0], [0,0]];
|
||||
|
@ -52,3 +52,7 @@ let (x,y,,) = ();
|
||||
let (,x,y) = ();
|
||||
|
||||
let (x,,y) = ();
|
||||
|
||||
let (x) = ...;
|
||||
|
||||
let (x,) = ...;
|
@ -4,50 +4,93 @@ expectation: Fail
|
||||
*/
|
||||
|
||||
; x = 10u8;
|
||||
|
||||
. x = 10u8;
|
||||
|
||||
import x = 10u8;
|
||||
|
||||
, x = 10u8;
|
||||
|
||||
[ x = 10u8;
|
||||
|
||||
] x = 10u8;
|
||||
|
||||
{ x = 10u8;
|
||||
|
||||
} x = 10u8;
|
||||
|
||||
( x = 10u8;
|
||||
|
||||
) x = 10u8;
|
||||
|
||||
: x = 10u8;
|
||||
|
||||
:: x = 10u8;
|
||||
|
||||
? x = 10u8;
|
||||
|
||||
_ x = 10u8;
|
||||
|
||||
= x = 10u8;
|
||||
|
||||
== x = 10u8;
|
||||
|
||||
! x = 10u8;
|
||||
|
||||
!= x = 10u8;
|
||||
|
||||
> x = 10u8;
|
||||
|
||||
>= x = 10u8;
|
||||
|
||||
< x = 10u8;
|
||||
|
||||
<= x = 10u8;
|
||||
|
||||
> x = 10u8;
|
||||
|
||||
.. x = 10u8;
|
||||
|
||||
as x = 10u8;
|
||||
|
||||
console x = 10u8;
|
||||
const x = 10u8;
|
||||
let x = 10u8;
|
||||
|
||||
for x = 10u8;
|
||||
|
||||
if x = 10u8;
|
||||
|
||||
else x = 10u8;
|
||||
|
||||
i8 x = 10u8;
|
||||
|
||||
i16 x = 10u8;
|
||||
|
||||
i32 x = 10u8;
|
||||
|
||||
i64 x = 10u8;
|
||||
|
||||
i128 x = 10u8;
|
||||
|
||||
u8 x = 10u8;
|
||||
|
||||
u16 x = 10u8;
|
||||
|
||||
u32 x = 10u8;
|
||||
|
||||
u64 x = 10u8;
|
||||
|
||||
u128 x = 10u8;
|
||||
|
||||
& x = 10u8;
|
||||
|
||||
return x = 10u8;
|
||||
|
||||
self x = 10u8;
|
||||
|
||||
Self x = 10u8;
|
||||
|
||||
true x = 10u8;
|
||||
|
||||
false x = 10u8;
|
||||
0 x = 10u8;
|
||||
|
||||
0 x = 10u8;
|
||||
|
@ -4,54 +4,105 @@ expectation: Fail
|
||||
*/
|
||||
|
||||
circuit ;
|
||||
|
||||
circuit .
|
||||
|
||||
circuit import
|
||||
|
||||
circuit ,
|
||||
|
||||
circuit *
|
||||
|
||||
circuit +
|
||||
|
||||
circuit -
|
||||
|
||||
circuit /
|
||||
|
||||
circuit [
|
||||
|
||||
circuit ]
|
||||
|
||||
circuit {
|
||||
|
||||
circuit }
|
||||
|
||||
circuit (
|
||||
|
||||
circuit )
|
||||
|
||||
circuit :
|
||||
|
||||
circuit ::
|
||||
|
||||
circuit ?
|
||||
|
||||
circuit _
|
||||
|
||||
circuit =
|
||||
|
||||
circuit ==
|
||||
|
||||
circuit !
|
||||
|
||||
circuit !=
|
||||
|
||||
circuit >
|
||||
|
||||
circuit >=
|
||||
|
||||
circuit <
|
||||
|
||||
circuit <=
|
||||
|
||||
circuit >
|
||||
|
||||
circuit ..
|
||||
|
||||
circuit as
|
||||
|
||||
circuit console
|
||||
|
||||
circuit const
|
||||
|
||||
circuit let
|
||||
|
||||
circuit for
|
||||
|
||||
circuit if
|
||||
|
||||
circuit else
|
||||
|
||||
circuit i8
|
||||
|
||||
circuit i16
|
||||
|
||||
circuit i32
|
||||
|
||||
circuit i64
|
||||
|
||||
circuit i128
|
||||
|
||||
circuit u8
|
||||
|
||||
circuit u16
|
||||
|
||||
circuit u32
|
||||
|
||||
circuit u64
|
||||
|
||||
circuit u128
|
||||
|
||||
circuit &
|
||||
|
||||
circuit return
|
||||
|
||||
circuit self
|
||||
|
||||
circuit Self
|
||||
|
||||
circuit true
|
||||
|
||||
circuit false
|
||||
|
||||
circuit 0
|
@ -4,54 +4,106 @@ expectation: Fail
|
||||
*/
|
||||
|
||||
x.-12
|
||||
|
||||
x.0_;
|
||||
|
||||
x.0_.
|
||||
|
||||
x.0_import
|
||||
|
||||
x.0_,
|
||||
|
||||
x.0_*
|
||||
|
||||
x.0_+
|
||||
|
||||
x.0_-
|
||||
|
||||
x.0_/
|
||||
|
||||
x.0_[
|
||||
|
||||
x.0_]
|
||||
|
||||
x.0_{
|
||||
|
||||
x.0_}
|
||||
|
||||
x.0_(
|
||||
|
||||
x.0_)
|
||||
|
||||
x.0_:
|
||||
|
||||
x.0_::
|
||||
|
||||
x.0_?
|
||||
|
||||
x.0__
|
||||
|
||||
x.0_=
|
||||
|
||||
x.0_==
|
||||
|
||||
x.0_!
|
||||
|
||||
x.0_!=
|
||||
|
||||
x.0_>
|
||||
|
||||
x.0_>=
|
||||
|
||||
x.0_<
|
||||
|
||||
x.0_<=
|
||||
|
||||
x.0_>
|
||||
|
||||
x.0_..
|
||||
|
||||
x.0_as
|
||||
|
||||
x.0_console
|
||||
|
||||
x.0_const
|
||||
|
||||
x.0_let
|
||||
|
||||
x.0_for
|
||||
|
||||
x.0_if
|
||||
|
||||
x.0_else
|
||||
|
||||
x.0_i8
|
||||
|
||||
x.0_i16
|
||||
|
||||
x.0_i32
|
||||
|
||||
x.0_i64
|
||||
|
||||
x.0_i128
|
||||
|
||||
x.0_u8
|
||||
|
||||
x.0_u16
|
||||
|
||||
x.0_u32
|
||||
|
||||
x.0_u64
|
||||
|
||||
x.0_u128
|
||||
|
||||
x.0_&
|
||||
|
||||
x.0_return
|
||||
|
||||
x.0_self
|
||||
|
||||
x.0_Self
|
||||
|
||||
x.0_true
|
||||
|
||||
x.0_false
|
||||
|
||||
|
@ -4,54 +4,105 @@ expectation: Fail
|
||||
*/
|
||||
|
||||
x::;
|
||||
|
||||
x::.
|
||||
|
||||
x::import
|
||||
|
||||
x::,
|
||||
|
||||
x::*
|
||||
|
||||
x::+
|
||||
|
||||
x::-
|
||||
|
||||
x::/
|
||||
|
||||
x::[
|
||||
|
||||
x::]
|
||||
|
||||
x::{
|
||||
|
||||
x::}
|
||||
|
||||
x::(
|
||||
|
||||
x::)
|
||||
|
||||
x:::
|
||||
|
||||
x::::
|
||||
|
||||
x::?
|
||||
|
||||
x::_
|
||||
|
||||
x::=
|
||||
|
||||
x::==
|
||||
|
||||
x::!
|
||||
|
||||
x::!=
|
||||
|
||||
x::>
|
||||
|
||||
x::>=
|
||||
|
||||
x::<
|
||||
|
||||
x::<=
|
||||
|
||||
x::>
|
||||
|
||||
x::..
|
||||
|
||||
x::as
|
||||
|
||||
x::console
|
||||
|
||||
x::const
|
||||
|
||||
x::let
|
||||
|
||||
x::for
|
||||
|
||||
x::if
|
||||
|
||||
x::else
|
||||
|
||||
x::i8
|
||||
|
||||
x::i16
|
||||
|
||||
x::i32
|
||||
|
||||
x::i64
|
||||
|
||||
x::i128
|
||||
|
||||
x::u8
|
||||
|
||||
x::u16
|
||||
|
||||
x::u32
|
||||
|
||||
x::u64
|
||||
|
||||
x::u128
|
||||
|
||||
x::&
|
||||
|
||||
x::return
|
||||
|
||||
x::self
|
||||
|
||||
x::Self
|
||||
|
||||
x::true
|
||||
|
||||
x::false
|
||||
x::0
|
||||
|
||||
x::0
|
||||
|
@ -4,99 +4,112 @@ expectation: Fail
|
||||
*/
|
||||
|
||||
let x = a ; b;
|
||||
let x = a . b;
|
||||
|
||||
let x = a import b;
|
||||
|
||||
let x = a , b;
|
||||
|
||||
let x = a [ b;
|
||||
|
||||
let x = a ] b;
|
||||
|
||||
let x = a { b;
|
||||
|
||||
let x = a } b;
|
||||
|
||||
let x = a ( b;
|
||||
|
||||
let x = a ) b;
|
||||
|
||||
let x = a : b;
|
||||
let x = a :: b;
|
||||
|
||||
let x = a ? b;
|
||||
|
||||
let x = a _ b;
|
||||
|
||||
let x = a = b;
|
||||
let x = a == b;
|
||||
|
||||
let x = a ! b;
|
||||
let x = a != b;
|
||||
let x = a > b;
|
||||
let x = a >= b;
|
||||
let x = a < b;
|
||||
let x = a <= b;
|
||||
let x = a > b;
|
||||
|
||||
let x = a .. b;
|
||||
let x = a as b;
|
||||
|
||||
let x = a console b;
|
||||
|
||||
let x = a const b;
|
||||
|
||||
let x = a let b;
|
||||
|
||||
let x = a for b;
|
||||
|
||||
let x = a if b;
|
||||
|
||||
let x = a else b;
|
||||
|
||||
let x = a i8 b;
|
||||
|
||||
let x = a i16 b;
|
||||
|
||||
let x = a i32 b;
|
||||
|
||||
let x = a i64 b;
|
||||
|
||||
let x = a i128 b;
|
||||
|
||||
let x = a u8 b;
|
||||
|
||||
let x = a u16 b;
|
||||
|
||||
let x = a u32 b;
|
||||
|
||||
let x = a u64 b;
|
||||
|
||||
let x = a u128 b;
|
||||
|
||||
let x = a & b;
|
||||
|
||||
let x = a return b;
|
||||
|
||||
let x = a self b;
|
||||
|
||||
let x = a Self b;
|
||||
|
||||
let x = a true b;
|
||||
|
||||
let x = a false b;
|
||||
|
||||
let x = a 0 b;
|
||||
|
||||
|
||||
x;=b;
|
||||
|
||||
x.=b;
|
||||
ximport=b;
|
||||
x,=b;
|
||||
|
||||
x,=b; // 43
|
||||
|
||||
x[=b;
|
||||
|
||||
x]=b;
|
||||
|
||||
x{=b;
|
||||
|
||||
x}=b;
|
||||
|
||||
x=(;
|
||||
|
||||
x=);
|
||||
|
||||
x=:;
|
||||
|
||||
x=::;
|
||||
|
||||
x?=b;
|
||||
x_=b;
|
||||
x==b;
|
||||
x==b;
|
||||
x!=b;
|
||||
|
||||
x!==b;
|
||||
x>=b;
|
||||
|
||||
x>==b;
|
||||
x<=b;
|
||||
|
||||
x<==b;
|
||||
x>=b;
|
||||
|
||||
x..=b;
|
||||
xas=b;
|
||||
xconsole=b;
|
||||
xconst=b;
|
||||
xlet=b;
|
||||
xfor=b;
|
||||
xif=b;
|
||||
xelse=b;
|
||||
xi8=b;
|
||||
xi16=b;
|
||||
xi32=b;
|
||||
xi64=b;
|
||||
xi128=b;
|
||||
xu8=b;
|
||||
xu16=b;
|
||||
xu32=b;
|
||||
xu64=b;
|
||||
xu128=b;
|
||||
|
||||
x&=b;
|
||||
xreturn=b;
|
||||
xself=b;
|
||||
xSelf=b;
|
||||
xtrue=b;
|
||||
xfalse=b;
|
||||
x0=b;
|
84
tests/parser/unreachable/math_op_pass.leo
Normal file
84
tests/parser/unreachable/math_op_pass.leo
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
namespace: ParseStatement
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
let x = a . b;
|
||||
|
||||
let x = a :: b;
|
||||
|
||||
let x = a == b;
|
||||
|
||||
let x = a != b;
|
||||
|
||||
let x = a > b;
|
||||
|
||||
let x = a >= b;
|
||||
|
||||
let x = a < b;
|
||||
|
||||
let x = a <= b;
|
||||
|
||||
let x = a > b;
|
||||
|
||||
let x = a as b;
|
||||
|
||||
ximport=b;
|
||||
|
||||
x_=b;
|
||||
|
||||
x==b;
|
||||
|
||||
x!=b;
|
||||
|
||||
x>=b;
|
||||
|
||||
x<=b;
|
||||
|
||||
x>=b;
|
||||
|
||||
xas=b;
|
||||
|
||||
xconsole=b;
|
||||
|
||||
xconst=b;
|
||||
|
||||
xlet=b;
|
||||
|
||||
xfor=b;
|
||||
|
||||
xif=b;
|
||||
|
||||
xelse=b;
|
||||
|
||||
xi8=b;
|
||||
|
||||
xi16=b;
|
||||
|
||||
xi32=b;
|
||||
|
||||
xi64=b;
|
||||
|
||||
xi128=b;
|
||||
|
||||
xu8=b;
|
||||
|
||||
xu16=b;
|
||||
|
||||
xu32=b;
|
||||
|
||||
xu64=b;
|
||||
|
||||
xu128=b;
|
||||
|
||||
xreturn=b;
|
||||
|
||||
xself=b;
|
||||
|
||||
xSelf=b;
|
||||
|
||||
xtrue=b;
|
||||
|
||||
xfalse=b;
|
||||
|
||||
x0=b;
|
44
tests/parser/unreachable/postfix_fail.leo
Normal file
44
tests/parser/unreachable/postfix_fail.leo
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
namespace: ParseStatement
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
let x = a;;
|
||||
|
||||
let x = a.;
|
||||
|
||||
let x = a,;
|
||||
|
||||
let x = a[;
|
||||
|
||||
let x = a];
|
||||
|
||||
let x = a{;
|
||||
|
||||
let x = a};
|
||||
|
||||
let x = a);
|
||||
|
||||
let x = a:;
|
||||
|
||||
let x = a?;
|
||||
|
||||
let x = a=;
|
||||
|
||||
let x = a==;
|
||||
|
||||
let x = a!;
|
||||
|
||||
let x = a!=;
|
||||
|
||||
let x = a>;
|
||||
|
||||
let x = a>=;
|
||||
|
||||
let x = a<;
|
||||
|
||||
let x = a<=;
|
||||
|
||||
let x = a>;
|
||||
|
||||
let x = a..;
|
@ -1,51 +1,55 @@
|
||||
/*
|
||||
namespace: ParseStatement
|
||||
expectation: Fail
|
||||
expectation: Pass
|
||||
*/
|
||||
// These ones do not hit the unreachable as they are treated as valid idents rather than postfix.
|
||||
|
||||
let x = a;;
|
||||
let x = a.;
|
||||
let x = aimport;
|
||||
let x = a,;
|
||||
let x = a[;
|
||||
let x = a];
|
||||
let x = a{;
|
||||
let x = a};
|
||||
let x = a);
|
||||
let x = a:;
|
||||
let x = a?;
|
||||
|
||||
let x = a_;
|
||||
let x = a=;
|
||||
let x = a==;
|
||||
let x = a!;
|
||||
let x = a!=;
|
||||
let x = a>;
|
||||
let x = a>=;
|
||||
let x = a<;
|
||||
let x = a<=;
|
||||
let x = a>;
|
||||
let x = a..;
|
||||
|
||||
let x = aas;
|
||||
|
||||
let x = aconsole;
|
||||
|
||||
let x = aconst;
|
||||
|
||||
let x = alet;
|
||||
|
||||
let x = afor;
|
||||
|
||||
let x = aif;
|
||||
|
||||
let x = aelse;
|
||||
|
||||
let x = ai8;
|
||||
|
||||
let x = ai16;
|
||||
|
||||
let x = ai32;
|
||||
|
||||
let x = ai64;
|
||||
|
||||
let x = ai128;
|
||||
|
||||
let x = au8;
|
||||
|
||||
let x = au16;
|
||||
|
||||
let x = au32;
|
||||
|
||||
let x = au64;
|
||||
|
||||
let x = au128;
|
||||
let x = a&;
|
||||
|
||||
let x = areturn;
|
||||
|
||||
let x = aself;
|
||||
|
||||
let x = aSelf;
|
||||
|
||||
let x = atrue;
|
||||
|
||||
let x = afalse;
|
||||
let x = a0;
|
||||
|
||||
let x = a0;
|
Loading…
Reference in New Issue
Block a user