merge testnet3

This commit is contained in:
collin 2022-05-20 10:39:21 -04:00
commit b8780e888d
78 changed files with 393 additions and 777 deletions

View File

@ -126,7 +126,6 @@ impl<R: ReconstructingReducer> ReconstructingDirector<R> {
Statement::Conditional(conditional) => Statement::Conditional(self.reduce_conditional(conditional)?),
Statement::Iteration(iteration) => Statement::Iteration(Box::new(self.reduce_iteration(iteration)?)),
Statement::Console(console) => Statement::Console(self.reduce_console(console)?),
Statement::Expression(expression) => Statement::Expression(self.reduce_expression_statement(expression)?),
Statement::Block(block) => Statement::Block(self.reduce_block(block)?),
};
@ -241,11 +240,6 @@ impl<R: ReconstructingReducer> ReconstructingDirector<R> {
self.reducer.reduce_console(console_function_call, function)
}
pub fn reduce_expression_statement(&mut self, expression: &ExpressionStatement) -> Result<ExpressionStatement> {
let inner_expression = self.reduce_expression(&expression.expression)?;
self.reducer.reduce_expression_statement(expression, inner_expression)
}
pub fn reduce_block(&mut self, block: &Block) -> Result<Block> {
let mut statements = vec![];
for statement in block.statements.iter() {

View File

@ -232,17 +232,6 @@ pub trait ReconstructingReducer {
})
}
fn reduce_expression_statement(
&mut self,
expression_statement: &ExpressionStatement,
expression: Expression,
) -> Result<ExpressionStatement> {
Ok(ExpressionStatement {
expression,
span: expression_statement.span,
})
}
fn reduce_block(&mut self, block: &Block, statements: Vec<Statement>) -> Result<Block> {
Ok(Block {
statements,

View File

@ -92,10 +92,6 @@ pub trait StatementVisitor<'a> {
Default::default()
}
fn visit_expression_statement(&mut self, _input: &'a ExpressionStatement) -> VisitResult {
Default::default()
}
fn visit_block(&mut self, _input: &'a Block) -> VisitResult {
Default::default()
}

View File

@ -91,7 +91,6 @@ impl<'a, V: ExpressionVisitor<'a> + StatementVisitor<'a>> VisitorDirector<'a, V>
Statement::Conditional(stmt) => self.visit_conditional(stmt),
Statement::Iteration(stmt) => self.visit_iteration(stmt),
Statement::Console(stmt) => self.visit_console(stmt),
Statement::Expression(stmt) => self.visit_expression_statement(stmt),
Statement::Block(stmt) => self.visit_block(stmt),
}
}
@ -144,12 +143,6 @@ impl<'a, V: ExpressionVisitor<'a> + StatementVisitor<'a>> VisitorDirector<'a, V>
}
}
pub fn visit_expression_statement(&mut self, input: &'a ExpressionStatement) {
if let VisitResult::VisitChildren = self.visitor.visit_expression_statement(input) {
self.visit_expression(&input.expression);
}
}
pub fn visit_block(&mut self, input: &'a Block) {
if let VisitResult::VisitChildren = self.visitor.visit_block(input) {
input.statements.iter().for_each(|stmt| self.visit_statement(stmt));

View File

@ -1,38 +0,0 @@
// Copyright (C) 2019-2022 Aleo Systems Inc.
// This file is part of the Leo library.
// The Leo library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// The Leo library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
use crate::{Expression, Node};
use leo_span::Span;
use serde::{Deserialize, Serialize};
use std::fmt;
/// An expression statement `expr;`.
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize, Debug)]
pub struct ExpressionStatement {
/// The expression to evaluate purely for its side-effects.
pub expression: Expression,
/// The span excluding the semicolon.
pub span: Span,
}
impl fmt::Display for ExpressionStatement {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{};", self.expression)
}
}
crate::simple_node_impl!(ExpressionStatement);

View File

@ -29,9 +29,6 @@ pub use return_statement::*;
pub mod iteration;
pub use iteration::*;
pub mod expression;
pub use expression::*;
pub mod definition;
pub use definition::*;

View File

@ -36,13 +36,20 @@ pub enum Statement {
Iteration(Box<IterationStatement>),
/// A console logging statement.
Console(ConsoleStatement),
/// An expression statement turning an expression into a statement,
/// using the expression only for its side-effects.
Expression(ExpressionStatement),
/// A block statement.
Block(Block),
}
impl Statement {
/// Returns a dummy statement made from an empty block `{}`.
pub fn dummy(span: Span) -> Self {
Self::Block(Block {
statements: Vec::new(),
span,
})
}
}
impl fmt::Display for Statement {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
@ -52,7 +59,6 @@ impl fmt::Display for Statement {
Statement::Conditional(x) => x.fmt(f),
Statement::Iteration(x) => x.fmt(f),
Statement::Console(x) => x.fmt(f),
Statement::Expression(x) => x.fmt(f),
Statement::Block(x) => x.fmt(f),
}
}
@ -68,7 +74,6 @@ impl Node for Statement {
Conditional(n) => n.span(),
Iteration(n) => n.span(),
Console(n) => n.span(),
Expression(n) => n.span(),
Block(n) => n.span(),
}
}
@ -82,7 +87,6 @@ impl Node for Statement {
Conditional(n) => n.set_span(span),
Iteration(n) => n.set_span(span),
Console(n) => n.set_span(span),
Expression(n) => n.set_span(span),
Block(n) => n.set_span(span),
}
}

View File

