mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-24 02:31:44 +03:00
add missed cases, test unreachable exprs
This commit is contained in:
parent
22d24411b7
commit
9cb1f3632d
@ -0,0 +1,120 @@
|
|||||||
|
---
|
||||||
|
namespace: Parse
|
||||||
|
expectation: Pass
|
||||||
|
outputs:
|
||||||
|
- name: ""
|
||||||
|
expected_input: []
|
||||||
|
import_statements: []
|
||||||
|
imports: {}
|
||||||
|
aliases: {}
|
||||||
|
circuits: {}
|
||||||
|
global_consts: {}
|
||||||
|
functions:
|
||||||
|
"{\"name\":\"inf\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function inf() {\\\"}\"}":
|
||||||
|
annotations: {}
|
||||||
|
identifier: "{\"name\":\"inf\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function inf() {\\\"}\"}"
|
||||||
|
input: []
|
||||||
|
const_: false
|
||||||
|
output: ~
|
||||||
|
core_mapping: ~
|
||||||
|
block:
|
||||||
|
statements:
|
||||||
|
- Expression:
|
||||||
|
expression:
|
||||||
|
Call:
|
||||||
|
function:
|
||||||
|
Identifier: "{\"name\":\"inf\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" inf();\\\"}\"}"
|
||||||
|
arguments: []
|
||||||
|
span:
|
||||||
|
line_start: 4
|
||||||
|
line_stop: 4
|
||||||
|
col_start: 5
|
||||||
|
col_stop: 10
|
||||||
|
path: ""
|
||||||
|
content: " inf();"
|
||||||
|
span:
|
||||||
|
line_start: 4
|
||||||
|
line_stop: 4
|
||||||
|
col_start: 5
|
||||||
|
col_stop: 10
|
||||||
|
path: ""
|
||||||
|
content: " inf();"
|
||||||
|
span:
|
||||||
|
line_start: 3
|
||||||
|
line_stop: 5
|
||||||
|
col_start: 16
|
||||||
|
col_stop: 2
|
||||||
|
path: ""
|
||||||
|
content: "function inf() {\n ...\n}"
|
||||||
|
span:
|
||||||
|
line_start: 3
|
||||||
|
line_stop: 5
|
||||||
|
col_start: 1
|
||||||
|
col_stop: 2
|
||||||
|
path: ""
|
||||||
|
content: "function inf() {\n ...\n}"
|
||||||
|
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
|
||||||
|
annotations: {}
|
||||||
|
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
|
||||||
|
input:
|
||||||
|
- Variable:
|
||||||
|
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
|
||||||
|
const_: false
|
||||||
|
mutable: true
|
||||||
|
type_: Boolean
|
||||||
|
span:
|
||||||
|
line_start: 7
|
||||||
|
line_stop: 7
|
||||||
|
col_start: 15
|
||||||
|
col_stop: 16
|
||||||
|
path: ""
|
||||||
|
content: "function main(y: bool) -> bool {"
|
||||||
|
const_: false
|
||||||
|
output: Boolean
|
||||||
|
core_mapping: ~
|
||||||
|
block:
|
||||||
|
statements:
|
||||||
|
- Expression:
|
||||||
|
expression:
|
||||||
|
Call:
|
||||||
|
function:
|
||||||
|
Identifier: "{\"name\":\"inf\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":5,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" inf();\\\"}\"}"
|
||||||
|
arguments: []
|
||||||
|
span:
|
||||||
|
line_start: 8
|
||||||
|
line_stop: 8
|
||||||
|
col_start: 5
|
||||||
|
col_stop: 10
|
||||||
|
path: ""
|
||||||
|
content: " inf();"
|
||||||
|
span:
|
||||||
|
line_start: 8
|
||||||
|
line_stop: 8
|
||||||
|
col_start: 5
|
||||||
|
col_stop: 10
|
||||||
|
path: ""
|
||||||
|
content: " inf();"
|
||||||
|
- Return:
|
||||||
|
expression:
|
||||||
|
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return y;\\\"}\"}"
|
||||||
|
span:
|
||||||
|
line_start: 9
|
||||||
|
line_stop: 9
|
||||||
|
col_start: 5
|
||||||
|
col_stop: 13
|
||||||
|
path: ""
|
||||||
|
content: " return y;"
|
||||||
|
span:
|
||||||
|
line_start: 7
|
||||||
|
line_stop: 10
|
||||||
|
col_start: 32
|
||||||
|
col_stop: 2
|
||||||
|
path: ""
|
||||||
|
content: "function main(y: bool) -> bool {\n ...\n ...\n}"
|
||||||
|
span:
|
||||||
|
line_start: 7
|
||||||
|
line_stop: 10
|
||||||
|
col_start: 1
|
||||||
|
col_stop: 2
|
||||||
|
path: ""
|
||||||
|
content: "function main(y: bool) -> bool {\n ...\n ...\n}"
|
@ -2,4 +2,4 @@
|
|||||||
namespace: Parse
|
namespace: Parse
|
||||||
expectation: Fail
|
expectation: Fail
|
||||||
outputs:
|
outputs:
|
||||||
- "Error [EPAR0370005]: expected { -- got 'circuit'\n --> test:4:1\n |\n 4 | circuit ;\n | ^^^^^^^"
|
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ';'\n --> test:3:9\n |\n 3 | circuit ;\n | ^"
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Parse
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ';'\n --> test:3:9\n |\n 3 | circuit ;\n | ^"
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: Parse
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370005]: expected { -- got 'circuit'\n --> test:4:1\n |\n 4 | circuit ;\n | ^^^^^^^"
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
namespace: Parse
|
namespace: ParseStatement
|
||||||
expectation: Fail
|
expectation: Fail
|
||||||
outputs:
|
outputs:
|
||||||
- "Error [EPAR0370005]: expected 'import', 'circuit', 'function', 'test', '@' -- got 'x'\n --> test:3:1\n |\n 3 | x.0_try_to_hit_hit_eat_int_unreachable\n | ^"
|
- "Error [EPAR0370009]: unexpected string: expected 'int or ident', got '-'\n --> test:1:3\n |\n 1 | x.-12\n | ^"
|
||||||
|
@ -0,0 +1,56 @@
|
|||||||
|
---
|
||||||
|
namespace: ParseExpression
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 ; {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 . {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 import {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 , {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 * {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 + {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 - {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 / {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 [ {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 ] {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 { {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 } {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 ( {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 ) {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 : {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 :: {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 ? {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 _ {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 = {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 == {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 ! {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 != {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 > {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 >= {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 < {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 <= {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 > {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 .. {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 as {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 console {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 const {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 let {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 for {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 if {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 else {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 i8 {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 i16 {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 i32 {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 i64 {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 i128 {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 u8 {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 u16 {}\n | ^^"
|
||||||
|
- "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 [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 & {}\n | ^^"
|
||||||
|
- "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 | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 true {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 false {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 0 {}\n | ^^"
|
@ -0,0 +1,52 @@
|
|||||||
|
---
|
||||||
|
namespace: ParseExpression
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 ; {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 . {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 import {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 , {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 * {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 + {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 - {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 / {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 [ {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 ] {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 { {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 } {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 ? {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 _ {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 = {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 == {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 ! {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 != {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 > {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 >= {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 < {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 <= {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 > {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 .. {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 as {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 console {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 const {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 let {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 for {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 if {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 else {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 i8 {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 i16 {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 i32 {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 i64 {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 i128 {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 u8 {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 u16 {}\n | ^^"
|
||||||
|
- "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 [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 & {}\n | ^^"
|
||||||
|
- "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 | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 true {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 false {}\n | ^^"
|
||||||
|
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'if'\n --> test:1:1\n |\n 1 | if 10 0 {}\n | ^^"
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
namespace: Parse
|
namespace: ParseStatement
|
||||||
expectation: Fail
|
expectation: Fail
|
||||||
outputs:
|
outputs:
|
||||||
- "Error [EPAR0370005]: expected 'import', 'circuit', 'function', 'test', '@' -- got 'x'\n --> test:3:1\n |\n 3 | x::try_to_hit_expect_ident_unreachable\n | ^"
|
- "Error [EPAR0370009]: unexpected string: expected 'ident', got ';'\n --> test:1:4\n |\n 1 | x::;\n | ^"
|
||||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
namespace: ParseStatement
|
||||||
|
expectation: Fail
|
||||||
|
outputs:
|
||||||
|
- "did not consume all input: ';' @ 1:11-12\n'let' @ 2:1-4\n'x' @ 2:5-6\n'=' @ 2:7-8\n'a' @ 2:9-10\n'.' @ 2:10-11\n';' @ 2:11-12\n'let' @ 3:1-4\n'x' @ 3:5-6\n'=' @ 3:7-8\n'aimport' @ 3:9-16\n';' @ 3:16-17\n'let' @ 4:1-4\n'x' @ 4:5-6\n'=' @ 4:7-8\n'a' @ 4:9-10\n',' @ 4:10-11\n';' @ 4:11-12\n'let' @ 5:1-4\n'x' @ 5:5-6\n'=' @ 5:7-8\n'a' @ 5:9-10\n'[' @ 5:10-11\n';' @ 5:11-12\n'let' @ 6:1-4\n'x' @ 6:5-6\n'=' @ 6:7-8\n'a' @ 6:9-10\n']' @ 6:10-11\n';' @ 6:11-12\n'let' @ 7:1-4\n'x' @ 7:5-6\n'=' @ 7:7-8\n'a' @ 7:9-10\n'{' @ 7:10-11\n';' @ 7:11-12\n'let' @ 8:1-4\n'x' @ 8:5-6\n'=' @ 8:7-8\n'a' @ 8:9-10\n'}' @ 8:10-11\n';' @ 8:11-12\n'let' @ 9:1-4\n'x' @ 9:5-6\n'=' @ 9:7-8\n'a' @ 9:9-10\n')' @ 9:10-11\n';' @ 9:11-12\n'let' @ 10:1-4\n'x' @ 10:5-6\n'=' @ 10:7-8\n'a' @ 10:9-10\n':' @ 10:10-11\n';' @ 10:11-12\n'let' @ 11:1-4\n'x' @ 11:5-6\n'=' @ 11:7-8\n'a' @ 11:9-10\n'?' @ 11:10-11\n';' @ 11:11-12\n'let' @ 12:1-4\n'x' @ 12:5-6\n'=' @ 12:7-8\n'a_' @ 12:9-11\n';' @ 12:11-12\n'let' @ 13:1-4\n'x' @ 13:5-6\n'=' @ 13:7-8\n'a' @ 13:9-10\n'=' @ 13:10-11\n';' @ 13:11-12\n'let' @ 14:1-4\n'x' @ 14:5-6\n'=' @ 14:7-8\n'a' @ 14:9-10\n'==' @ 14:10-12\n';' @ 14:12-13\n'let' @ 15:1-4\n'x' @ 15:5-6\n'=' @ 15:7-8\n'a' @ 15:9-10\n'!' @ 15:10-11\n';' @ 15:11-12\n'let' @ 16:1-4\n'x' @ 16:5-6\n'=' @ 16:7-8\n'a' @ 16:9-10\n'!=' @ 16:10-12\n';' @ 16:12-13\n'let' @ 17:1-4\n'x' @ 17:5-6\n'=' @ 17:7-8\n'a' @ 17:9-10\n'>' @ 17:10-11\n';' @ 17:11-12\n'let' @ 18:1-4\n'x' @ 18:5-6\n'=' @ 18:7-8\n'a' @ 18:9-10\n'>=' @ 18:10-12\n';' @ 18:12-13\n'let' @ 19:1-4\n'x' @ 19:5-6\n'=' @ 19:7-8\n'a' @ 19:9-10\n'<' @ 19:10-11\n';' @ 19:11-12\n'let' @ 20:1-4\n'x' @ 20:5-6\n'=' @ 20:7-8\n'a' @ 20:9-10\n'<=' @ 20:10-12\n';' @ 20:12-13\n'let' @ 21:1-4\n'x' @ 21:5-6\n'=' @ 21:7-8\n'a' @ 21:9-10\n'>' @ 21:10-11\n';' @ 21:11-12\n'let' @ 22:1-4\n'x' @ 22:5-6\n'=' @ 22:7-8\n'a' @ 22:9-10\n'..' @ 22:10-12\n';' @ 22:12-13\n'let' @ 23:1-4\n'x' @ 23:5-6\n'=' @ 23:7-8\n'aas' @ 23:9-12\n';' @ 23:12-13\n'let' @ 24:1-4\n'x' @ 24:5-6\n'=' @ 24:7-8\n'aconsole' @ 24:9-17\n';' @ 24:17-18\n'let' @ 25:1-4\n'x' @ 25:5-6\n'=' @ 25:7-8\n'aconst' @ 25:9-15\n';' @ 25:15-16\n'let' @ 26:1-4\n'x' @ 26:5-6\n'=' @ 26:7-8\n'alet' @ 26:9-13\n';' @ 26:13-14\n'let' @ 27:1-4\n'x' @ 27:5-6\n'=' @ 27:7-8\n'afor' @ 27:9-13\n';' @ 27:13-14\n'let' @ 28:1-4\n'x' @ 28:5-6\n'=' @ 28:7-8\n'aif' @ 28:9-12\n';' @ 28:12-13\n'let' @ 29:1-4\n'x' @ 29:5-6\n'=' @ 29:7-8\n'aelse' @ 29:9-14\n';' @ 29:14-15\n'let' @ 30:1-4\n'x' @ 30:5-6\n'=' @ 30:7-8\n'ai8' @ 30:9-12\n';' @ 30:12-13\n'let' @ 31:1-4\n'x' @ 31:5-6\n'=' @ 31:7-8\n'ai16' @ 31:9-13\n';' @ 31:13-14\n'let' @ 32:1-4\n'x' @ 32:5-6\n'=' @ 32:7-8\n'ai32' @ 32:9-13\n';' @ 32:13-14\n'let' @ 33:1-4\n'x' @ 33:5-6\n'=' @ 33:7-8\n'ai64' @ 33:9-13\n';' @ 33:13-14\n'let' @ 34:1-4\n'x' @ 34:5-6\n'=' @ 34:7-8\n'ai128' @ 34:9-14\n';' @ 34:14-15\n'let' @ 35:1-4\n'x' @ 35:5-6\n'=' @ 35:7-8\n'au8' @ 35:9-12\n';' @ 35:12-13\n'let' @ 36:1-4\n'x' @ 36:5-6\n'=' @ 36:7-8\n'au16' @ 36:9-13\n';' @ 36:13-14\n'let' @ 37:1-4\n'x' @ 37:5-6\n'=' @ 37:7-8\n'au32' @ 37:9-13\n';' @ 37:13-14\n'let' @ 38:1-4\n'x' @ 38:5-6\n'=' @ 38:7-8\n'au64' @ 38:9-13\n';' @ 38:13-14\n'let' @ 39:1-4\n'x' @ 39:5-6\n'=' @ 39:7-8\n'au128' @ 39:9-14\n';' @ 39:14-15\n'let' @ 40:1-4\n'x' @ 40:5-6\n'=' @ 40:7-8\n'a' @ 40:9-10\n'&' @ 40:10-11\n';' @ 40:11-12\n'let' @ 41:1-4\n'x' @ 41:5-6\n'=' @ 41:7-8\n'areturn' @ 41:9-16\n';' @ 41:16-17\n'let' @ 42:1-4\n'x' @ 42:5-6\n'=' @ 42:7-8\n'aself' @ 42:9-14\n';' @ 42:14-15\n'let' @ 43:1-4\n'x' @ 43:5-6\n'=' @ 43:7-8\n'aSelf' @ 43:9-14\n';' @ 43:14-15\n'let' @ 44:1-4\n'x' @ 44:5-6\n'=' @ 44:7-8\n'atrue' @ 44:9-14\n';' @ 44:14-15\n'let' @ 45:1-4\n'x' @ 45:5-6\n'=' @ 45:7-8\n'afalse' @ 45:9-15\n';' @ 45:15-16\n'let' @ 46:1-4\n'x' @ 46:5-6\n'=' @ 46:7-8\n'a0' @ 46:9-11\n';' @ 46:11-12\n"
|
@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
namespace: Parse
|
|
||||||
expectation: Pass
|
|
||||||
*/
|
|
||||||
|
|
||||||
function x(const y: u32) {
|
|
||||||
if y < 999u32 {
|
|
||||||
x(y+1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function main(y: bool) -> bool {
|
|
||||||
x(1u32);
|
|
||||||
return y;
|
|
||||||
}
|
|
@ -3,7 +3,6 @@ namespace: Parse
|
|||||||
expectation: Fail
|
expectation: Fail
|
||||||
*/
|
*/
|
||||||
|
|
||||||
circuit try_to_hit_eat_ident_unreachable
|
|
||||||
circuit ;
|
circuit ;
|
||||||
circuit .
|
circuit .
|
||||||
circuit import
|
circuit import
|
||||||
@ -16,7 +15,11 @@ circuit [
|
|||||||
circuit ]
|
circuit ]
|
||||||
circuit {
|
circuit {
|
||||||
circuit }
|
circuit }
|
||||||
circuit -
|
circuit (
|
||||||
|
circuit )
|
||||||
|
circuit :
|
||||||
|
circuit ::
|
||||||
|
circuit ?
|
||||||
circuit _
|
circuit _
|
||||||
circuit =
|
circuit =
|
||||||
circuit ==
|
circuit ==
|
||||||
@ -48,7 +51,7 @@ circuit u128
|
|||||||
circuit &
|
circuit &
|
||||||
circuit return
|
circuit return
|
||||||
circuit self
|
circuit self
|
||||||
circuit self
|
circuit Self
|
||||||
circuit true
|
circuit true
|
||||||
circuit false
|
circuit false
|
||||||
circuit 0
|
circuit 0
|
@ -1,9 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
namespace: Parse
|
namespace: ParseStatement
|
||||||
expectation: Fail
|
expectation: Fail
|
||||||
*/
|
*/
|
||||||
|
|
||||||
x.0_try_to_hit_hit_eat_int_unreachable
|
|
||||||
x.-12
|
x.-12
|
||||||
x.0_;
|
x.0_;
|
||||||
x.0_.
|
x.0_.
|
||||||
@ -17,7 +16,11 @@ x.0_[
|
|||||||
x.0_]
|
x.0_]
|
||||||
x.0_{
|
x.0_{
|
||||||
x.0_}
|
x.0_}
|
||||||
x.0_-
|
x.0_(
|
||||||
|
x.0_)
|
||||||
|
x.0_:
|
||||||
|
x.0_::
|
||||||
|
x.0_?
|
||||||
x.0__
|
x.0__
|
||||||
x.0_=
|
x.0_=
|
||||||
x.0_==
|
x.0_==
|
||||||
@ -49,6 +52,6 @@ x.0_u128
|
|||||||
x.0_&
|
x.0_&
|
||||||
x.0_return
|
x.0_return
|
||||||
x.0_self
|
x.0_self
|
||||||
x.0_self
|
x.0_Self
|
||||||
x.0_true
|
x.0_true
|
||||||
x.0_false
|
x.0_false
|
||||||
|
57
tests/parser/unreachable/equality_and_order_expression.leo
Normal file
57
tests/parser/unreachable/equality_and_order_expression.leo
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
namespace: ParseExpression
|
||||||
|
expectation: Fail
|
||||||
|
*/
|
||||||
|
|
||||||
|
if 10 ; {}
|
||||||
|
if 10 . {}
|
||||||
|
if 10 import {}
|
||||||
|
if 10 , {}
|
||||||
|
if 10 * {}
|
||||||
|
if 10 + {}
|
||||||
|
if 10 - {}
|
||||||
|
if 10 / {}
|
||||||
|
if 10 [ {}
|
||||||
|
if 10 ] {}
|
||||||
|
if 10 { {}
|
||||||
|
if 10 } {}
|
||||||
|
if 10 ( {}
|
||||||
|
if 10 ) {}
|
||||||
|
if 10 : {}
|
||||||
|
if 10 :: {}
|
||||||
|
if 10 ? {}
|
||||||
|
if 10 _ {}
|
||||||
|
if 10 = {}
|
||||||
|
if 10 == {}
|
||||||
|
if 10 ! {}
|
||||||
|
if 10 != {}
|
||||||
|
if 10 > {}
|
||||||
|
if 10 >= {}
|
||||||
|
if 10 < {}
|
||||||
|
if 10 <= {}
|
||||||
|
if 10 > {}
|
||||||
|
if 10 .. {}
|
||||||
|
if 10 as {}
|
||||||
|
if 10 console {}
|
||||||
|
if 10 const {}
|
||||||
|
if 10 let {}
|
||||||
|
if 10 for {}
|
||||||
|
if 10 if {}
|
||||||
|
if 10 else {}
|
||||||
|
if 10 i8 {}
|
||||||
|
if 10 i16 {}
|
||||||
|
if 10 i32 {}
|
||||||
|
if 10 i64 {}
|
||||||
|
if 10 i128 {}
|
||||||
|
if 10 u8 {}
|
||||||
|
if 10 u16 {}
|
||||||
|
if 10 u32 {}
|
||||||
|
if 10 u64 {}
|
||||||
|
if 10 u128 {}
|
||||||
|
if 10 & {}
|
||||||
|
if 10 return {}
|
||||||
|
if 10 self {}
|
||||||
|
if 10 Self {}
|
||||||
|
if 10 true {}
|
||||||
|
if 10 false {}
|
||||||
|
if 10 0 {}
|
@ -1,9 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
namespace: Parse
|
namespace: ParseStatement
|
||||||
expectation: Fail
|
expectation: Fail
|
||||||
*/
|
*/
|
||||||
|
|
||||||
x::try_to_hit_expect_ident_unreachable
|
|
||||||
x::;
|
x::;
|
||||||
x::.
|
x::.
|
||||||
x::import
|
x::import
|
||||||
@ -16,7 +15,11 @@ x::[
|
|||||||
x::]
|
x::]
|
||||||
x::{
|
x::{
|
||||||
x::}
|
x::}
|
||||||
x::-
|
x::(
|
||||||
|
x::)
|
||||||
|
x:::
|
||||||
|
x::::
|
||||||
|
x::?
|
||||||
x::_
|
x::_
|
||||||
x::=
|
x::=
|
||||||
x::==
|
x::==
|
||||||
@ -48,7 +51,7 @@ x::u128
|
|||||||
x::&
|
x::&
|
||||||
x::return
|
x::return
|
||||||
x::self
|
x::self
|
||||||
x::self
|
x::Self
|
||||||
x::true
|
x::true
|
||||||
x::false
|
x::false
|
||||||
x::0
|
x::0
|
102
tests/parser/unreachable/math_op.leo
Normal file
102
tests/parser/unreachable/math_op.leo
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
/*
|
||||||
|
namespace: ParseStatement
|
||||||
|
expectation: Fail
|
||||||
|
*/
|
||||||
|
|
||||||
|
let x = a ; b;
|
||||||
|
let x = a . b;
|
||||||
|
let x = a import b;
|
||||||
|
let x = a , b;
|
||||||
|
let x = a [ b;
|
||||||
|
let x = a ] b;
|
||||||
|
let x = a { b;
|
||||||
|
let x = a } b;
|
||||||
|
let x = a ( b;
|
||||||
|
let x = a ) b;
|
||||||
|
let x = a : b;
|
||||||
|
let x = a :: b;
|
||||||
|
let x = a ? b;
|
||||||
|
let x = a _ b;
|
||||||
|
let x = a = b;
|
||||||
|
let x = a == b;
|
||||||
|
let x = a ! b;
|
||||||
|
let x = a != b;
|
||||||
|
let x = a > b;
|
||||||
|
let x = a >= b;
|
||||||
|
let x = a < b;
|
||||||
|
let x = a <= b;
|
||||||
|
let x = a > b;
|
||||||
|
let x = a .. b;
|
||||||
|
let x = a as b;
|
||||||
|
let x = a console b;
|
||||||
|
let x = a const b;
|
||||||
|
let x = a let b;
|
||||||
|
let x = a for b;
|
||||||
|
let x = a if b;
|
||||||
|
let x = a else b;
|
||||||
|
let x = a i8 b;
|
||||||
|
let x = a i16 b;
|
||||||
|
let x = a i32 b;
|
||||||
|
let x = a i64 b;
|
||||||
|
let x = a i128 b;
|
||||||
|
let x = a u8 b;
|
||||||
|
let x = a u16 b;
|
||||||
|
let x = a u32 b;
|
||||||
|
let x = a u64 b;
|
||||||
|
let x = a u128 b;
|
||||||
|
let x = a & b;
|
||||||
|
let x = a return b;
|
||||||
|
let x = a self b;
|
||||||
|
let x = a Self b;
|
||||||
|
let x = a true b;
|
||||||
|
let x = a false b;
|
||||||
|
let x = a 0 b;
|
||||||
|
|
||||||
|
x;=b;
|
||||||
|
x.=b;
|
||||||
|
ximport=b;
|
||||||
|
x,=b;
|
||||||
|
x[=b;
|
||||||
|
x]=b;
|
||||||
|
x{=b;
|
||||||
|
x}=b;
|
||||||
|
x=(;
|
||||||
|
x=);
|
||||||
|
x=:;
|
||||||
|
x=::;
|
||||||
|
x?=b;
|
||||||
|
x_=b;
|
||||||
|
x==b;
|
||||||
|
x==b;
|
||||||
|
x!=b;
|
||||||
|
x!==b;
|
||||||
|
x>=b;
|
||||||
|
x>==b;
|
||||||
|
x<=b;
|
||||||
|
x<==b;
|
||||||
|
x>=b;
|
||||||
|
x..=b;
|
||||||
|
xas=b;
|
||||||
|
xconsole=b;
|
||||||
|
xconst=b;
|
||||||
|
xlet=b;
|
||||||
|
xfor=b;
|
||||||
|
xif=b;
|
||||||
|
xelse=b;
|
||||||
|
xi8=b;
|
||||||
|
xi16=b;
|
||||||
|
xi32=b;
|
||||||
|
xi64=b;
|
||||||
|
xi128=b;
|
||||||
|
xu8=b;
|
||||||
|
xu16=b;
|
||||||
|
xu32=b;
|
||||||
|
xu64=b;
|
||||||
|
xu128=b;
|
||||||
|
x&=b;
|
||||||
|
xreturn=b;
|
||||||
|
xself=b;
|
||||||
|
xSelf=b;
|
||||||
|
xtrue=b;
|
||||||
|
xfalse=b;
|
||||||
|
x0=b;
|
51
tests/parser/unreachable/postfix.leo
Normal file
51
tests/parser/unreachable/postfix.leo
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
namespace: ParseStatement
|
||||||
|
expectation: Fail
|
||||||
|
*/
|
||||||
|
|
||||||
|
let x = a;;
|
||||||
|
let x = a.;
|
||||||
|
let x = aimport;
|
||||||
|
let x = a,;
|
||||||
|
let x = a[;
|
||||||
|
let x = a];
|
||||||
|
let x = a{;
|
||||||
|
let x = a};
|
||||||
|
let x = a);
|
||||||
|
let x = a:;
|
||||||
|
let x = a?;
|
||||||
|
let x = a_;
|
||||||
|
let x = a=;
|
||||||
|
let x = a==;
|
||||||
|
let x = a!;
|
||||||
|
let x = a!=;
|
||||||
|
let x = a>;
|
||||||
|
let x = a>=;
|
||||||
|
let x = a<;
|
||||||
|
let x = a<=;
|
||||||
|
let x = a>;
|
||||||
|
let x = a..;
|
||||||
|
let x = aas;
|
||||||
|
let x = aconsole;
|
||||||
|
let x = aconst;
|
||||||
|
let x = alet;
|
||||||
|
let x = afor;
|
||||||
|
let x = aif;
|
||||||
|
let x = aelse;
|
||||||
|
let x = ai8;
|
||||||
|
let x = ai16;
|
||||||
|
let x = ai32;
|
||||||
|
let x = ai64;
|
||||||
|
let x = ai128;
|
||||||
|
let x = au8;
|
||||||
|
let x = au16;
|
||||||
|
let x = au32;
|
||||||
|
let x = au64;
|
||||||
|
let x = au128;
|
||||||
|
let x = a&;
|
||||||
|
let x = areturn;
|
||||||
|
let x = aself;
|
||||||
|
let x = aSelf;
|
||||||
|
let x = atrue;
|
||||||
|
let x = afalse;
|
||||||
|
let x = a0;
|
Loading…
Reference in New Issue
Block a user