mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-23 18:21:38 +03:00
save progress before denver
This commit is contained in:
parent
136a441fc6
commit
d46a041895
@ -1,4 +1,3 @@
|
||||
set CLEAR_LEO_TEST_EXPECTATIONS=
|
||||
cargo clean
|
||||
cd parser
|
||||
set RUSTFLAGS=-Cinstrument-coverage
|
||||
|
@ -339,7 +339,7 @@ impl<'a> ParserContext<'a> {
|
||||
});
|
||||
}
|
||||
if let Some((int, span)) = self.eat_int() {
|
||||
let name = Symbol::intern(&int.value);
|
||||
let name = Symbol::intern(&int.value); //todo 0rphon: covered by unused import tests
|
||||
return Ok(Identifier { name, span });
|
||||
}
|
||||
self.expect_ident()
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370003]: unexpected EOF\n --> test:3:1\n |\n 3 | const\n | ^^^^^"
|
@ -26,3 +26,10 @@ outputs:
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ','\n --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'int', got ','\n --> test:1:16\n |\n 1 | let x: [u8; (2,,)] = [[0,0], [0,0]];\n | ^"
|
||||
- "Error [EPAR0370005]: expected 'i8', 'i16', 'i32', 'i64', 'i128', 'u8', 'u16', 'u32', 'u64', 'u128', 'field', 'group', 'address', 'bool', 'char' -- got 'const'\n --> test:1:8\n |\n 1 | let x: const = expr;\n | ^^^^^"
|
||||
- "Error [EPAR0370005]: expected 'i8', 'i16', 'i32', 'i64', 'i128', 'u8', 'u16', 'u32', 'u64', 'u128', 'field', 'group', 'address', 'bool', 'char' -- got 'let'\n --> test:1:10\n |\n 1 | const x: let = expr;\n | ^^^"
|
||||
- "Error [EPAR0370005]: expected 'i8', 'i16', 'i32', 'i64', 'i128', 'u8', 'u16', 'u32', 'u64', 'u128', 'field', 'group', 'address', 'bool', 'char' -- got 'mut'\n --> test:1:8\n |\n 1 | let x: mut = expr;\n | ^^^"
|
||||
- "Error [EPAR0370003]: unexpected EOF\n --> test:1:1\n |\n 1 | let\n | ^^^"
|
||||
- "Error [EPAR0370003]: unexpected EOF\n --> test:1:5\n |\n 1 | let x\n | ^"
|
||||
- "Error [EPAR0370003]: unexpected EOF\n --> test:1:6\n |\n 1 | let x:\n | ^"
|
||||
- "Error [EPAR0370005]: expected ) -- got ']'\n --> test:1:14\n |\n 1 | let x = (a, y]);\n | ^"
|
||||
|
@ -0,0 +1,10 @@
|
||||
---
|
||||
namespace: ParseStatement
|
||||
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:2\n |\n 1 | [);\n | ^"
|
||||
- "Error [EPAR0370000]: \\\n --> test:1:2\n |\n 1 | x\\y;\n | ^"
|
||||
- "Error [EPAR0370000]: |\n --> test:1:5\n |\n 1 | (x,y|;\n | ^"
|
||||
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '}'\n --> test:1:3\n |\n 1 | x[};\n | ^"
|
||||
- "Error [EPAR0370005]: expected ) -- got ']'\n --> test:1:6\n |\n 1 | (x, y];\n | ^"
|
6
tests/parser/functions/const_function_fail.leo
Normal file
6
tests/parser/functions/const_function_fail.leo
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
const
|
@ -107,4 +107,4 @@ let x: [[u8; 2]; 2] = [[0,0], [0,0]];
|
||||
let x: [u8; (2, 2)] = [[0,0], [0,0]];
|
||||
|
||||
|
||||
let x: address = aleo15u4r0gzjtqzepkgurgn7p3u5kkhs9p74rx6aun3uh2s5std6759svgmg53;
|
||||
let x: address = aleo15u4r0gzjtqzepkgurgn7p3u5kkhs9p74rx6aun3uh2s5std6759svgmg53;
|
||||
|
@ -53,4 +53,19 @@ let (,x,y) = ();
|
||||
|
||||
let (x,,y) = ();
|
||||
|
||||
let x: [u8; (2,,)] = [[0,0], [0,0]];
|
||||
let x: [u8; (2,,)] = [[0,0], [0,0]];
|
||||
|
||||
|
||||
let x: const = expr;
|
||||
|
||||
const x: let = expr;
|
||||
|
||||
let x: mut = expr;
|
||||
|
||||
let
|
||||
|
||||
let x
|
||||
|
||||
let x:
|
||||
|
||||
let x = (a, y]);
|
||||
|
16
tests/parser/statement/expression_fail.leo
Normal file
16
tests/parser/statement/expression_fail.leo
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
namespace: ParseStatement
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
(];
|
||||
|
||||
[);
|
||||
|
||||
x\y;
|
||||
|
||||
(x,y|;
|
||||
|
||||
x[};
|
||||
|
||||
(x, y];
|
Loading…
Reference in New Issue
Block a user