@ -17,7 +17,6 @@
use super::*;
use leo_errors::{ParserError, Result};
use leo_span::sym;
const INT_TYPES: &[Token] = &[
Token::I8,
@ -323,7 +322,6 @@ impl ParserContext<'_> {
let ident = Identifier { name, span };
Expression::Identifier(ident)
}
Token::Input => Expression::Identifier(Identifier { name: sym::input, span }),
t if crate::type_::TYPE_TOKENS.contains(&t) => Expression::Identifier(Identifier {
name: t.keyword_to_symbol().unwrap(),
span,

View File

@ -85,14 +85,9 @@ impl ParserContext<'_> {
/// Returns a [`FunctionInput`] AST node if the next tokens represent a function parameter.
pub fn parse_function_parameter(&mut self) -> Result<FunctionInput> {
let mode = self.parse_function_parameter_mode()?;
let mutable = self.eat(&Token::Mut).then(|| self.prev_token.clone());
let name = self.expect_ident()?;
if let Some(mutable) = &mutable {
self.emit_err(ParserError::mut_function_input(mutable.span + name.span));
}
self.expect(&Token::Colon)?;
let type_ = self.parse_type()?.0;
Ok(FunctionInput::Variable(FunctionInputVariable::new(

View File

@ -70,11 +70,11 @@ impl ParserContext<'_> {
value,
})))
} else {
// Error on `expr;` but recover as an empty block `{}`.
self.expect(&Token::Semicolon)?;
Ok(Statement::Expression(ExpressionStatement {
span: expr.span(),
expression: expr,
}))
let span = expr.span() + self.prev_token.span;
self.emit_err(ParserError::expr_stmts_disallowed(span));
Ok(Statement::dummy(span))
}
}
@ -140,7 +140,6 @@ impl ParserContext<'_> {
// Parse iteration range.
let start = self.parse_expression()?;
self.expect(&Token::DotDot)?;
let inclusive = self.eat(&Token::Assign);
self.disallow_circuit_construction = true;
let stop = self.parse_conditional_expression()?;
self.disallow_circuit_construction = false;
@ -153,7 +152,7 @@ impl ParserContext<'_> {
type_: type_.0,
start,
stop,
inclusive,
inclusive: false,
block,
})
}
@ -219,11 +218,7 @@ impl ParserContext<'_> {
/// Returns a [`VariableName`] AST node if the next tokens represent a variable name with
/// valid keywords.
pub fn parse_variable_name(&mut self, decl_ty: Declare, span: Span) -> Result<VariableName> {
if self.eat(&Token::Mut) {
self.emit_err(ParserError::let_mut_statement(self.prev_token.span + span));
}
pub fn parse_variable_name(&mut self, decl_ty: Declare, _span: Span) -> Result<VariableName> {
let name = self.expect_ident()?;
Ok(VariableName {
span: name.span,

View File

@ -15,7 +15,7 @@
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
use crate::{tokenizer, ParserContext, SpannedToken};
use leo_ast::{Expression, ExpressionStatement, Statement, ValueExpression};
use leo_ast::Statement;
use leo_errors::{emitter::Handler, LeoError};
use leo_span::{
source_map::FileName,
@ -122,10 +122,7 @@ impl Namespace for ParseStatementNamespace {
create_session_if_not_set_then(|s| {
let tokenizer = tokenize(test, s)?;
if all_are_comments(&tokenizer) {
return Ok(yaml_or_fail(Statement::Expression(ExpressionStatement {
expression: Expression::Value(ValueExpression::String(Vec::new(), Default::default())),
span: Span::default(),
})));
return Ok(yaml_or_fail(Statement::dummy(Span::default())));
}
with_handler(tokenizer, |p| p.parse_statement()).map(yaml_or_fail)
})

View File

@ -420,14 +420,11 @@ impl Token {
"i128" => Token::I128,
"if" => Token::If,
"in" => Token::In,
"input" => Token::Input,
"let" => Token::Let,
"mut" => Token::Mut,
"public" => Token::Public,
"return" => Token::Return,
"scalar" => Token::Scalar,
"true" => Token::True,
"type" => Token::Type,
"u8" => Token::U8,
"u16" => Token::U16,
"u32" => Token::U32,

View File

@ -110,9 +110,6 @@ pub enum Token {
Char,
Scalar,
// primary expression
Input,
// Regular Keywords
Console,
/// Const variable and a const function.
@ -125,11 +122,9 @@ pub enum Token {
If,
In,
Let,
Mut,
/// For public inputs.
Public,
Return,
Type,
// Meta Tokens
Eof,
@ -155,14 +150,11 @@ pub const KEYWORD_TOKENS: &[Token] = &[
Token::I128,
Token::If,
Token::In,
Token::Input,
Token::Let,
Token::Mut,
Token::Public,
Token::Return,
Token::Scalar,
Token::True,
Token::Type,
Token::U8,
Token::U16,
Token::U32,
@ -198,14 +190,11 @@ impl Token {
Token::I128 => sym::i128,
Token::If => sym::If,
Token::In => sym::In,
Token::Input => sym::input,
Token::Let => sym::Let,
Token::Mut => sym::Mut,
Token::Public => sym::Public,
Token::Return => sym::Return,
Token::Scalar => sym::scalar,
Token::True => sym::True,
Token::Type => sym::Type,
Token::U8 => sym::u8,
Token::U16 => sym::u16,
Token::U32 => sym::u32,
@ -284,8 +273,6 @@ impl fmt::Display for Token {
Char => write!(f, "char"),
Scalar => write!(f, "scalar"),
Input => write!(f, "input"),
Console => write!(f, "console"),
Const => write!(f, "const"),
Constant => write!(f, "constant"),
@ -295,10 +282,8 @@ impl fmt::Display for Token {
If => write!(f, "if"),
In => write!(f, "in"),
Let => write!(f, "let"),
Mut => write!(f, "mut"),
Public => write!(f, "public"),
Return => write!(f, "return"),
Type => write!(f, "type"),
Eof => write!(f, "<eof>"),
}
}

View File

@ -123,11 +123,6 @@ impl<'a> StatementVisitor<'a> for TypeChecker<'a> {
VisitResult::VisitChildren
}
fn visit_expression_statement(&mut self, input: &'a ExpressionStatement) -> VisitResult {
self.compare_expr_type(&input.expression, None, input.span());
VisitResult::SkipChildren
}
fn visit_block(&mut self, input: &'a Block) -> VisitResult {
self.symbol_table.push_variable_scope();
// have to redo the logic here so we have scoping
@ -139,7 +134,6 @@ impl<'a> StatementVisitor<'a> for TypeChecker<'a> {
Statement::Conditional(stmt) => self.visit_conditional(stmt),
Statement::Iteration(stmt) => self.visit_iteration(stmt),
Statement::Console(stmt) => self.visit_console(stmt),
Statement::Expression(stmt) => self.visit_expression_statement(stmt),
Statement::Block(stmt) => self.visit_block(stmt),
};
});

View File

@ -136,22 +136,6 @@ create_messages!(
help: None,
}
/// For when the parser encountered a deprecated `mut` argument in a function.
@formatted
mut_function_input {
args: (),
msg: "function func(mut a: u32) { ... } is deprecated. Passed variables are mutable by default.",
help: None,
}
/// For when the parser encountered a deprecated `mut` argument in a let statement.
@formatted
let_mut_statement {
args: (),
msg: "let mut = ... is deprecated. `let` keyword implies mutabality by default.",
help: None,
}
/// For when the parser encountered a deprecated `test function`.
@formatted
test_function {
@ -390,4 +374,12 @@ create_messages!(
msg: "Unicode bidi override code point encountered.",
help: None,
}
/// Previously, expression statements were allowed, but not anymore.
@formatted
expr_stmts_disallowed {
args: (),
msg: "Expression statements are no longer supported.",
help: None,
}
);

View File

@ -207,7 +207,7 @@ fn set_panic_hook() {
fn main() {
set_panic_hook();
handle_error(create_session_if_not_set_then(|_| run_with_args(Opt::from_args())));
create_session_if_not_set_then(|_| handle_error(run_with_args(Opt::from_args())));
}
/// Run command with custom build arguments.

View File

@ -15,15 +15,5 @@ function main(k: bool) -> bool {
forward = forward + x;
}
let reverse_inclusive: u32 = 0u32;
for a: u32 in 10u32..=0u32 {
reverse_inclusive = reverse_inclusive + a;
}
let forward_inclusive: u32 = 0u32;
for b: u32 in 0u32..=10u32 {
forward_inclusive = forward_inclusive + b;
}
return (reverse == forward) && (reverse_inclusive == forward_inclusive) && k;
return (reverse == forward) && k;
}

View File

@ -0,0 +1,32 @@
/*
namespace: Compile
expectation: Fail
input_file: inputs/dummy.in
# inclusive loops are currently disallowed
*/
function main(k: bool) -> bool {
let reverse: u32 = 0u32;
for i: u32 in 9u32..0u32 {
reverse = reverse + i;
}
let forward: u32 = 0u32;
for x: u32 in 0u32..10u32 {
forward = forward + x;
}
let reverse_inclusive: u32 = 0u32;
for a: u32 in 10u32..=0u32 {
reverse_inclusive = reverse_inclusive + a;
}
let forward_inclusive: u32 = 0u32;
for b: u32 in 0u32..=10u32 {
forward_inclusive = forward_inclusive + b;
}
return (reverse == forward) && (reverse_inclusive == forward_inclusive) && k;
}

View File

@ -2,4 +2,4 @@
namespace: Compile
expectation: Fail
outputs:
- "Error [EPAR0370026]: Expected a closed char but found `'`."
- "Error [EPAR0370024]: Expected a closed char but found `'`."

View File

@ -2,4 +2,4 @@
namespace: Compile
expectation: Fail
outputs:
- "Error [ETYC0372003]: Unknown function `my_function`\n --> compiler-test:4:5\n |\n 4 | my_function();\n | ^^^^^^^^^^^\nError [ETYC0372003]: Unknown function `my_function`\n --> compiler-test:4:5\n |\n 4 | my_function();\n | ^^^^^^^^^^^"
- "Error [EPAR0370043]: Expression statements are no longer supported.\n --> compiler-test:4:5\n |\n 4 | my_function();\n | ^^^^^^^^^^^^^^"

View File

@ -3,6 +3,6 @@ namespace: Compile
expectation: Pass
outputs:
- output:
- initial_input_ast: bddb7d656b6cfdeadae66e437c61090a2f14112e48fe4e23ea0e39e1ce03fed0
initial_ast: 66baa9f7e32bb00b0c047250c97ff2710a128e9db63d0a7c0459f7673147e124
symbol_table: 3f85b29e75222f03e70b83cbc2399746f23dbbeabd857acaa486db9e8076c03c
- initial_input_ast: 7f054d619f362422dce83ca5563d462fe3206845a29de38bb3721f3cd2c69c11
initial_ast: 6b833755871962eb67f0a281ef1edd82bf84b0c9f03154f0b7b0330c554826d4
symbol_table: bcf9d66217a3cbfc92d16af68089c9644a316cfb072e3bfd6bd76b5ccea0fc18

View File

@ -0,0 +1,5 @@
---
namespace: Compile
expectation: Fail
outputs:
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '='\n --> compiler-test:15:26\n |\n 15 | for a: u32 in 10u32..=0u32 {\n | ^"

View File

@ -2,4 +2,4 @@
namespace: ParseExpression
expectation: Fail
outputs:
- "Error [EPAR0370032]: Could not parse the implicit value: 1.\n --> test:1:1\n |\n 1 | 1 == 2 == 3\n | ^"
- "Error [EPAR0370030]: Could not parse the implicit value: 1.\n --> test:1:1\n |\n 1 | 1 == 2 == 3\n | ^"

View File

@ -2,4 +2,4 @@
namespace: ParseExpression
expectation: Fail
outputs:
- "Error [EPAR0370032]: Could not parse the implicit value: 1.\n --> test:1:1\n |\n 1 | 1 != 2 != 3\n | ^"
- "Error [EPAR0370030]: Could not parse the implicit value: 1.\n --> test:1:1\n |\n 1 | 1 != 2 != 3\n | ^"

View File

@ -2,50 +2,50 @@
namespace: Token
expectation: Fail
outputs:
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370030]: Could not lex the following content: `\\`."
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370030]: Could not lex the following content: `\\n`."
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370031]: Expected a valid hex character but found `'`."
- "Error [EPAR0370031]: Expected a valid hex character but found `'`."
- "Error [EPAR0370031]: Expected a valid hex character but found `9A`."
- "Error [EPAR0370031]: Expected a valid hex character but found `7g`."
- "Error [EPAR0370031]: Expected a valid hex character but found `80`."
- "Error [EPAR0370031]: Expected a valid hex character but found `c1`."
- "Error [EPAR0370031]: Expected a valid hex character but found `c2`."
- "Error [EPAR0370031]: Expected a valid hex character but found `DF`."
- "Error [EPAR0370031]: Expected a valid hex character but found `C0`."
- "Error [EPAR0370031]: Expected a valid hex character but found `e0`."
- "Error [EPAR0370031]: Expected a valid hex character but found `9f`."
- "Error [EPAR0370026]: Expected a closed char but found `a`."
- "Error [EPAR0370024]: Expected a valid escape character but found `a`."
- "Error [EPAR0370024]: Expected a valid escape character but found `z`."
- "Error [EPAR0370024]: Expected a valid escape character but found `A`."
- "Error [EPAR0370024]: Expected a valid escape character but found `Z`."
- "Error [EPAR0370024]: Expected a valid escape character but found `1`."
- "Error [EPAR0370024]: Expected a valid escape character but found `9`."
- "Error [EPAR0370024]: Expected a valid escape character but found `*`."
- "Error [EPAR0370031]: Expected a valid hex character but found `'`."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `'`."
- "Error [EPAR0370026]: Expected a closed char but found `\t`."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `z`."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `1`."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `}`."
- "Error [EPAR0370026]: Expected a closed char but found `🦀`."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `1`."
- "Error [EPAR0370026]: Expected a closed char but found `🦀`."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `6`."
- "Error [EPAR0370033]: There was no closing `}` after a escaped unicode `af🦀'`."
- "Error [EPAR0370033]: There was no closing `}` after a escaped unicode `2764z'`."
- "Error [EPAR0370031]: Expected a valid hex character but found `276g`."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `9`."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `0`."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `0`."
- "Error [EPAR0370035]: The escaped unicode char `110000` is greater than 0x10FFFF."
- "Error [EPAR0370034]: The escaped unicode char `1234567890` is not within valid length of [1, 6]."
- "Error [EPAR0370026]: Expected a closed char but found `򻮻`."
- "Error [EPAR0370026]: Expected a closed char but found `😭`."
- "Error [EPAR0370044]: Unicode bidi override code point encountered."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370028]: Could not lex the following content: `\\`."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370028]: Could not lex the following content: `\\n`."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370029]: Expected a valid hex character but found `'`."
- "Error [EPAR0370029]: Expected a valid hex character but found `'`."
- "Error [EPAR0370029]: Expected a valid hex character but found `9A`."
- "Error [EPAR0370029]: Expected a valid hex character but found `7g`."
- "Error [EPAR0370029]: Expected a valid hex character but found `80`."
- "Error [EPAR0370029]: Expected a valid hex character but found `c1`."
- "Error [EPAR0370029]: Expected a valid hex character but found `c2`."
- "Error [EPAR0370029]: Expected a valid hex character but found `DF`."
- "Error [EPAR0370029]: Expected a valid hex character but found `C0`."
- "Error [EPAR0370029]: Expected a valid hex character but found `e0`."
- "Error [EPAR0370029]: Expected a valid hex character but found `9f`."
- "Error [EPAR0370024]: Expected a closed char but found `a`."
- "Error [EPAR0370022]: Expected a valid escape character but found `a`."
- "Error [EPAR0370022]: Expected a valid escape character but found `z`."
- "Error [EPAR0370022]: Expected a valid escape character but found `A`."
- "Error [EPAR0370022]: Expected a valid escape character but found `Z`."
- "Error [EPAR0370022]: Expected a valid escape character but found `1`."
- "Error [EPAR0370022]: Expected a valid escape character but found `9`."
- "Error [EPAR0370022]: Expected a valid escape character but found `*`."
- "Error [EPAR0370029]: Expected a valid hex character but found `'`."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `'`."
- "Error [EPAR0370024]: Expected a closed char but found `\t`."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `z`."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `1`."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `}`."
- "Error [EPAR0370024]: Expected a closed char but found `🦀`."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `1`."
- "Error [EPAR0370024]: Expected a closed char but found `🦀`."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `6`."
- "Error [EPAR0370031]: There was no closing `}` after a escaped unicode `af🦀'`."
- "Error [EPAR0370031]: There was no closing `}` after a escaped unicode `2764z'`."
- "Error [EPAR0370029]: Expected a valid hex character but found `276g`."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `9`."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `0`."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `0`."
- "Error [EPAR0370033]: The escaped unicode char `110000` is greater than 0x10FFFF."
- "Error [EPAR0370032]: The escaped unicode char `1234567890` is not within valid length of [1, 6]."
- "Error [EPAR0370024]: Expected a closed char but found `򻮻`."
- "Error [EPAR0370024]: Expected a closed char but found `😭`."
- "Error [EPAR0370042]: Unicode bidi override code point encountered."

View File

@ -2,14 +2,14 @@
namespace: ParseExpression
expectation: Fail
outputs:
- "Error [EPAR0370028]: Empty block comment."
- "Error [EPAR0370029]: Block comment does not close with content: `/* test`."
- "Error [EPAR0370026]: Empty block comment."
- "Error [EPAR0370027]: Block comment does not close with content: `/* test`."
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '/'\n --> test:1:1\n |\n 1 | / /\n | ^"
- "Error [EPAR0370029]: Block comment does not close with content: `/*/`."
- "Error [EPAR0370027]: Block comment does not close with content: `/*/`."
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '*'\n --> test:1:1\n |\n 1 | */\n | ^"
- "Error [EPAR0370030]: Could not lex the following content: `🦀**/`."
- "Error [EPAR0370030]: Could not lex the following content: `🦀*/`."
- "Error [EPAR0370029]: Block comment does not close with content: `/*🦀/`."
- "Error [EPAR0370029]: Block comment does not close with content: `/**🦀`."
- "Error [EPAR0370029]: Block comment does not close with content: `/*🦀`."
- "Error [EPAR0370029]: Block comment does not close with content: `/*/*`."
- "Error [EPAR0370028]: Could not lex the following content: `🦀**/`."
- "Error [EPAR0370028]: Could not lex the following content: `🦀*/`."
- "Error [EPAR0370027]: Block comment does not close with content: `/*🦀/`."
- "Error [EPAR0370027]: Block comment does not close with content: `/**🦀`."
- "Error [EPAR0370027]: Block comment does not close with content: `/*🦀`."
- "Error [EPAR0370027]: Block comment does not close with content: `/*/*`."

View File

@ -3,14 +3,14 @@ namespace: ParseExpression
expectation: Fail
outputs:
- "Error [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:1\n |\n 1 | ()group\n | ^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 123.\n --> test:1:2\n |\n 1 | (123)group\n | ^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 123.\n --> test:1:2\n |\n 1 | (123)group\n | ^^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,)group\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '+'\n --> test:1:2\n |\n 1 | (+, -,)group\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,+, -)group\n | ^"
- "Error [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:1\n |\n 1 | (x,y)group\n | ^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 123.\n --> test:1:2\n |\n 1 | (123,456u8)group\n | ^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 123.\n --> test:1:2\n |\n 1 | (123,456field)group\n | ^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 123.\n --> test:1:2\n |\n 1 | (123,456u8)group\n | ^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 123.\n --> test:1:2\n |\n 1 | (123,456field)group\n | ^^^"
- "Error [EPAR0370004]: Unexpected white space between terms (123,456) and group\n --> test:1:11\n |\n 1 | (123, 456) group\n | ^"
- "Error [EPAR0370032]: Could not parse the implicit value: 123.\n --> test:1:2\n |\n 1 | (123, )group\n | ^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 123.\n --> test:1:2\n |\n 1 | (123, 456, 789)group\n | ^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 123.\n --> test:1:2\n |\n 1 | (123, 456)bool\n | ^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 123.\n --> test:1:2\n |\n 1 | (123, )group\n | ^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 123.\n --> test:1:2\n |\n 1 | (123, 456, 789)group\n | ^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 123.\n --> test:1:2\n |\n 1 | (123, 456)bool\n | ^^^"

View File

@ -2,6 +2,6 @@
namespace: Token
expectation: Fail
outputs:
- "Error [EPAR0370036]: A hex number `0x..` was provided but hex is not allowed."
- "Error [EPAR0370036]: A hex number `0x..` was provided but hex is not allowed."
- "Error [EPAR0370036]: A hex number `0x..` was provided but hex is not allowed."
- "Error [EPAR0370034]: A hex number `0x..` was provided but hex is not allowed."
- "Error [EPAR0370034]: A hex number `0x..` was provided but hex is not allowed."
- "Error [EPAR0370034]: A hex number `0x..` was provided but hex is not allowed."

View File

@ -2,4 +2,4 @@
namespace: ParseExpression
expectation: Fail
outputs:
- "Error [EPAR0370036]: A hex number `0x..` was provided but hex is not allowed."
- "Error [EPAR0370034]: A hex number `0x..` was provided but hex is not allowed."

View File

@ -2,108 +2,108 @@
namespace: ParseExpression
expectation: Fail
outputs:
- "Error [EPAR0370032]: Could not parse the implicit value: 123.\n --> test:1:1\n |\n 1 | 123\n | ^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 123.\n --> test:1:1\n |\n 1 | 123\n | ^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 456.\n --> test:1:1\n |\n 1 | 456\n | ^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 87377802873778028737780287377802873778028737780287377802873778028737780287377802.\n --> test:1:1\n |\n 1 | 87377802873778028737780287377802873778028737780287377802873778028737780287377802\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802.\n --> test:1:1\n |\n 1 | 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 340130024.\n --> test:1:1\n |\n 1 | 340130024\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 158951116.\n --> test:1:1\n |\n 1 | 158951116\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 155529659.\n --> test:1:1\n |\n 1 | 155529659\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 642023166.\n --> test:1:1\n |\n 1 | 642023166\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 228481736.\n --> test:1:1\n |\n 1 | 228481736\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 469712960.\n --> test:1:1\n |\n 1 | 469712960\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 929437719.\n --> test:1:1\n |\n 1 | 929437719\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 721072814.\n --> test:1:1\n |\n 1 | 721072814\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 363254789.\n --> test:1:1\n |\n 1 | 363254789\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 906732565.\n --> test:1:1\n |\n 1 | 906732565\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 288246391.\n --> test:1:1\n |\n 1 | 288246391\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 724940549.\n --> test:1:1\n |\n 1 | 724940549\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 487101620.\n --> test:1:1\n |\n 1 | 487101620\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 261373583.\n --> test:1:1\n |\n 1 | 261373583\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 891163927.\n --> test:1:1\n |\n 1 | 891163927\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 743967544.\n --> test:1:1\n |\n 1 | 743967544\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 8372586.\n --> test:1:1\n |\n 1 | 8372586\n | ^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 461793278.\n --> test:1:1\n |\n 1 | 461793278\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 806307045.\n --> test:1:1\n |\n 1 | 806307045\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 122764546.\n --> test:1:1\n |\n 1 | 122764546\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 356336181.\n --> test:1:1\n |\n 1 | 356336181\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 158370903.\n --> test:1:1\n |\n 1 | 158370903\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 774460877.\n --> test:1:1\n |\n 1 | 774460877\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 557174131.\n --> test:1:1\n |\n 1 | 557174131\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 492401267.\n --> test:1:1\n |\n 1 | 492401267\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 893445620.\n --> test:1:1\n |\n 1 | 893445620\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 957757048.\n --> test:1:1\n |\n 1 | 957757048\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 721540649.\n --> test:1:1\n |\n 1 | 721540649\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 390746493.\n --> test:1:1\n |\n 1 | 390746493\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 211251725.\n --> test:1:1\n |\n 1 | 211251725\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 938266114.\n --> test:1:1\n |\n 1 | 938266114\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 156985870.\n --> test:1:1\n |\n 1 | 156985870\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 703831126.\n --> test:1:1\n |\n 1 | 703831126\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 729964155.\n --> test:1:1\n |\n 1 | 729964155\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 988151305.\n --> test:1:1\n |\n 1 | 988151305\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 320872435.\n --> test:1:1\n |\n 1 | 320872435\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 719287167.\n --> test:1:1\n |\n 1 | 719287167\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 152289486.\n --> test:1:1\n |\n 1 | 152289486\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 740067975.\n --> test:1:1\n |\n 1 | 740067975\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 728627816.\n --> test:1:1\n |\n 1 | 728627816\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 385008978.\n --> test:1:1\n |\n 1 | 385008978\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 553967635.\n --> test:1:1\n |\n 1 | 553967635\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 71980713.\n --> test:1:1\n |\n 1 | 71980713\n | ^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 519444716.\n --> test:1:1\n |\n 1 | 519444716\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 116499965.\n --> test:1:1\n |\n 1 | 116499965\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 717422268.\n --> test:1:1\n |\n 1 | 717422268\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 18966279.\n --> test:1:1\n |\n 1 | 18966279\n | ^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 22458638.\n --> test:1:1\n |\n 1 | 22458638\n | ^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 857282620.\n --> test:1:1\n |\n 1 | 857282620\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 920675898.\n --> test:1:1\n |\n 1 | 920675898\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 762235516.\n --> test:1:1\n |\n 1 | 762235516\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 469018377.\n --> test:1:1\n |\n 1 | 469018377\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 199986521.\n --> test:1:1\n |\n 1 | 199986521\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 536679358.\n --> test:1:1\n |\n 1 | 536679358\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 591399452.\n --> test:1:1\n |\n 1 | 591399452\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 83083158.\n --> test:1:1\n |\n 1 | 83083158\n | ^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 599449051.\n --> test:1:1\n |\n 1 | 599449051\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 445442318.\n --> test:1:1\n |\n 1 | 445442318\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 585486590.\n --> test:1:1\n |\n 1 | 585486590\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 209278800.\n --> test:1:1\n |\n 1 | 209278800\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 873568117.\n --> test:1:1\n |\n 1 | 873568117\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 664470940.\n --> test:1:1\n |\n 1 | 664470940\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 465262783.\n --> test:1:1\n |\n 1 | 465262783\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 605652874.\n --> test:1:1\n |\n 1 | 605652874\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 376803940.\n --> test:1:1\n |\n 1 | 376803940\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 965247040.\n --> test:1:1\n |\n 1 | 965247040\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 598474509.\n --> test:1:1\n |\n 1 | 598474509\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 845119918.\n --> test:1:1\n |\n 1 | 845119918\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 648159133.\n --> test:1:1\n |\n 1 | 648159133\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 669051032.\n --> test:1:1\n |\n 1 | 669051032\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 800600261.\n --> test:1:1\n |\n 1 | 800600261\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 434689764.\n --> test:1:1\n |\n 1 | 434689764\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 520060080.\n --> test:1:1\n |\n 1 | 520060080\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 804659385.\n --> test:1:1\n |\n 1 | 804659385\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 537828058.\n --> test:1:1\n |\n 1 | 537828058\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 716600292.\n --> test:1:1\n |\n 1 | 716600292\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 387020273.\n --> test:1:1\n |\n 1 | 387020273\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 199375617.\n --> test:1:1\n |\n 1 | 199375617\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 680337189.\n --> test:1:1\n |\n 1 | 680337189\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 818479931.\n --> test:1:1\n |\n 1 | 818479931\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 893693281.\n --> test:1:1\n |\n 1 | 893693281\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 87377802.\n --> test:1:1\n |\n 1 | 87377802\n | ^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 84699261.\n --> test:1:1\n |\n 1 | 84699261\n | ^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 292826090.\n --> test:1:1\n |\n 1 | 292826090\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 569171405.\n --> test:1:1\n |\n 1 | 569171405\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 387436237.\n --> test:1:1\n |\n 1 | 387436237\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 150682190.\n --> test:1:1\n |\n 1 | 150682190\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 888770419.\n --> test:1:1\n |\n 1 | 888770419\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 824696431.\n --> test:1:1\n |\n 1 | 824696431\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 765659803.\n --> test:1:1\n |\n 1 | 765659803\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 270163693.\n --> test:1:1\n |\n 1 | 270163693\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 427940240.\n --> test:1:1\n |\n 1 | 427940240\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 504997332.\n --> test:1:1\n |\n 1 | 504997332\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 337808338.\n --> test:1:1\n |\n 1 | 337808338\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 907200008.\n --> test:1:1\n |\n 1 | 907200008\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 757177889.\n --> test:1:1\n |\n 1 | 757177889\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 696697188.\n --> test:1:1\n |\n 1 | 696697188\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 41376051.\n --> test:1:1\n |\n 1 | 41376051\n | ^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 496293518.\n --> test:1:1\n |\n 1 | 496293518\n | ^^^^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 251218820.\n --> test:1:1\n |\n 1 | 251218820\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 123.\n --> test:1:1\n |\n 1 | 123\n | ^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 123.\n --> test:1:1\n |\n 1 | 123\n | ^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 456.\n --> test:1:1\n |\n 1 | 456\n | ^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 87377802873778028737780287377802873778028737780287377802873778028737780287377802.\n --> test:1:1\n |\n 1 | 87377802873778028737780287377802873778028737780287377802873778028737780287377802\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802.\n --> test:1:1\n |\n 1 | 8737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802873778028737780287377802\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 340130024.\n --> test:1:1\n |\n 1 | 340130024\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 158951116.\n --> test:1:1\n |\n 1 | 158951116\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 155529659.\n --> test:1:1\n |\n 1 | 155529659\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 642023166.\n --> test:1:1\n |\n 1 | 642023166\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 228481736.\n --> test:1:1\n |\n 1 | 228481736\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 469712960.\n --> test:1:1\n |\n 1 | 469712960\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 929437719.\n --> test:1:1\n |\n 1 | 929437719\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 721072814.\n --> test:1:1\n |\n 1 | 721072814\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 363254789.\n --> test:1:1\n |\n 1 | 363254789\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 906732565.\n --> test:1:1\n |\n 1 | 906732565\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 288246391.\n --> test:1:1\n |\n 1 | 288246391\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 724940549.\n --> test:1:1\n |\n 1 | 724940549\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 487101620.\n --> test:1:1\n |\n 1 | 487101620\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 261373583.\n --> test:1:1\n |\n 1 | 261373583\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 891163927.\n --> test:1:1\n |\n 1 | 891163927\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 743967544.\n --> test:1:1\n |\n 1 | 743967544\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 8372586.\n --> test:1:1\n |\n 1 | 8372586\n | ^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 461793278.\n --> test:1:1\n |\n 1 | 461793278\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 806307045.\n --> test:1:1\n |\n 1 | 806307045\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 122764546.\n --> test:1:1\n |\n 1 | 122764546\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 356336181.\n --> test:1:1\n |\n 1 | 356336181\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 158370903.\n --> test:1:1\n |\n 1 | 158370903\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 774460877.\n --> test:1:1\n |\n 1 | 774460877\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 557174131.\n --> test:1:1\n |\n 1 | 557174131\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 492401267.\n --> test:1:1\n |\n 1 | 492401267\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 893445620.\n --> test:1:1\n |\n 1 | 893445620\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 957757048.\n --> test:1:1\n |\n 1 | 957757048\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 721540649.\n --> test:1:1\n |\n 1 | 721540649\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 390746493.\n --> test:1:1\n |\n 1 | 390746493\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 211251725.\n --> test:1:1\n |\n 1 | 211251725\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 938266114.\n --> test:1:1\n |\n 1 | 938266114\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 156985870.\n --> test:1:1\n |\n 1 | 156985870\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 703831126.\n --> test:1:1\n |\n 1 | 703831126\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 729964155.\n --> test:1:1\n |\n 1 | 729964155\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 988151305.\n --> test:1:1\n |\n 1 | 988151305\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 320872435.\n --> test:1:1\n |\n 1 | 320872435\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 719287167.\n --> test:1:1\n |\n 1 | 719287167\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 152289486.\n --> test:1:1\n |\n 1 | 152289486\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 740067975.\n --> test:1:1\n |\n 1 | 740067975\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 728627816.\n --> test:1:1\n |\n 1 | 728627816\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 385008978.\n --> test:1:1\n |\n 1 | 385008978\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 553967635.\n --> test:1:1\n |\n 1 | 553967635\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 71980713.\n --> test:1:1\n |\n 1 | 71980713\n | ^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 519444716.\n --> test:1:1\n |\n 1 | 519444716\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 116499965.\n --> test:1:1\n |\n 1 | 116499965\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 717422268.\n --> test:1:1\n |\n 1 | 717422268\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 18966279.\n --> test:1:1\n |\n 1 | 18966279\n | ^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 22458638.\n --> test:1:1\n |\n 1 | 22458638\n | ^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 857282620.\n --> test:1:1\n |\n 1 | 857282620\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 920675898.\n --> test:1:1\n |\n 1 | 920675898\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 762235516.\n --> test:1:1\n |\n 1 | 762235516\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 469018377.\n --> test:1:1\n |\n 1 | 469018377\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 199986521.\n --> test:1:1\n |\n 1 | 199986521\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 536679358.\n --> test:1:1\n |\n 1 | 536679358\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 591399452.\n --> test:1:1\n |\n 1 | 591399452\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 83083158.\n --> test:1:1\n |\n 1 | 83083158\n | ^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 599449051.\n --> test:1:1\n |\n 1 | 599449051\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 445442318.\n --> test:1:1\n |\n 1 | 445442318\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 585486590.\n --> test:1:1\n |\n 1 | 585486590\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 209278800.\n --> test:1:1\n |\n 1 | 209278800\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 873568117.\n --> test:1:1\n |\n 1 | 873568117\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 664470940.\n --> test:1:1\n |\n 1 | 664470940\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 465262783.\n --> test:1:1\n |\n 1 | 465262783\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 605652874.\n --> test:1:1\n |\n 1 | 605652874\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 376803940.\n --> test:1:1\n |\n 1 | 376803940\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 965247040.\n --> test:1:1\n |\n 1 | 965247040\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 598474509.\n --> test:1:1\n |\n 1 | 598474509\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 845119918.\n --> test:1:1\n |\n 1 | 845119918\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 648159133.\n --> test:1:1\n |\n 1 | 648159133\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 669051032.\n --> test:1:1\n |\n 1 | 669051032\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 800600261.\n --> test:1:1\n |\n 1 | 800600261\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 434689764.\n --> test:1:1\n |\n 1 | 434689764\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 520060080.\n --> test:1:1\n |\n 1 | 520060080\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 804659385.\n --> test:1:1\n |\n 1 | 804659385\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 537828058.\n --> test:1:1\n |\n 1 | 537828058\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 716600292.\n --> test:1:1\n |\n 1 | 716600292\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 387020273.\n --> test:1:1\n |\n 1 | 387020273\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 199375617.\n --> test:1:1\n |\n 1 | 199375617\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 680337189.\n --> test:1:1\n |\n 1 | 680337189\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 818479931.\n --> test:1:1\n |\n 1 | 818479931\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 893693281.\n --> test:1:1\n |\n 1 | 893693281\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 87377802.\n --> test:1:1\n |\n 1 | 87377802\n | ^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 84699261.\n --> test:1:1\n |\n 1 | 84699261\n | ^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 292826090.\n --> test:1:1\n |\n 1 | 292826090\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 569171405.\n --> test:1:1\n |\n 1 | 569171405\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 387436237.\n --> test:1:1\n |\n 1 | 387436237\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 150682190.\n --> test:1:1\n |\n 1 | 150682190\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 888770419.\n --> test:1:1\n |\n 1 | 888770419\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 824696431.\n --> test:1:1\n |\n 1 | 824696431\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 765659803.\n --> test:1:1\n |\n 1 | 765659803\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 270163693.\n --> test:1:1\n |\n 1 | 270163693\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 427940240.\n --> test:1:1\n |\n 1 | 427940240\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 504997332.\n --> test:1:1\n |\n 1 | 504997332\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 337808338.\n --> test:1:1\n |\n 1 | 337808338\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 907200008.\n --> test:1:1\n |\n 1 | 907200008\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 757177889.\n --> test:1:1\n |\n 1 | 757177889\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 696697188.\n --> test:1:1\n |\n 1 | 696697188\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 41376051.\n --> test:1:1\n |\n 1 | 41376051\n | ^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 496293518.\n --> test:1:1\n |\n 1 | 496293518\n | ^^^^^^^^^"
- "Error [EPAR0370030]: Could not parse the implicit value: 251218820.\n --> test:1:1\n |\n 1 | 251218820\n | ^^^^^^^^^"

View File

@ -2,17 +2,17 @@
namespace: Token
expectation: Fail
outputs:
- "Error [EPAR0370025]: Expected a closed string but found `Hello world!`."
- "Error [EPAR0370025]: Expected a closed string but found `\"`."
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370024]: Expected a valid escape character but found `l`."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `a`."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `\"`."
- "Error [EPAR0370031]: Expected a valid hex character but found `FF`."
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `}`."
- "Error [EPAR0370038]: There was no opening `{` after starting an escaped unicode `6`."
- "Error [EPAR0370033]: There was no closing `}` after a escaped unicode `af🦀\"`."
- "Error [EPAR0370025]: Expected a closed string but found `\"`."
- "Error [EPAR0370025]: Expected a closed string but found `⭇😍;`."
- "Error [EPAR0370044]: Unicode bidi override code point encountered."
- "Error [EPAR0370023]: Expected a closed string but found `Hello world!`."
- "Error [EPAR0370023]: Expected a closed string but found `\"`."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370022]: Expected a valid escape character but found `l`."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `a`."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `\"`."
- "Error [EPAR0370029]: Expected a valid hex character but found `FF`."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `}`."
- "Error [EPAR0370036]: There was no opening `{` after starting an escaped unicode `6`."
- "Error [EPAR0370031]: There was no closing `}` after a escaped unicode `af🦀\"`."
- "Error [EPAR0370023]: Expected a closed string but found `\"`."
- "Error [EPAR0370023]: Expected a closed string but found `⭇😍;`."
- "Error [EPAR0370042]: Unicode bidi override code point encountered."

View File

@ -2,15 +2,15 @@
namespace: ParseExpression
expectation: Fail
outputs:
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `@test`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `@test`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '&&'\n --> test:1:1\n |\n 1 | &&\n | ^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '||'\n --> test:1:1\n |\n 1 | ||\n | ^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '=='\n --> test:1:1\n |\n 1 | ==\n | ^^"
@ -46,22 +46,22 @@ outputs:
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '?'\n --> test:1:1\n |\n 1 | ?\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '->'\n --> test:1:1\n |\n 1 | ->\n | ^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '_'\n --> test:1:1\n |\n 1 | _\n | ^"
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'console'\n --> test:1:1\n |\n 1 | console\n | ^^^^^^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'const'\n --> test:1:1\n |\n 1 | const\n | ^^^^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'else'\n --> test:1:1\n |\n 1 | else\n | ^^^^"
@ -70,7 +70,5 @@ outputs:
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if\n | ^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'in'\n --> test:1:1\n |\n 1 | in\n | ^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'let'\n --> test:1:1\n |\n 1 | let\n | ^^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'mut'\n --> test:1:1\n |\n 1 | mut\n | ^^^"
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'return'\n --> test:1:1\n |\n 1 | return\n | ^^^^^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'type'\n --> test:1:1\n |\n 1 | type\n | ^^^^"

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370030]: Could not lex the following content: `@foo(?, bar, ?)\nfunction x() {\n return ();\n}\n\n@bar(123) // ints not vali\nfunction x() {\n return ();\n}\n\n\n@context // recovery witness\nfunction x() {\n return ();\n}\n`."
- "Error [EPAR0370028]: Could not lex the following content: `@foo(?, bar, ?)\nfunction x() {\n return ();\n}\n\n@bar(123) // ints not vali\nfunction x() {\n return ();\n}\n\n\n@context // recovery witness\nfunction x() {\n return ();\n}\n`."

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370030]: Could not lex the following content: `@context\nfunction f() {\n return ();\n}\n\n@context // recovery witness\nfunction g() {\n return ();\n}\n`."
- "Error [EPAR0370028]: Could not lex the following content: `@context\nfunction f() {\n return ();\n}\n\n@context // recovery witness\nfunction g() {\n return ();\n}\n`."

