save progress before denver

This commit is contained in:
0rphon 2022-02-16 11:33:52 -08:00
parent 136a441fc6
commit d46a041895
9 changed files with 62 additions and 4 deletions

View File

@ -1,4 +1,3 @@
set CLEAR_LEO_TEST_EXPECTATIONS=
cargo clean
cd parser
set RUSTFLAGS=-Cinstrument-coverage

View File

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

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370003]: unexpected EOF\n --> test:3:1\n |\n 3 | const\n | ^^^^^"

View File

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

View File

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

View File

@ -0,0 +1,6 @@
/*
namespace: Parse
expectation: Fail
*/
const

View File

@ -54,3 +54,18 @@ let (,x,y) = ();
let (x,,y) = ();
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]);

View File

@ -0,0 +1,16 @@
/*
namespace: ParseStatement
expectation: Fail
*/
(];
[);
x\y;
(x,y|;
x[};
(x, y];