View File

@ -1,127 +1,5 @@
---
namespace: Parse
expectation: Pass
expectation: Fail
outputs:
- name: ""
expected_input: []
functions:
"{\"name\":\"x\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":12}\"}":
identifier: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":12}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"lo\\\":22,\\\"hi\\\":23}\"}"
mode: Constant
type_:
IntegerType: U32
span:
lo: 22
hi: 23
output:
IntegerType: U8
core_mapping: ~
block:
statements:
- Conditional:
condition:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"lo\\\":45,\\\"hi\\\":46}\"}"
right:
Value:
Integer:
- U32
- "5"
- span:
lo: 49
hi: 53
op: Lt
span:
lo: 45
hi: 53
block:
statements:
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":64,\\\"hi\\\":65}\"}"
arguments:
- Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"lo\\\":66,\\\"hi\\\":67}\"}"
right:
Value:
Integer:
- U32
- "1"
- span:
lo: 68
hi: 72
op: Add
span:
lo: 66
hi: 72
span:
lo: 64
hi: 73
span:
lo: 64
hi: 73
span:
lo: 54
hi: 80
next: ~
span:
lo: 42
hi: 80
span:
lo: 36
hi: 82
span:
lo: 2
hi: 82
"{\"name\":\"main\",\"span\":\"{\\\"lo\\\":93,\\\"hi\\\":97}\"}":
identifier: "{\"name\":\"main\",\"span\":\"{\\\"lo\\\":93,\\\"hi\\\":97}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"lo\\\":98,\\\"hi\\\":99}\"}"
mode: Private
type_: Boolean
span:
lo: 98
hi: 99
output: Boolean
core_mapping: ~
block:
statements:
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":121,\\\"hi\\\":122}\"}"
arguments:
- Value:
Integer:
- U32
- "1"
- span:
lo: 123
hi: 127
span:
lo: 121
hi: 128
span:
lo: 121
hi: 128
- Return:
expression:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"lo\\\":141,\\\"hi\\\":142}\"}"
span:
lo: 134
hi: 142
span:
lo: 115
hi: 145
span:
lo: 84
hi: 145
- "Error [EPAR0370043]: Expression statements are no longer supported.\n --> test:5:9\n |\n 5 | x(y+1u32);\n | ^^^^^^^^^^\nError [EPAR0370043]: Expression statements are no longer supported.\n --> test:10:5\n |\n 10 | x(1u32);\n | ^^^^^^^^"

View File

@ -1,5 +0,0 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'input'\n --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^"

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370030]: Could not lex the following content: `\\`."
- "Error [EPAR0370028]: Could not lex the following content: `\\`."

View File

@ -1,71 +1,5 @@
---
namespace: Parse
expectation: Pass
expectation: Fail
outputs:
- name: ""
expected_input: []
functions:
"{\"name\":\"inf\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":14}\"}":
identifier: "{\"name\":\"inf\",\"span\":\"{\\\"lo\\\":11,\\\"hi\\\":14}\"}"
input: []
output:
IntegerType: U8
core_mapping: ~
block:
statements:
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"inf\",\"span\":\"{\\\"lo\\\":29,\\\"hi\\\":32}\"}"
arguments: []
span:
lo: 29
hi: 34
span:
lo: 29
hi: 34
span:
lo: 23
hi: 37
span:
lo: 2
hi: 37
"{\"name\":\"main\",\"span\":\"{\\\"lo\\\":48,\\\"hi\\\":52}\"}":
identifier: "{\"name\":\"main\",\"span\":\"{\\\"lo\\\":48,\\\"hi\\\":52}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"lo\\\":53,\\\"hi\\\":54}\"}"
mode: Private
type_: Boolean
span:
lo: 53
hi: 54
output: Boolean
core_mapping: ~
block:
statements:
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"inf\",\"span\":\"{\\\"lo\\\":76,\\\"hi\\\":79}\"}"
arguments: []
span:
lo: 76
hi: 81
span:
lo: 76
hi: 81
- Return:
expression:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"lo\\\":94,\\\"hi\\\":95}\"}"
span:
lo: 87
hi: 95
span:
lo: 70
hi: 98
span:
lo: 39
hi: 98
- "Error [EPAR0370043]: Expression statements are no longer supported.\n --> test:4:5\n |\n 4 | inf();\n | ^^^^^^\nError [EPAR0370043]: Expression statements are no longer supported.\n --> test:8:5\n |\n 8 | inf();\n | ^^^^^^"

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370013]: function func(mut a: u32) { ... } is deprecated. Passed variables are mutable by default.\n --> test:3:12\n |\n 3 | function f(mut a: u8) {}\n | ^^^^^\nError [EPAR0370005]: expected -> -- got '{'\n --> test:3:23\n |\n 3 | function f(mut a: u8) {}\n | ^"
- "Error [EPAR0370005]: expected : -- got 'a'\n --> test:3:16\n |\n 3 | function f(mut a: u8) {}\n | ^"

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370042]: A parameter cannot be both public and const.\n --> test:3:20\n |\n 3 | function x(x: u32, public const y: i32) {\n | ^^^^^^^^^^^^"
- "Error [EPAR0370040]: A parameter cannot be both public and const.\n --> test:3:20\n |\n 3 | function x(x: u32, public const y: i32) {\n | ^^^^^^^^^^^^"

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370015]: \"test function...\" is deprecated. Did you mean @test annotation?\n --> test:3:1\n |\n 3 | test main() {}\n | ^^^^"
- "Error [EPAR0370013]: \"test function...\" is deprecated. Did you mean @test annotation?\n --> test:3:1\n |\n 3 | test main() {}\n | ^^^^"

View File

@ -2,4 +2,4 @@
namespace: Input
expectation: Fail
outputs:
- "Error [EPAR0370042]: A parameter cannot be both public and const.\n --> test:4:1\n |\n 4 | public constant a: bool = true;\n | ^^^^^^^^^^^^^^^"
- "Error [EPAR0370040]: A parameter cannot be both public and const.\n --> test:4:1\n |\n 4 | public constant a: bool = true;\n | ^^^^^^^^^^^^^^^"

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370030]: Could not lex the following content: `\\`."
- "Error [EPAR0370028]: Could not lex the following content: `\\`."

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370044]: Unicode bidi override code point encountered."
- "Error [EPAR0370042]: Unicode bidi override code point encountered."

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370044]: Unicode bidi override code point encountered."
- "Error [EPAR0370042]: Unicode bidi override code point encountered."

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370030]: Could not lex the following content: `$`."
- "Error [EPAR0370028]: Could not lex the following content: `$`."

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370030]: Could not lex the following content: `\\1u8`."
- "Error [EPAR0370028]: Could not lex the following content: `\\1u8`."

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370036]: A hex number `0x..` was provided but hex is not allowed."
- "Error [EPAR0370034]: A hex number `0x..` was provided but hex is not allowed."

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370025]: Expected a closed string but found ``."
- "Error [EPAR0370023]: Expected a closed string but found ``."

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370030]: Could not lex the following content: `~`."
- "Error [EPAR0370028]: Could not lex the following content: `~`."

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."

View File

@ -3,7 +3,7 @@ namespace: ParseStatement
expectation: Fail
outputs:
- "Error [EPAR0370005]: expected ; -- got ':'\n --> test:1:2\n |\n 1 | x::y = y;\n | ^"
- "Error [EPAR0370032]: Could not parse the implicit value: 5.\n --> test:1:1\n |\n 1 | 5 = y;\n | ^"
- "Error [EPAR0370030]: Could not parse the implicit value: 5.\n --> test:1:1\n |\n 1 | 5 = y;\n | ^"
- "Error [EPAR0370011]: invalid assignment target\n --> test:1:1\n |\n 1 | x + x = y;\n | ^^^^^"
- "Error [EPAR0370011]: invalid assignment target\n --> test:1:1\n |\n 1 | -x = y;\n | ^^"
- "Error [EPAR0370011]: invalid assignment target\n --> test:1:1\n |\n 1 | !x = y;\n | ^^"
@ -15,4 +15,4 @@ outputs:
- "Error [EPAR0370005]: expected ; -- got '{'\n --> test:1:3\n |\n 1 | x {x: y, y: z} = y;\n | ^"
- "Error [EPAR0370011]: invalid assignment target\n --> test:1:1\n |\n 1 | x() = y;\n | ^^^"
- "Error [EPAR0370009]: unexpected string: expected 'int or ident', got 'y'\n --> test:1:3\n |\n 1 | x.y() = y;\n | ^"
- "Error [EPAR0370030]: Could not lex the following content: `🦀 = y;`."
- "Error [EPAR0370028]: Could not lex the following content: `🦀 = y;`."

View File

@ -125,12 +125,6 @@ outputs:
hi: 6
block:
statements:
- Expression:
expression:
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"lo\\\":9,\\\"hi\\\":13}\"}"
span:
lo: 9
hi: 13
- Return:
expression:
Value:
@ -138,15 +132,15 @@ outputs:
- U8
- "0"
- span:
lo: 22
hi: 25
lo: 16
hi: 19
span:
lo: 15
hi: 25
lo: 9
hi: 19
span:
lo: 7
hi: 28
hi: 22
next: ~
span:
lo: 0
hi: 28
hi: 22

View File

@ -2,6 +2,6 @@
namespace: ParseStatement
expectation: Fail
outputs:
- "Error [EPAR0370044]: Unicode bidi override code point encountered."
- "Error [EPAR0370042]: Unicode bidi override code point encountered."
- "Error [EPAR0370009]: unexpected string: expected 'formatted string', got '1'\n --> test:1:13\n |\n 1 | console.log(1);\n | ^"
- "Error [EPAR0370007]: unexpected identifier: expected 'assert', 'error', 'log' -- got 'test'\n --> test:1:9\n |\n 1 | console.test();\n | ^^^^"

View File

@ -2,26 +2,26 @@
namespace: ParseStatement
expectation: Fail
outputs:
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = expr;\n | ^^^^^^^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:11\n |\n 1 | let mut x = expr;\n | ^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = ();\n | ^^^^^^^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:11\n |\n 1 | let mut x = ();\n | ^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x+y;\n | ^^^^^^^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:11\n |\n 1 | let mut x = x+y;\n | ^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = (x,y);\n | ^^^^^^^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:11\n |\n 1 | let mut x = (x,y);\n | ^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x = x();\n | ^^^^^^^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:11\n |\n 1 | let mut x = x();\n | ^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = expr;\n | ^^^^^^^^^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:13\n |\n 1 | const mut x = expr;\n | ^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = ();\n | ^^^^^^^^^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:13\n |\n 1 | const mut x = ();\n | ^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x+y;\n | ^^^^^^^^^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:13\n |\n 1 | const mut x = x+y;\n | ^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = (x,y);\n | ^^^^^^^^^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:13\n |\n 1 | const mut x = (x,y);\n | ^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x = x();\n | ^^^^^^^^^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:13\n |\n 1 | const mut x = x();\n | ^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = expr;\n | ^^^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = ();\n | ^^^^^^^\nError [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:18\n |\n 1 | let mut x: u32 = ();\n | ^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x+y;\n | ^^^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = (x,y);\n | ^^^^^^^\nError [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:18\n |\n 1 | let mut x: u32 = (x,y);\n | ^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | let mut x: u32 = x();\n | ^^^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = expr;\n | ^^^^^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = ();\n | ^^^^^^^^^\nError [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:20\n |\n 1 | const mut x: u32 = ();\n | ^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x+y;\n | ^^^^^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = (x,y);\n | ^^^^^^^^^\nError [EPAR0370005]: expected A valid expression. -- got 'A tuple expression.'\n --> test:1:20\n |\n 1 | const mut x: u32 = (x,y);\n | ^^^^^"
- "Error [EPAR0370014]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:1:1\n |\n 1 | const mut x: u32 = x();\n | ^^^^^^^^^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:9\n |\n 1 | let mut x = expr;\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:9\n |\n 1 | let mut x = ();\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:9\n |\n 1 | let mut x = x+y;\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:9\n |\n 1 | let mut x = (x,y);\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:9\n |\n 1 | let mut x = x();\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:11\n |\n 1 | const mut x = expr;\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:11\n |\n 1 | const mut x = ();\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:11\n |\n 1 | const mut x = x+y;\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:11\n |\n 1 | const mut x = (x,y);\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:11\n |\n 1 | const mut x = x();\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:9\n |\n 1 | let mut x: u32 = expr;\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:9\n |\n 1 | let mut x: u32 = ();\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:9\n |\n 1 | let mut x: u32 = x+y;\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:9\n |\n 1 | let mut x: u32 = (x,y);\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:9\n |\n 1 | let mut x: u32 = x();\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:11\n |\n 1 | const mut x: u32 = expr;\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:11\n |\n 1 | const mut x: u32 = ();\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:11\n |\n 1 | const mut x: u32 = x+y;\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:11\n |\n 1 | const mut x: u32 = (x,y);\n | ^"
- "Error [EPAR0370005]: expected : -- got 'x'\n --> test:1:11\n |\n 1 | const mut x: u32 = x();\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^"
@ -43,6 +43,6 @@ outputs:
- "Error [EPAR0370005]: expected 'address', 'bool', 'field', 'group', 'i8', 'i16', 'i32', 'i64', 'i128', 'u8', 'u16', 'u32', 'u64', 'u128', 'char', 'scalar' -- got '['\n --> test:1:8\n |\n 1 | let x: [u8;\n | ^"
- "Error [EPAR0370005]: expected 'address', 'bool', 'field', 'group', 'i8', 'i16', 'i32', 'i64', 'i128', 'u8', 'u16', 'u32', 'u64', 'u128', 'char', 'scalar' -- got '['\n --> test:1:8\n |\n 1 | let x: [u8; 1u8] = [1,\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ']'\n --> test:1:15\n |\n 1 | let dbg: u8 = ];\n | ^"
- "Error [EPAR0370030]: Could not lex the following content: `🦀: u8 = 0;`."
- "Error [EPAR0370039]: do not put parens around single variable names\n --> test:1:6\n |\n 1 | let (x) = ...;\n | ^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:9\n |\n 1 | let (x) = ...;\n | ^"
- "Error [EPAR0370039]: do not put parens around single variable names\n --> test:1:6\n |\n 1 | let (x,) = ...;\n | ^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:10\n |\n 1 | let (x,) = ...;\n | ^"
- "Error [EPAR0370028]: Could not lex the following content: `🦀: u8 = 0;`."
- "Error [EPAR0370037]: do not put parens around single variable names\n --> test:1:6\n |\n 1 | let (x) = ...;\n | ^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:9\n |\n 1 | let (x) = ...;\n | ^"
- "Error [EPAR0370037]: do not put parens around single variable names\n --> test:1:6\n |\n 1 | let (x,) = ...;\n | ^\nError [EPAR0370005]: expected : -- got '='\n --> test:1:10\n |\n 1 | let (x,) = ...;\n | ^"

View File

@ -1,36 +1,7 @@
---
namespace: ParseStatement
expectation: Pass
expectation: Fail
outputs:
- Expression:
expression:
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"lo\\\":0,\\\"hi\\\":4}\"}"
span:
lo: 0
hi: 4
- Expression:
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":0,\\\"hi\\\":1}\"}"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"lo\\\":2,\\\"hi\\\":3}\"}"
op: Add
span:
lo: 0
hi: 3
span:
lo: 0
hi: 3
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":0,\\\"hi\\\":1}\"}"
arguments: []
span:
lo: 0
hi: 3
span:
lo: 0
hi: 3
- "Error [EPAR0370043]: Expression statements are no longer supported.\n --> test:1:1\n |\n 1 | expr;\n | ^^^^^"
- "Error [EPAR0370043]: Expression statements are no longer supported.\n --> test:1:1\n |\n 1 | x+y;\n | ^^^^"
- "Error [EPAR0370043]: Expression statements are no longer supported.\n --> test:1:1\n |\n 1 | x();\n | ^^^^"

View File

@ -4,7 +4,7 @@ expectation: Fail
outputs:
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ']'\n --> test:1:2\n |\n 1 | (];\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '['\n --> test:1:1\n |\n 1 | [);\n | ^"
- "Error [EPAR0370030]: Could not lex the following content: `\\y;`."
- "Error [EPAR0370041]: Found the char `;`, but expected `|`"
- "Error [EPAR0370028]: Could not lex the following content: `\\y;`."
- "Error [EPAR0370039]: Found the char `;`, but expected `|`"
- "Error [EPAR0370005]: expected ; -- got '['\n --> test:1:2\n |\n 1 | x[};\n | ^"
- "Error [EPAR0370005]: expected ) -- got ']'\n --> test:1:6\n |\n 1 | (x, y];\n | ^"

View File

@ -2,6 +2,6 @@
namespace: ParseStatement
expectation: Fail
outputs:
- "Error [EPAR0370036]: A hex number `0x..` was provided but hex is not allowed."
- "Error [EPAR0370036]: A hex number `0x..` was provided but hex is not allowed."
- "Error [EPAR0370036]: A hex number `0x..` was provided but hex is not allowed."
- "Error [EPAR0370034]: A hex number `0x..` was provided but hex is not allowed."
- "Error [EPAR0370034]: A hex number `0x..` was provided but hex is not allowed."
- "Error [EPAR0370034]: A hex number `0x..` was provided but hex is not allowed."

View File

@ -3,5 +3,5 @@ namespace: ParseStatement
expectation: Fail
outputs:
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '<eof>'\n --> test:1:1\n |\n 1 | return\n | ^^^^^^"
- "Error [EPAR0370032]: Could not parse the implicit value: 5.\n --> test:1:8\n |\n 1 | return 5\n | ^"
- "Error [EPAR0370030]: Could not parse the implicit value: 5.\n --> test:1:8\n |\n 1 | return 5\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:2:1\n |\n 2 | if x {}\n | ^^"

View File

@ -41,10 +41,10 @@ outputs:
- "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 [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "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 [EPAR0370032]: Could not parse the implicit value: 0.\n --> test:1:1\n |\n 1 | 0 x = 10u8;\n | ^"
- "Error [EPAR0370030]: Could not parse the implicit value: 0.\n --> test:1:1\n |\n 1 | 0 x = 10u8;\n | ^"

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."

View File

@ -48,7 +48,7 @@ outputs:
- "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_u32\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_u64\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_u128\n | ^"
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_return\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_self\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '0'\n --> test:1:3\n |\n 1 | x.0_Self\n | ^"

View File

@ -47,7 +47,7 @@ outputs:
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 u32 {}\n | ^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 u64 {}\n | ^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 u128 {}\n | ^^"
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 return {}\n | ^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 self {}\n | ^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 Self {}\n | ^^"

View File

@ -47,7 +47,7 @@ outputs:
- "Error [EPAR0370005]: expected ; -- got ':'\n --> test:1:2\n |\n 1 | x::u32\n | ^"
- "Error [EPAR0370005]: expected ; -- got ':'\n --> test:1:2\n |\n 1 | x::u64\n | ^"
- "Error [EPAR0370005]: expected ; -- got ':'\n --> test:1:2\n |\n 1 | x::u128\n | ^"
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370005]: expected ; -- got ':'\n --> test:1:2\n |\n 1 | x::return\n | ^"
- "Error [EPAR0370005]: expected ; -- got ':'\n --> test:1:2\n |\n 1 | x::self\n | ^"
- "Error [EPAR0370005]: expected ; -- got ':'\n --> test:1:2\n |\n 1 | x::Self\n | ^"

View File

@ -33,14 +33,14 @@ outputs:
- "Error [EPAR0370005]: expected : -- got '='\n --> test:1:7\n |\n 1 | let x = a u32 b;\n | ^"
- "Error [EPAR0370005]: expected : -- got '='\n --> test:1:7\n |\n 1 | let x = a u64 b;\n | ^"
- "Error [EPAR0370005]: expected : -- got '='\n --> test:1:7\n |\n 1 | let x = a u128 b;\n | ^"
- "Error [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370005]: expected : -- got '='\n --> test:1:7\n |\n 1 | let x = a return b;\n | ^"
- "Error [EPAR0370005]: expected : -- got '='\n --> test:1:7\n |\n 1 | let x = a self b;\n | ^"
- "Error [EPAR0370005]: expected : -- got '='\n --> test:1:7\n |\n 1 | let x = a Self b;\n | ^"
- "Error [EPAR0370005]: expected : -- got '='\n --> test:1:7\n |\n 1 | let x = a true b;\n | ^"
- "Error [EPAR0370005]: expected : -- got '='\n --> test:1:7\n |\n 1 | let x = a false b;\n | ^"
- "Error [EPAR0370005]: expected : -- got '='\n --> test:1:7\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 [EPAR0370043]: Expression statements are no longer supported.\n --> test:1:1\n |\n 1 | x;=b;\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 [EPAR0370005]: expected ; -- got '['\n --> test:1:2\n |\n 1 | x[=b;\n | ^"
@ -56,4 +56,9 @@ outputs:
- "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 [EPAR0370023]: Expected more characters to lex but found none."
- "Error [EPAR0370021]: Expected more characters to lex but found none."
- "Error [EPAR0370043]: Expression statements are no longer supported.\n --> test:1:1\n |\n 1 | x==b;\n | ^^^^^"
- "Error [EPAR0370043]: Expression statements are no longer supported.\n --> test:1:1\n |\n 1 | x!=b;\n | ^^^^^"
- "Error [EPAR0370043]: Expression statements are no longer supported.\n --> test:1:1\n |\n 1 | x>=b;\n | ^^^^^"
- "Error [EPAR0370043]: Expression statements are no longer supported.\n --> test:1:1\n |\n 1 | x<=b;\n | ^^^^^"
- "Error [EPAR0370043]: Expression statements are no longer supported.\n --> test:1:1\n |\n 1 | x>=b;\n | ^^^^^"

View File

@ -176,76 +176,6 @@ outputs:
span:
lo: 0
hi: 4
- Expression:
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":0,\\\"hi\\\":1}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"lo\\\":3,\\\"hi\\\":4}\"}"
op: Eq
span:
lo: 0
hi: 4
span:
lo: 0
hi: 4
- Expression:
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":0,\\\"hi\\\":1}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"lo\\\":3,\\\"hi\\\":4}\"}"
op: Ne
span:
lo: 0
hi: 4
span:
lo: 0
hi: 4
- Expression:
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":0,\\\"hi\\\":1}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"lo\\\":3,\\\"hi\\\":4}\"}"
op: Ge
span:
lo: 0
hi: 4
span:
lo: 0
hi: 4
- Expression:
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":0,\\\"hi\\\":1}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"lo\\\":3,\\\"hi\\\":4}\"}"
op: Le
span:
lo: 0
hi: 4
span:
lo: 0
hi: 4
- Expression:
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"lo\\\":0,\\\"hi\\\":1}\"}"
right:
Identifier: "{\"name\":\"b\",\"span\":\"{\\\"lo\\\":3,\\\"hi\\\":4}\"}"
op: Ge
span:
lo: 0
hi: 4
span:
lo: 0
hi: 4
- Assign:
operation: Assign
assignee:

View File

@ -1,5 +1,5 @@
/*
namespace: Token
namespace: ParseExpression
expectation: Fail
*/

View File

@ -139,10 +139,6 @@ in
let
mut
&
return
type

View File

@ -1,6 +1,6 @@
/*
namespace: Parse
expectation: Pass
expectation: Fail
*/
function x(constant y: u32) -> u8 {
@ -12,4 +12,4 @@ function x(constant y: u32) -> u8 {
function main(y: bool) -> bool {
x(1u32);
return y;
}
}

View File

@ -1,12 +0,0 @@
/*
namespace: Parse
expectation: Fail
*/
function x(const input) {
return ();
}
function y(constant input) {
return ();
}

View File

@ -1,6 +1,6 @@
/*
namespace: Parse
expectation: Pass
expectation: Fail
*/
function inf() -> u8 {
@ -10,4 +10,4 @@ function inf() -> u8 {
function main(y: bool) -> bool {
inf();
return y;
}
}

View File

@ -16,6 +16,5 @@ if (x) {} else {}
if x+y {} else if x+z {} else {}
if x+y {
expr;
return 0u8;
}
}

View File

@ -1,10 +1,10 @@
/*
namespace: ParseStatement
expectation: Pass
expectation: Fail
*/
expr;
x+y;
x();
x();

View File

@ -113,3 +113,13 @@ x<==b;
x..=b;
x&=b;
x==b;
x!=b;
x>=b;
x<=b;
x>=b;

View File

@ -20,16 +20,6 @@ let x: u8 = a > b;
x_=b;
x==b;
x!=b;
x>=b;
x<=b;
x>=b;
xconsole=b;
xconst=b;

View File

@ -137,7 +137,20 @@ pub fn run_tests<T: Runner>(runner: &T, expectation_category: &str) {
.unwrap()
.to_string();
let expectations: Option<TestExpectation> = None;
let expectations: Option<TestExpectation> = if expectation_path.exists() {
if !std::env::var("CLEAR_LEO_TEST_EXPECTATIONS")
.unwrap_or_default()
.trim()
.is_empty()
{
None
} else {
let raw = std::fs::read_to_string(&expectation_path).expect("failed to read expectations file");
Some(serde_yaml::from_str(&raw).expect("invalid yaml in expectations file"))
}
} else {
None
};
let end_of_header = content.find("*/").expect("failed to find header block in test");
let content = &content[end_of_header + 2..];