migrate parser tests from staging

This commit is contained in:
gluax 2022-01-28 10:34:02 -08:00
parent 5b7daa7b10
commit 2bb1d8f8d6
93 changed files with 6167 additions and 1314 deletions

View File

@ -10,13 +10,14 @@ outputs:
circuits:
"{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}":
circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}"
core_mapping: ~
members:
- CircuitFunction:
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x() -> Self {\\\"}\"}"
input: []
const_: false
output: SelfType
core_mapping: ~
block:
statements:
- Return:

View File

@ -0,0 +1,253 @@
---
namespace: Parse
expectation: Pass
outputs:
- name: ""
expected_input: []
import_statements: []
imports: {}
aliases: {}
circuits:
"{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}":
circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: u32\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function x() { \\\"}\"}"
input: []
const_: true
output: ~
core_mapping: ~
block:
statements:
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 6
line_stop: 6
col_start: 16
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 6
line_stop: 6
col_start: 9
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 5
line_stop: 7
col_start: 24
col_stop: 6
path: ""
content: " const function x() { \n ...\n }"
span:
line_start: 5
line_stop: 7
col_start: 11
col_stop: 6
path: ""
content: " const function x() { \n ...\n }"
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function x(self) { \\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":22,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function x(self) { \\\"}\"}"
const_: true
output: ~
core_mapping: ~
block:
statements:
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 9
line_stop: 9
col_start: 16
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 9
line_stop: 9
col_start: 9
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 8
line_stop: 10
col_start: 28
col_stop: 6
path: ""
content: " const function x(self) { \n ...\n }"
span:
line_start: 8
line_stop: 10
col_start: 11
col_stop: 6
path: ""
content: " const function x(self) { \n ...\n }"
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function c(const self) { \\\"}\"}"
input:
- ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":22,\\\"col_stop\\\":32,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function c(const self) { \\\"}\"}"
const_: true
output: ~
core_mapping: ~
block:
statements:
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 12
line_stop: 12
col_start: 16
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 12
line_stop: 12
col_start: 9
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 11
line_stop: 13
col_start: 34
col_stop: 6
path: ""
content: " const function c(const self) { \n ...\n }"
span:
line_start: 11
line_stop: 13
col_start: 11
col_stop: 6
path: ""
content: " const function c(const self) { \n ...\n }"
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function b(const self, x: u32) {\\\"}\"}"
input:
- ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":22,\\\"col_stop\\\":32,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function b(const self, x: u32) {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function b(const self, x: u32) {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: U32
span:
line_start: 14
line_stop: 14
col_start: 34
col_stop: 35
path: ""
content: " const function b(const self, x: u32) {"
const_: true
output: ~
core_mapping: ~
block:
statements:
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 15
line_stop: 15
col_start: 16
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 15
line_stop: 15
col_start: 9
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 14
line_stop: 16
col_start: 42
col_stop: 6
path: ""
content: " const function b(const self, x: u32) {\n ...\n }"
span:
line_start: 14
line_stop: 16
col_start: 11
col_stop: 6
path: ""
content: " const function b(const self, x: u32) {\n ...\n }"
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function b(const self, const x: u32) {\\\"}\"}"
input:
- ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":22,\\\"col_stop\\\":32,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function b(const self, const x: u32) {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":40,\\\"col_stop\\\":41,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function b(const self, const x: u32) {\\\"}\"}"
const_: true
mutable: false
type_:
IntegerType: U32
span:
line_start: 17
line_stop: 17
col_start: 40
col_stop: 41
path: ""
content: " const function b(const self, const x: u32) {"
const_: true
output: ~
core_mapping: ~
block:
statements:
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 18
line_stop: 18
col_start: 16
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 18
line_stop: 18
col_start: 9
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 17
line_stop: 19
col_start: 48
col_stop: 6
path: ""
content: " const function b(const self, const x: u32) {\n ...\n }"
span:
line_start: 17
line_stop: 19
col_start: 11
col_stop: 6
path: ""
content: " const function b(const self, const x: u32) {\n ...\n }"
global_consts: {}
functions: {}

View File

@ -0,0 +1,41 @@
---
namespace: Parse
expectation: Pass
outputs:
- name: ""
expected_input: []
import_statements: []
imports: {}
aliases: {}
circuits:
"{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}":
circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}"
members:
- CircuitConst:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" static const x: u32 = 2;\\\"}\"}"
- IntegerType: U32
- Value:
Implicit:
- "2"
- span:
line_start: 4
line_stop: 4
col_start: 27
col_stop: 28
path: ""
content: " static const x: u32 = 2;"
- CircuitConst:
- "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" static const y: u32 = 5;\\\"}\"}"
- IntegerType: U32
- Value:
Implicit:
- "5"
- span:
line_start: 5
line_stop: 5
col_start: 27
col_stop: 28
path: ""
content: " static const y: u32 = 5;"
global_consts: {}
functions: {}

View File

@ -10,7 +10,6 @@ outputs:
circuits:
"{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}":
circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}"
core_mapping: ~
members: []
global_consts: {}
functions: {}

View File

@ -10,19 +10,33 @@ outputs:
circuits:
"{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}":
circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}"
core_mapping: ~
members:
- CircuitConst:
- "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" static const a: u8 = 10;\\\"}\"}"
- IntegerType: U8
- Value:
Implicit:
- "10"
- span:
line_start: 4
line_stop: 4
col_start: 26
col_stop: 28
path: ""
content: " static const a: u8 = 10;"
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}"
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: u32,\\\"}\"}"
- IntegerType: U32
- CircuitVariable:
- "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y: u32\\\"}\"}"
- "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y: u32\\\"}\"}"
- IntegerType: U32
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x() {\\\"}\"}"
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:
@ -30,38 +44,40 @@ outputs:
TupleInit:
elements: []
span:
line_start: 7
line_stop: 7
line_start: 8
line_stop: 8
col_start: 16
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 7
line_stop: 7
line_start: 8
line_stop: 8
col_start: 9
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 6
line_stop: 8
line_start: 7
line_stop: 9
col_start: 18
col_stop: 6
path: ""
content: " function x() {\n ...\n }"
span:
line_start: 6
line_stop: 8
line_start: 7
line_stop: 9
col_start: 5
col_stop: 6
path: ""
content: " function x() {\n ...\n }"
- CircuitFunction:
annotations: []
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function y() {\\\"}\"}"
annotations: {}
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function y() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:
@ -69,29 +85,29 @@ outputs:
TupleInit:
elements: []
span:
line_start: 10
line_stop: 10
line_start: 11
line_stop: 11
col_start: 16
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 10
line_stop: 10
line_start: 11
line_stop: 11
col_start: 9
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 9
line_stop: 11
line_start: 10
line_stop: 12
col_start: 18
col_stop: 6
path: ""
content: " function y() {\n ...\n }"
span:
line_start: 9
line_stop: 11
line_start: 10
line_stop: 12
col_start: 5
col_stop: 6
path: ""

View File

@ -10,7 +10,6 @@ outputs:
circuits:
"{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}":
circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}"
core_mapping: ~
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: u32;\\\"}\"}"

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370006]: Cannot mix use of commas and semi-colons for circuit member variable declarations.\n --> test:10:11\n |\n 10 | y: u32;\n | ^"
- "Error [EPAR0370006]: Cannot mix use of commas and semi-colons for circuit member variable declarations.\n --> test:10:11\n |\n 10 | y: u32;\n | ^\nError [EPAR0370006]: Cannot mix use of commas and semi-colons for circuit member variable declarations.\n --> test:11:5\n |\n 11 | , // recovery witness\n | ^"

View File

@ -10,13 +10,14 @@ outputs:
circuits:
"{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}":
circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}"
core_mapping: ~
members:
- CircuitFunction:
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:
@ -52,10 +53,12 @@ outputs:
path: ""
content: " function x() {\n ...\n }"
- CircuitFunction:
annotations: []
annotations: {}
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function y() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:
@ -90,5 +93,46 @@ outputs:
col_stop: 6
path: ""
content: " function y() {\n ...\n }"
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const function z() {\\\"}\"}"
input: []
const_: true
output: ~
core_mapping: ~
block:
statements:
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 11
line_stop: 11
col_start: 16
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 11
line_stop: 11
col_start: 9
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 10
line_stop: 12
col_start: 24
col_stop: 6
path: ""
content: " const function z() {\n ...\n }"
span:
line_start: 10
line_stop: 12
col_start: 11
col_stop: 6
path: ""
content: " const function z() {\n ...\n }"
global_consts: {}
functions: {}

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370022]: Member functions must come after member variables.\n --> test:7:5\n |\n 7 | foo: u8,\n | ^^^\nError [EPAR0370021]: Member functions must come after member consts.\n --> test:9:18\n |\n 9 | static const BAR: u8 = 0u8;\n | ^^^^^^^^^^^^^\nError [EPAR0370020]: Member variables must come after member consts.\n --> test:15:18\n |\n 15 | static const BAR: u8 = 0u8;\n | ^^^^^^^^^^^^^"

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370019]: `mut self` is no longer accepted. Use `&self` if you would like to pass in a mutable reference to `self`\n --> test:4:16\n |\n 4 | function x(mut self) {\n | ^^^^^^^^"

View File

@ -0,0 +1,57 @@
---
namespace: Parse
expectation: Pass
outputs:
- name: ""
expected_input: []
import_statements: []
imports: {}
aliases: {}
circuits:
"{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}":
circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}"
members:
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x(&self) {\\\"}\"}"
input:
- RefSelfKeyword: "{\"name\":\"&self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x(&self) {\\\"}\"}"
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 5
line_stop: 5
col_start: 16
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 18
path: ""
content: " return ();"
span:
line_start: 4
line_stop: 6
col_start: 23
col_stop: 6
path: ""
content: " function x(&self) {\n ...\n }"
span:
line_start: 4
line_stop: 6
col_start: 5
col_stop: 6
path: ""
content: " function x(&self) {\n ...\n }"
global_consts: {}
functions: {}

View File

@ -10,14 +10,15 @@ outputs:
circuits:
"{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}":
circuit_name: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit X {\\\"}\"}"
core_mapping: ~
members:
- CircuitFunction:
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function x(self) {\\\"}\"}"
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370005]: expected circuit -- got 'struct'\n --> test:3:1\n |\n 3 | struct A {}\n | ^^^^^^\nError [EPAR0370005]: expected circuit -- got 'class'\n --> test:5:1\n |\n 5 | class C {}\n | ^^^^^"

View File

@ -2,170 +2,179 @@
namespace: ParseExpression
expectation: Pass
outputs:
- ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0]\\\"}\"}"
index:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "x[0]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x[0]"
- ArrayAccess:
array:
Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X[1]\\\"}\"}"
index:
Value:
Implicit:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "X[1]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "X[1]"
- ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0u8]\\\"}\"}"
index:
Value:
Integer:
- U8
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 6
path: ""
content: "x[0u8]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x[0u8]"
- ArrayAccess:
array:
ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[1u8][2u8]\\\"}\"}"
index:
Value:
Integer:
- U8
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 6
path: ""
content: "x[1u8][2u8]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x[1u8][2u8]"
index:
Value:
Integer:
- U8
- "2"
- span:
line_start: 1
line_stop: 1
col_start: 8
col_stop: 11
path: ""
content: "x[1u8][2u8]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "x[1u8][2u8]"
- ArrayAccess:
array:
ArrayAccess:
array:
ArrayAccess:
- Access:
Array:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0]\\\"}\"}"
index:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "x[0]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x[0]"
- Access:
Array:
array:
Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X[1]\\\"}\"}"
index:
Value:
Implicit:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "X[1]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "X[1]"
- Access:
Array:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0u8]\\\"}\"}"
index:
Value:
Integer:
- U8
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 6
path: ""
content: "x[0u8]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x[0u8]"
- Access:
Array:
array:
Access:
Array:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}"
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[1u8][2u8]\\\"}\"}"
index:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}"
Value:
Integer:
- U8
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 6
path: ""
content: "x[1u8][2u8]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
col_stop: 7
path: ""
content: "x[1u8][2u8]"
index:
Value:
Integer:
- U8
- "2"
- span:
line_start: 1
line_stop: 1
col_start: 8
col_stop: 11
path: ""
content: "x[1u8][2u8]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "x[1u8][2u8]"
- Access:
Array:
array:
Access:
Array:
array:
Access:
Array:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}"
index:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x[x][y][z]"
index:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: ""
content: "x[x][y][z]"
index:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: ""
content: "x[x][y][z]"
index:
Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: "x[x][y][z]"
index:
Identifier: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x][y][z]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: "x[x][y][z]"
- Call:
function:
ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0]()\\\"}\"}"
index:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "x[0]()"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x[0]()"
Access:
Array:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0]()\\\"}\"}"
index:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "x[0]()"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x[0]()"
arguments: []
span:
line_start: 1
@ -174,61 +183,64 @@ outputs:
col_stop: 7
path: ""
content: "x[0]()"
- ArrayAccess:
array:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x()[0]\\\"}\"}"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: "x()[0]"
index:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 6
path: ""
content: "x()[0]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x()[0]"
- Access:
Array:
array:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x()[0]\\\"}\"}"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: "x()[0]"
index:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 6
path: ""
content: "x()[0]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x()[0]"
- Call:
function:
CircuitStaticFunctionAccess:
circuit:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x(y)::y(x)"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: ""
content: "x(y)::y(x)"
Access:
Static:
inner:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x(y)::y(x)"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: ""
content: "x(y)::y(x)"
arguments:
- Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x(y)::y(x)\\\"}\"}"
span:
@ -238,37 +250,40 @@ outputs:
col_stop: 11
path: ""
content: "x(y)::y(x)"
- ArrayAccess:
array:
TupleAccess:
tuple:
ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}"
- Access:
Array:
array:
Access:
Tuple:
tuple:
Access:
Array:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}"
index:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x[x].0[x]"
index:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}"
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
col_stop: 7
path: ""
content: "x[x].0[x]"
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x[x].0[x]"
index:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: "x[x].0[x]"
index:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x].0[x]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: "x[x].0[x]"

View File

@ -2,133 +2,171 @@
namespace: ParseExpression
expectation: Pass
outputs:
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..]\\\"}\"}"
left: ~
right: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: "x[..]"
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[1..]\\\"}\"}"
left:
Value:
Implicit:
- "1"
- span:
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..]\\\"}\"}"
left: ~
right: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: "x[..]"
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[1..]\\\"}\"}"
left:
Value:
Implicit:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "x[1..]"
right: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x[1..]"
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..1]\\\"}\"}"
left: ~
right:
Value:
Implicit:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 6
path: ""
content: "x[..1]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x[..1]"
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[1..1]\\\"}\"}"
left:
Value:
Implicit:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "x[1..1]"
right:
Value:
Implicit:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 7
path: ""
content: "x[1..1]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: ""
content: "x[1..1]"
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0..100]\\\"}\"}"
left:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "x[0..100]"
right:
Value:
Implicit:
- "100"
- span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 9
path: ""
content: "x[0..100]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: "x[0..100]"
- Access:
Array:
array:
Access:
Array:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[323452345.2345234523453453][323452345.2345234523453453]\\\"}\"}"
index:
Access:
Tuple:
tuple:
Value:
Implicit:
- "323452345"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 12
path: ""
content: "x[323452345.2345234523453453][323452345.2345234523453453]"
index:
value: "2345234523453453"
span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 29
path: ""
content: "x[323452345.2345234523453453][323452345.2345234523453453]"
span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
col_start: 1
col_stop: 30
path: ""
content: "x[1..]"
right: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x[1..]"
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..1]\\\"}\"}"
left: ~
right:
Value:
Implicit:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 6
path: ""
content: "x[..1]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x[..1]"
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[1..1]\\\"}\"}"
left:
Value:
Implicit:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "x[1..1]"
right:
Value:
Implicit:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 7
path: ""
content: "x[1..1]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: ""
content: "x[1..1]"
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0..100]\\\"}\"}"
left:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "x[0..100]"
right:
Value:
Implicit:
- "100"
- span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 9
path: ""
content: "x[0..100]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: "x[0..100]"
- ArrayAccess:
array:
ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[323452345.2345234523453453][323452345.2345234523453453]\\\"}\"}"
index:
TupleAccess:
content: "x[323452345.2345234523453453][323452345.2345234523453453]"
index:
Access:
Tuple:
tuple:
Value:
Implicit:
@ -136,8 +174,8 @@ outputs:
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 12
col_start: 31
col_stop: 40
path: ""
content: "x[323452345.2345234523453453][323452345.2345234523453453]"
index:
@ -145,277 +183,264 @@ outputs:
span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 29
col_start: 31
col_stop: 57
path: ""
content: "x[323452345.2345234523453453][323452345.2345234523453453]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 30
path: ""
content: "x[323452345.2345234523453453][323452345.2345234523453453]"
index:
TupleAccess:
tuple:
Value:
Implicit:
- "323452345"
- span:
line_start: 1
line_stop: 1
col_start: 31
col_stop: 40
path: ""
content: "x[323452345.2345234523453453][323452345.2345234523453453]"
index:
value: "2345234523453453"
span:
line_start: 1
line_stop: 1
col_start: 31
col_stop: 57
path: ""
content: "x[323452345.2345234523453453][323452345.2345234523453453]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 58
path: ""
content: "x[323452345.2345234523453453][323452345.2345234523453453]"
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0u8..1u8]\\\"}\"}"
left:
Value:
Integer:
- U8
- "0"
- span:
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 58
path: ""
content: "x[323452345.2345234523453453][323452345.2345234523453453]"
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0u8..1u8]\\\"}\"}"
left:
Value:
Integer:
- U8
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 6
path: ""
content: "x[0u8..1u8]"
right:
Value:
Integer:
- U8
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 8
col_stop: 11
path: ""
content: "x[0u8..1u8]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "x[0u8..1u8]"
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0u8..]\\\"}\"}"
left:
Value:
Integer:
- U8
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 6
path: ""
content: "x[0u8..]"
right: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "x[0u8..]"
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..0u8]\\\"}\"}"
left: ~
right:
Value:
Integer:
- U8
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 8
path: ""
content: "x[..0u8]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "x[..0u8]"
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..]\\\"}\"}"
left: ~
right: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: "x[..]"
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}"
left:
Access:
Member:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 6
path: ""
content: "x[0u8..1u8]"
right:
Value:
Integer:
- U8
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 8
col_stop: 11
path: ""
content: "x[0u8..1u8]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "x[0u8..1u8]"
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0u8..]\\\"}\"}"
left:
Value:
Integer:
- U8
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 6
path: ""
content: "x[0u8..]"
right: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "x[0u8..]"
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..0u8]\\\"}\"}"
left: ~
right:
Value:
Integer:
- U8
- "0"
- span:
content: "x[x.y..]"
type_: ~
right: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "x[x.y..]"
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}"
left: ~
right:
Access:
Member:
inner:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 8
path: ""
content: "x[..0u8]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "x[..0u8]"
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..]\\\"}\"}"
left: ~
right: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: "x[..]"
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}"
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 6
path: ""
content: "x[x.y..]"
type_: ~
right: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "x[x.y..]"
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}"
left: ~
right:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[..y.x]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 8
path: ""
content: "x[..y.x]"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "x[..y.x]"
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}"
left:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 6
path: ""
content: "x[x.y..y.x]"
type_: ~
right:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 8
col_stop: 11
path: ""
content: "x[x.y..y.x]"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "x[x.y..y.x]"
- ArrayRangeAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
left:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
content: "x[..y.x]"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "x[..y.x]"
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}"
left:
Access:
Member:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 6
path: ""
content: "x[x.y..y.x]"
type_: ~
right:
Access:
Member:
inner:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y..y.x]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 8
col_stop: 11
path: ""
content: "x[x.y..y.x]"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "x[x.y..y.x]"
- Access:
ArrayRange:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
left:
Access:
Member:
inner:
Access:
Member:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 6
path: ""
content: "x[x.y.x..y.x.y]"
type_: ~
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 8
path: ""
content: "x[x.y.x..y.x.y]"
type_: ~
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 8
path: ""
content: "x[x.y.x..y.x.y]"
type_: ~
right:
CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
right:
Access:
Member:
inner:
Access:
Member:
inner:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 10
col_stop: 13
path: ""
content: "x[x.y.x..y.x.y]"
type_: ~
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 10
col_stop: 13
col_stop: 15
path: ""
content: "x[x.y.x..y.x.y]"
type_: ~
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":14,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[x.y.x..y.x.y]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 10
col_stop: 15
path: ""
content: "x[x.y.x..y.x.y]"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 16
path: ""
content: "x[x.y.x..y.x.y]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 16
path: ""
content: "x[x.y.x..y.x.y]"

View File

@ -65,17 +65,19 @@ outputs:
content: "x(x, y, z)"
- Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y()"
Access:
Static:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y()"
arguments: []
span:
line_start: 1
@ -86,17 +88,19 @@ outputs:
content: "x::y()"
- Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y(x)"
Access:
Static:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y(x)"
arguments:
- Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y(x)\\\"}\"}"
span:
@ -108,18 +112,19 @@ outputs:
content: "x::y(x)"
- Call:
function:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}"
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.0(x)
Access:
Tuple:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}"
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.0(x)
arguments:
- Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0(x)\\\"}\"}"
span:
@ -131,27 +136,28 @@ outputs:
content: x.0(x)
- Call:
function:
ArrayAccess:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}"
index:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "x[0](x)"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x[0](x)"
Access:
Array:
array:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}"
index:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 4
path: ""
content: "x[0](x)"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x[0](x)"
arguments:
- Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x[0](x)\\\"}\"}"
span:

View File

@ -2,67 +2,72 @@
namespace: ParseExpression
expectation: Pass
outputs:
- CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.y
type_: ~
- CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X.Y\\\"}\"}"
name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X.Y\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: X.Y
type_: ~
- CircuitMemberAccess:
circuit:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.y.z
type_: ~
name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: x.y.z
type_: ~
- Access:
Member:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.y
type_: ~
- Access:
Member:
inner:
Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X.Y\\\"}\"}"
name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X.Y\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: X.Y
type_: ~
- Access:
Member:
inner:
Access:
Member:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.y.z
type_: ~
name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.z\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: x.y.z
type_: ~
- Call:
function:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y()\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.y()
type_: ~
Access:
Member:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y()\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.y()
type_: ~
arguments: []
span:
line_start: 1
@ -71,58 +76,62 @@ outputs:
col_stop: 6
path: ""
content: x.y()
- TupleAccess:
tuple:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.y.0
type_: ~
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: x.y.0
- ArrayAccess:
array:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: "x.y[1]"
type_: ~
index:
Value:
Implicit:
- "1"
- span:
- Access:
Tuple:
tuple:
Access:
Member:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y.0\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 6
col_start: 1
col_stop: 4
path: ""
content: x.y.0
type_: ~
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: x.y.0
- Access:
Array:
array:
Access:
Member:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":3,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.y[1]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: "x.y[1]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x.y[1]"
type_: ~
index:
Value:
Implicit:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 6
path: ""
content: "x.y[1]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x.y[1]"

View File

@ -2,62 +2,72 @@
namespace: ParseExpression
expectation: Pass
outputs:
- CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y"
- CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X::Y\\\"}\"}"
name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X::Y\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "X::Y"
- CircuitStaticFunctionAccess:
circuit:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y::z"
name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: ""
content: "x::y::z"
- Access:
Static:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y"
- Access:
Static:
inner:
Identifier: "{\"name\":\"X\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X::Y\\\"}\"}"
name: "{\"name\":\"Y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"X::Y\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "X::Y"
- Access:
Static:
inner:
Access:
Static:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y::z"
name: "{\"name\":\"z\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y::z\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: ""
content: "x::y::z"
- Call:
function:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y()"
Access:
Static:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y()"
arguments: []
span:
line_start: 1
@ -66,56 +76,62 @@ outputs:
col_stop: 7
path: ""
content: "x::y()"
- TupleAccess:
tuple:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y.0"
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x::y.0"
- ArrayAccess:
array:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y[1]"
index:
Value:
Implicit:
- "1"
- span:
- Access:
Tuple:
tuple:
Access:
Static:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y.0\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 7
col_start: 1
col_stop: 5
path: ""
content: "x::y.0"
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "x::y.0"
- Access:
Array:
array:
Access:
Static:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x::y[1]\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: "x::y[1]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: ""
content: "x::y[1]"
index:
Value:
Implicit:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 7
path: ""
content: "x::y[1]"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 8
path: ""
content: "x::y[1]"

View File

@ -2,108 +2,117 @@
namespace: ParseExpression
expectation: Pass
outputs:
- TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0\\\"}\"}"
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.0
- TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.1\\\"}\"}"
index:
value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.1
- TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.2\\\"}\"}"
index:
value: "2"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.2
- TupleAccess:
tuple:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0.0\\\"}\"}"
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.0.0
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: x.0.0
- TupleAccess:
tuple:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.1.1\\\"}\"}"
index:
value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.1.1
index:
value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: x.1.1
- TupleAccess:
tuple:
TupleAccess:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.2.2\\\"}\"}"
index:
value: "2"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.2.2
index:
value: "2"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: x.2.2
- Access:
Tuple:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0\\\"}\"}"
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.0
- Access:
Tuple:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.1\\\"}\"}"
index:
value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.1
- Access:
Tuple:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.2\\\"}\"}"
index:
value: "2"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.2
- Access:
Tuple:
tuple:
Access:
Tuple:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.0.0\\\"}\"}"
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.0.0
index:
value: "0"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: x.0.0
- Access:
Tuple:
tuple:
Access:
Tuple:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.1.1\\\"}\"}"
index:
value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.1.1
index:
value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: x.1.1
- Access:
Tuple:
tuple:
Access:
Tuple:
tuple:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x.2.2\\\"}\"}"
index:
value: "2"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: x.2.2
index:
value: "2"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: x.2.2

View File

@ -88,6 +88,28 @@ outputs:
col_stop: 12
path: ""
content: "[0; (1, 2)]"
- ArrayInit:
element:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 3
path: ""
content: "[0; (1, 2,)]"
dimensions:
- value: "1"
- value: "2"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 13
path: ""
content: "[0; (1, 2,)]"
- ArrayInit:
element:
Value:

View File

@ -4,3 +4,4 @@ expectation: Fail
outputs:
- "Error [EPAR0370010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^"
- "Error [EPAR0370010]: illegal spread in array initializer\n --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^"
- "Error [EPAR0370023]: Array dimensions specified as a tuple cannot be empty.\n --> test:1:5\n |\n 1 | [0; ()]\n | ^^"

View File

@ -2,209 +2,287 @@
namespace: ParseExpression
expectation: Pass
outputs:
- LengthOf:
inner:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 5
path: ""
content: "[0u8; 1].len()"
dimensions:
- value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "[0u8; 1].len()"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "[0u8; 1].len()"
- LengthOf:
inner:
ArrayInit:
element:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 3
path: ""
content: "[0; 1].len()"
dimensions:
- value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "[0; 1].len()"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "[0; 1].len()"
- LengthOf:
inner:
ArrayInit:
element:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 3
path: ""
content: "[0; (1)].len()"
dimensions:
- value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "[0; (1)].len()"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "[0; (1)].len()"
- LengthOf:
inner:
ArrayInit:
element:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 3
path: ""
content: "[0; (1, 2)].len()"
dimensions:
- value: "1"
- value: "2"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "[0; (1, 2)].len()"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "[0; (1, 2)].len()"
- LengthOf:
inner:
ArrayInit:
element:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 3
path: ""
content: "[0; (1, 2, 3)].len()"
dimensions:
- value: "1"
- value: "2"
- value: "3"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 15
path: ""
content: "[0; (1, 2, 3)].len()"
- Call:
function:
Access:
Member:
inner:
ArrayInit:
element:
Value:
Integer:
- U8
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 5
path: ""
content: "[0u8; 1].len()"
dimensions:
- value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "[0u8; 1].len()"
name: "{\"name\":\"len\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"[0u8; 1].len()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 13
path: ""
content: "[0u8; 1].len()"
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 15
path: ""
content: "[0; (1, 2, 3)].len()"
- LengthOf:
inner:
ArrayInit:
element:
ArrayInit:
element:
ArrayInit:
element:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 4
col_stop: 5
path: ""
content: "[[[0; 3]; 2]; 1].len()"
dimensions:
- value: "3"
span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 9
path: ""
content: "[[[0; 3]; 2]; 1].len()"
dimensions:
- value: "2"
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 13
path: ""
content: "[[[0; 3]; 2]; 1].len()"
dimensions:
- value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 17
path: ""
content: "[[[0; 3]; 2]; 1].len()"
content: "[0u8; 1].len()"
- Call:
function:
Access:
Member:
inner:
ArrayInit:
element:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 3
path: ""
content: "[0; 1].len()"
dimensions:
- value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: "[0; 1].len()"
name: "{\"name\":\"len\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"[0; 1].len()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: "[0; 1].len()"
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 17
col_stop: 13
path: ""
content: "[0; 1].len()"
- Call:
function:
Access:
Member:
inner:
ArrayInit:
element:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 3
path: ""
content: "[0; (1)].len()"
dimensions:
- value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "[0; (1)].len()"
name: "{\"name\":\"len\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"[0; (1)].len()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 13
path: ""
content: "[0; (1)].len()"
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 15
path: ""
content: "[0; (1)].len()"
- Call:
function:
Access:
Member:
inner:
ArrayInit:
element:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 3
path: ""
content: "[0; (1, 2)].len()"
dimensions:
- value: "1"
- value: "2"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "[0; (1, 2)].len()"
name: "{\"name\":\"len\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"[0; (1, 2)].len()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 16
path: ""
content: "[0; (1, 2)].len()"
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 18
path: ""
content: "[0; (1, 2)].len()"
- Call:
function:
Access:
Member:
inner:
ArrayInit:
element:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 3
path: ""
content: "[0; (1, 2, 3)].len()"
dimensions:
- value: "1"
- value: "2"
- value: "3"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 15
path: ""
content: "[0; (1, 2, 3)].len()"
name: "{\"name\":\"len\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"[0; (1, 2, 3)].len()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 19
path: ""
content: "[0; (1, 2, 3)].len()"
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 21
path: ""
content: "[0; (1, 2, 3)].len()"
- Call:
function:
Access:
Member:
inner:
ArrayInit:
element:
ArrayInit:
element:
ArrayInit:
element:
Value:
Implicit:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 4
col_stop: 5
path: ""
content: "[[[0; 3]; 2]; 1].len()"
dimensions:
- value: "3"
span:
line_start: 1
line_stop: 1
col_start: 3
col_stop: 9
path: ""
content: "[[[0; 3]; 2]; 1].len()"
dimensions:
- value: "2"
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 13
path: ""
content: "[[[0; 3]; 2]; 1].len()"
dimensions:
- value: "1"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 17
path: ""
content: "[[[0; 3]; 2]; 1].len()"
name: "{\"name\":\"len\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":18,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"[[[0; 3]; 2]; 1].len()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 21
path: ""
content: "[[[0; 3]; 2]; 1].len()"
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 23
path: ""
content: "[[[0; 3]; 2]; 1].len()"

View File

@ -0,0 +1,963 @@
---
namespace: ParseExpression
expectation: Pass
outputs:
- Value:
Implicit:
- ""
- span:
line_start: 0
line_stop: 0
col_start: 0
col_stop: 0
path: ""
content: ""
- Call:
function:
Access:
Member:
inner:
Value:
Address:
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 64
path: ""
content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":65,\\\"col_stop\\\":69,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 69
path: ""
content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 71
path: ""
content: aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8.call()
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"address\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"address::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"address::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 14
path: ""
content: "address::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 16
path: ""
content: "address::call()"
- Value:
Implicit:
- ""
- span:
line_start: 0
line_stop: 0
col_start: 0
col_stop: 0
path: ""
content: ""
- Call:
function:
Access:
Member:
inner:
Value:
Boolean:
- "true"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: true.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"true.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: true.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: true.call()
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"bool\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"bool::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"bool::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: "bool::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 13
path: ""
content: "bool::call()"
- Value:
Implicit:
- ""
- span:
line_start: 0
line_stop: 0
col_start: 0
col_stop: 0
path: ""
content: ""
- Call:
function:
Access:
Member:
inner:
Value:
Char:
character:
Scalar: 97
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: "'a'.call()"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"'a'.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "'a'.call()"
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: "'a'.call()"
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"char\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"char::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"char::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: "char::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 13
path: ""
content: "char::call()"
- Value:
Implicit:
- ""
- span:
line_start: 0
line_stop: 0
col_start: 0
col_stop: 0
path: ""
content: ""
- Call:
function:
Access:
Member:
inner:
Value:
Field:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: 1field.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"1field.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: 1field.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 14
path: ""
content: 1field.call()
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"field\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"field::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"field::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "field::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 14
path: ""
content: "field::call()"
- Value:
Implicit:
- ""
- span:
line_start: 0
line_stop: 0
col_start: 0
col_stop: 0
path: ""
content: ""
- Call:
function:
Access:
Member:
inner:
Value:
Group:
Single:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 7
path: ""
content: 0group.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"0group.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: 0group.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 14
path: ""
content: 0group.call()
- Call:
function:
Access:
Member:
inner:
Value:
Group:
Tuple:
x:
Number:
- "0"
- span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 3
path: ""
content: "(0, 1)group.call()"
y:
Number:
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 5
col_stop: 6
path: ""
content: "(0, 1)group.call()"
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 12
path: ""
content: "(0, 1)group.call()"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":13,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"(0, 1)group.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 17
path: ""
content: "(0, 1)group.call()"
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 19
path: ""
content: "(0, 1)group.call()"
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"group\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"group::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"group::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "group::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 14
path: ""
content: "group::call()"
- Value:
Implicit:
- ""
- span:
line_start: 0
line_stop: 0
col_start: 0
col_stop: 0
path: ""
content: ""
- Call:
function:
Access:
Member:
inner:
Value:
Integer:
- I8
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: 1i8.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"1i8.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: 1i8.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: 1i8.call()
- Call:
function:
Access:
Member:
inner:
Value:
Integer:
- I16
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: 1i16.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"1i16.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: 1i16.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: 1i16.call()
- Call:
function:
Access:
Member:
inner:
Value:
Integer:
- I32
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: 1i32.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"1i32.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: 1i32.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: 1i32.call()
- Call:
function:
Access:
Member:
inner:
Value:
Integer:
- I64
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: 1i64.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"1i64.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: 1i64.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: 1i64.call()
- Call:
function:
Access:
Member:
inner:
Value:
Integer:
- I128
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: 1i128.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"1i128.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: 1i128.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 13
path: ""
content: 1i128.call()
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"i8\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i8::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i8::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "i8::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: "i8::call()"
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"i16\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i16::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i16::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: "i16::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "i16::call()"
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"i32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i32::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i32::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: "i32::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "i32::call()"
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"i64\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i64::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i64::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: "i64::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "i64::call()"
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"i128\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i128::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"i128::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: "i128::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 13
path: ""
content: "i128::call()"
- Value:
Implicit:
- ""
- span:
line_start: 0
line_stop: 0
col_start: 0
col_stop: 0
path: ""
content: ""
- Call:
function:
Access:
Member:
inner:
Value:
Integer:
- U8
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 4
path: ""
content: 1u8.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"1u8.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: 1u8.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: 1u8.call()
- Call:
function:
Access:
Member:
inner:
Value:
Integer:
- U16
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: 1u16.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"1u16.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: 1u16.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: 1u16.call()
- Call:
function:
Access:
Member:
inner:
Value:
Integer:
- U32
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: 1u32.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"1u32.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: 1u32.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: 1u32.call()
- Call:
function:
Access:
Member:
inner:
Value:
Integer:
- U64
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 5
path: ""
content: 1u64.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"1u64.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: 1u64.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: 1u64.call()
- Call:
function:
Access:
Member:
inner:
Value:
Integer:
- U128
- "1"
- span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 6
path: ""
content: 1u128.call()
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"1u128.call()\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: 1u128.call()
type_: ~
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 13
path: ""
content: 1u128.call()
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"u8\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u8::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u8::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: "u8::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: "u8::call()"
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"u16\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u16::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u16::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: "u16::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "u16::call()"
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"u32\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u32::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u32::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: "u32::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "u32::call()"
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"u64\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":4,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u64::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u64::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: "u64::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 12
path: ""
content: "u64::call()"
- Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"u128\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u128::call()\\\"}\"}"
name: "{\"name\":\"call\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"u128::call()\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: "u128::call()"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 13
path: ""
content: "u128::call()"

View File

@ -2,7 +2,6 @@
namespace: ParseExpression
expectation: Fail
outputs:
- "Error [EPAR0370009]: unexpected string: expected 'expression', got 'group'\n --> test:1:1\n |\n 1 | group\n | ^^^^^"
- "did not consume all input: 'group' @ 1:3-8\n"
- "did not consume all input: 'group' @ 1:6-11\n"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ','\n --> test:1:2\n |\n 1 | (,)group\n | ^"

View File

@ -15,18 +15,19 @@ outputs:
content: "-x"
- Unary:
inner:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x.y\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x.y\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 5
path: ""
content: "-x.y"
type_: ~
Access:
Member:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x.y\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x.y\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 5
path: ""
content: "-x.y"
type_: ~
op: Negate
span:
line_start: 1
@ -37,17 +38,19 @@ outputs:
content: "-x.y"
- Unary:
inner:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x::y\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x::y\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 6
path: ""
content: "-x::y"
Access:
Static:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x::y\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"-x::y\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 6
path: ""
content: "-x::y"
op: Negate
span:
line_start: 1

View File

@ -15,18 +15,19 @@ outputs:
content: "!x"
- Unary:
inner:
CircuitMemberAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x.y\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x.y\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 5
path: ""
content: "!x.y"
type_: ~
Access:
Member:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x.y\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":4,\\\"col_stop\\\":5,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x.y\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 5
path: ""
content: "!x.y"
type_: ~
op: Not
span:
line_start: 1
@ -37,17 +38,19 @@ outputs:
content: "!x.y"
- Unary:
inner:
CircuitStaticFunctionAccess:
circuit:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x::y\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x::y\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 6
path: ""
content: "!x::y"
Access:
Static:
inner:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":2,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x::y\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"!x::y\\\"}\"}"
type_: ~
span:
line_start: 1
line_stop: 1
col_start: 2
col_stop: 6
path: ""
content: "!x::y"
op: Not
span:
line_start: 1

View File

@ -10,9 +10,10 @@ outputs:
circuits: {}
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}":
"{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function a() {\\\"}\"}":
annotations:
- span:
test:
span:
line_start: 3
line_stop: 3
col_start: 1
@ -21,9 +22,11 @@ outputs:
content: "@test"
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test\\\"}\"}"
arguments: []
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}"
identifier: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function a() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:
@ -50,11 +53,166 @@ outputs:
col_start: 14
col_stop: 2
path: ""
content: "function x() {\n ...\n}"
content: "function a() {\n ...\n}"
span:
line_start: 4
line_stop: 6
col_start: 1
col_stop: 2
path: ""
content: "function x() {\n ...\n}"
content: "function a() {\n ...\n}"
"{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function b() {\\\"}\"}":
annotations:
test:
span:
line_start: 8
line_stop: 8
col_start: 1
col_stop: 12
path: ""
content: "@test(test)"
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test(test)\\\"}\"}"
arguments:
- test
identifier: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function b() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 10
line_stop: 10
col_start: 12
col_stop: 14
path: ""
content: " return ();"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 14
path: ""
content: " return ();"
span:
line_start: 9
line_stop: 11
col_start: 14
col_stop: 2
path: ""
content: "function b() {\n ...\n}"
span:
line_start: 9
line_stop: 11
col_start: 1
col_stop: 2
path: ""
content: "function b() {\n ...\n}"
"{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function c() {\\\"}\"}":
annotations:
test:
span:
line_start: 13
line_stop: 13
col_start: 1
col_stop: 13
path: ""
content: "@test(test,)"
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test(test,)\\\"}\"}"
arguments:
- test
identifier: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function c() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 15
line_stop: 15
col_start: 12
col_stop: 14
path: ""
content: " return ();"
span:
line_start: 15
line_stop: 15
col_start: 5
col_stop: 14
path: ""
content: " return ();"
span:
line_start: 14
line_stop: 16
col_start: 14
col_stop: 2
path: ""
content: "function c() {\n ...\n}"
span:
line_start: 14
line_stop: 16
col_start: 1
col_stop: 2
path: ""
content: "function c() {\n ...\n}"
"{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function d() {\\\"}\"}":
annotations:
test:
span:
line_start: 18
line_stop: 18
col_start: 1
col_stop: 8
path: ""
content: "@test()"
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test()\\\"}\"}"
arguments: []
identifier: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function d() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 20
line_stop: 20
col_start: 12
col_stop: 14
path: ""
content: " return ();"
span:
line_start: 20
line_stop: 20
col_start: 5
col_stop: 14
path: ""
content: " return ();"
span:
line_start: 19
line_stop: 21
col_start: 14
col_stop: 2
path: ""
content: "function d() {\n ...\n}"
span:
line_start: 19
line_stop: 21
col_start: 1
col_stop: 2
path: ""
content: "function d() {\n ...\n}"

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370009]: unexpected string: expected 'ident or int', got '?'\n --> test:3:6\n |\n 3 | @foo(?, bar, ?)\n | ^\nError [EPAR0370009]: unexpected string: expected 'ident or int', got '?'\n --> test:3:14\n |\n 3 | @foo(?, bar, ?)\n | ^\nError [EPAR0370017]: \"@context(...)\" is deprecated. Did you mean @test annotation?\n --> test:8:2\n |\n 8 | @context // recovery witness\n | ^^^^^^^"

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370017]: \"@context(...)\" is deprecated. Did you mean @test annotation?\n --> test:3:2\n |\n 3 | @context\n | ^^^^^^^\nError [EPAR0370017]: \"@context(...)\" is deprecated. Did you mean @test annotation?\n --> test:8:2\n |\n 8 | @context // recovery witness\n | ^^^^^^^"

View File

@ -12,7 +12,8 @@ outputs:
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}":
annotations:
- span:
test:
span:
line_start: 3
line_stop: 3
col_start: 1
@ -24,7 +25,9 @@ outputs:
- test
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:

View File

@ -12,7 +12,8 @@ outputs:
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}":
annotations:
- span:
test:
span:
line_start: 3
line_stop: 3
col_start: 1
@ -21,7 +22,8 @@ outputs:
content: "@test @test2"
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test @test2\\\"}\"}"
arguments: []
- span:
test2:
span:
line_start: 3
line_stop: 3
col_start: 7
@ -32,7 +34,9 @@ outputs:
arguments: []
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:

View File

@ -0,0 +1,208 @@
---
namespace: Parse
expectation: Pass
outputs:
- name: ""
expected_input: []
import_statements: []
imports: {}
aliases: {}
circuits: {}
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const y: u32) {\\\"}\"}":
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const y: u32) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const y: u32) {\\\"}\"}"
const_: true
mutable: false
type_:
IntegerType: U32
span:
line_start: 3
line_stop: 3
col_start: 18
col_stop: 19
path: ""
content: "function x(const y: u32) {"
const_: false
output: ~
core_mapping: ~
block:
statements:
- Conditional:
condition:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if y < 5u32 {\\\"}\"}"
right:
Value:
Integer:
- U32
- "5"
- span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 16
path: ""
content: " if y < 5u32 {"
op: Lt
span:
line_start: 4
line_stop: 4
col_start: 8
col_stop: 16
path: ""
content: " if y < 5u32 {"
block:
statements:
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x(y+1);\\\"}\"}"
arguments:
- Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x(y+1);\\\"}\"}"
right:
Value:
Implicit:
- "1"
- span:
line_start: 5
line_stop: 5
col_start: 13
col_stop: 14
path: ""
content: " x(y+1);"
op: Add
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 14
path: ""
content: " x(y+1);"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 15
path: ""
content: " x(y+1);"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 15
path: ""
content: " x(y+1);"
span:
line_start: 4
line_stop: 6
col_start: 17
col_stop: 6
path: ""
content: " if y < 5u32 {\n ...\n }"
next: ~
span:
line_start: 4
line_stop: 6
col_start: 5
col_stop: 6
path: ""
content: " if y < 5u32 {\n ...\n }"
span:
line_start: 3
line_stop: 7
col_start: 26
col_stop: 2
path: ""
content: "function x(const y: u32) {\n ...\n ...\n ...\n}"
span:
line_start: 3
line_stop: 7
col_start: 1
col_stop: 2
path: ""
content: "function x(const y: u32) {\n ...\n ...\n ...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: {}
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 9
line_stop: 9
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\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x(1u32);\\\"}\"}"
arguments:
- Value:
Integer:
- U32
- "1"
- span:
line_start: 10
line_stop: 10
col_start: 7
col_stop: 11
path: ""
content: " x(1u32);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 12
path: ""
content: " x(1u32);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 12
path: ""
content: " x(1u32);"
- Return:
expression:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return y;\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 5
col_stop: 13
path: ""
content: " return y;"
span:
line_start: 9
line_stop: 12
col_start: 32
col_stop: 2
path: ""
content: "function main(y: bool) -> bool {\n ...\n ...\n}"
span:
line_start: 9
line_stop: 12
col_start: 1
col_stop: 2
path: ""
content: "function main(y: bool) -> bool {\n ...\n ...\n}"

View File

@ -0,0 +1,208 @@
---
namespace: Parse
expectation: Pass
outputs:
- name: ""
expected_input: []
import_statements: []
imports: {}
aliases: {}
circuits: {}
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const y: u32) {\\\"}\"}":
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const y: u32) {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const y: u32) {\\\"}\"}"
const_: true
mutable: false
type_:
IntegerType: U32
span:
line_start: 3
line_stop: 3
col_start: 18
col_stop: 19
path: ""
content: "function x(const y: u32) {"
const_: false
output: ~
core_mapping: ~
block:
statements:
- Conditional:
condition:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if y < 999u32 {\\\"}\"}"
right:
Value:
Integer:
- U32
- "999"
- span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 18
path: ""
content: " if y < 999u32 {"
op: Lt
span:
line_start: 4
line_stop: 4
col_start: 8
col_stop: 18
path: ""
content: " if y < 999u32 {"
block:
statements:
- Expression:
expression:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x(y+1);\\\"}\"}"
arguments:
- Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":11,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x(y+1);\\\"}\"}"
right:
Value:
Implicit:
- "1"
- span:
line_start: 5
line_stop: 5
col_start: 13
col_stop: 14
path: ""
content: " x(y+1);"
op: Add
span:
line_start: 5
line_stop: 5
col_start: 11
col_stop: 14
path: ""
content: " x(y+1);"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 15
path: ""
content: " x(y+1);"
span:
line_start: 5
line_stop: 5
col_start: 9
col_stop: 15
path: ""
content: " x(y+1);"
span:
line_start: 4
line_stop: 6
col_start: 19
col_stop: 6
path: ""
content: " if y < 999u32 {\n ...\n }"
next: ~
span:
line_start: 4
line_stop: 6
col_start: 5
col_stop: 6
path: ""
content: " if y < 999u32 {\n ...\n }"
span:
line_start: 3
line_stop: 7
col_start: 26
col_stop: 2
path: ""
content: "function x(const y: u32) {\n ...\n ...\n ...\n}"
span:
line_start: 3
line_stop: 7
col_start: 1
col_stop: 2
path: ""
content: "function x(const y: u32) {\n ...\n ...\n ...\n}"
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}":
annotations: {}
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":15,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(y: bool) -> bool {\\\"}\"}"
const_: false
mutable: true
type_: Boolean
span:
line_start: 9
line_stop: 9
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\":\"x\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x(1u32);\\\"}\"}"
arguments:
- Value:
Integer:
- U32
- "1"
- span:
line_start: 10
line_stop: 10
col_start: 7
col_stop: 11
path: ""
content: " x(1u32);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 12
path: ""
content: " x(1u32);"
span:
line_start: 10
line_stop: 10
col_start: 5
col_stop: 12
path: ""
content: " x(1u32);"
- Return:
expression:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return y;\\\"}\"}"
span:
line_start: 11
line_stop: 11
col_start: 5
col_stop: 13
path: ""
content: " return y;"
span:
line_start: 9
line_stop: 12
col_start: 32
col_stop: 2
path: ""
content: "function main(y: bool) -> bool {\n ...\n ...\n}"
span:
line_start: 9
line_stop: 12
col_start: 1
col_stop: 2
path: ""
content: "function main(y: bool) -> bool {\n ...\n ...\n}"

View File

@ -0,0 +1,53 @@
---
namespace: Parse
expectation: Pass
outputs:
- name: ""
expected_input: []
import_statements: []
imports: {}
aliases: {}
circuits: {}
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const function x() {\\\"}\"}":
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const function x() {\\\"}\"}"
input: []
const_: true
output: ~
core_mapping: ~
block:
statements:
- Return:
expression:
TupleInit:
elements: []
span:
line_start: 4
line_stop: 4
col_start: 12
col_stop: 14
path: ""
content: " return ();"
span:
line_start: 4
line_stop: 4
col_start: 5
col_stop: 14
path: ""
content: " return ();"
span:
line_start: 3
line_stop: 5
col_start: 20
col_stop: 2
path: ""
content: "const function x() {\n ...\n}"
span:
line_start: 3
line_stop: 5
col_start: 7
col_stop: 2
path: ""
content: "const function x() {\n ...\n}"

View File

@ -11,7 +11,7 @@ outputs:
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}"
input:
- Variable:
@ -40,7 +40,9 @@ outputs:
col_stop: 27
path: ""
content: "function x(x: u32, const y: i32) {"
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:
@ -76,7 +78,7 @@ outputs:
path: ""
content: "function x(x: u32, const y: i32) {\n ...\n}"
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}"
input:
- Variable:
@ -105,7 +107,9 @@ outputs:
col_stop: 27
path: ""
content: "function x(const x: u32, y: i32) {"
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:

View File

@ -11,11 +11,13 @@ outputs:
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}"
input:
- ConstSelfKeyword: "{\"name\":\"const self\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const self) {\\\"}\"}"
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:

View File

@ -11,10 +11,12 @@ outputs:
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:

View File

@ -11,10 +11,12 @@ outputs:
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() {}\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements: []
span:

View File

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

View File

@ -11,7 +11,7 @@ outputs:
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: [u8; 12]) {\\\"}\"}"
input:
- Variable:
@ -29,7 +29,9 @@ outputs:
col_stop: 13
path: ""
content: "function x(x: [u8; 12]) {"
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:

View File

@ -11,7 +11,7 @@ outputs:
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: [u8; _]) {\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: [u8; _]) {\\\"}\"}"
input:
- Variable:
@ -29,7 +29,9 @@ outputs:
col_stop: 13
path: ""
content: "function x(x: [u8; _]) {"
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:

View File

@ -11,7 +11,7 @@ outputs:
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: MyCircuit) {\\\"}\"}"
input:
- Variable:
@ -27,7 +27,9 @@ outputs:
col_stop: 13
path: ""
content: "function x(x: MyCircuit) {"
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:

View File

@ -11,7 +11,7 @@ outputs:
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: (u32, i32)) {\\\"}\"}"
input:
- Variable:
@ -29,7 +29,9 @@ outputs:
col_stop: 13
path: ""
content: "function x(x: (u32, i32)) {"
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:

View File

@ -11,7 +11,7 @@ outputs:
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}"
input:
- Variable:
@ -40,7 +40,9 @@ outputs:
col_stop: 21
path: ""
content: "function x(x: u32, y: i32) {"
const_: false
output: ~
core_mapping: ~
block:
statements:
- Return:

View File

@ -11,7 +11,7 @@ outputs:
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}"
input:
- Variable:
@ -40,8 +40,10 @@ outputs:
col_stop: 21
path: ""
content: "function x(x: u32, y: i32) -> u32 {"
const_: false
output:
IntegerType: U32
core_mapping: ~
block:
statements:
- Return:

View File

@ -11,11 +11,13 @@ outputs:
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() -> u32 {\\\"}\"}"
input: []
const_: false
output:
IntegerType: U32
core_mapping: ~
block:
statements:
- Return:

View File

@ -11,13 +11,15 @@ outputs:
global_consts: {}
functions:
"{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}":
annotations: []
annotations: {}
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x() -> (u32, u32) {\\\"}\"}"
input: []
const_: false
output:
Tuple:
- IntegerType: U32
- IntegerType: U32
core_mapping: ~
block:
statements:
- Return:

View File

@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370002]: Cannot import empty list\n --> test:3:8\n |\n 3 | import a.();\n | ^"
- "Error [EPAR0370002]: Cannot import empty list\n --> test:3:8\n |\n 3 | import a.();\n | ^\nError [EPAR0370002]: Cannot import empty list\n --> test:5:8\n |\n 5 | import a.();\n | ^"

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370012]: package names must be lowercase alphanumeric ascii with underscores and singular dashes\n --> test:3:8\n |\n 3 | import AB.c;\n | ^^\nError [EPAR0370012]: package names must be lowercase alphanumeric ascii with underscores and singular dashes\n --> test:5:8\n |\n 5 | import AB.c;\n | ^^"

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370009]: unexpected string: expected 'package name', got 'function'\n --> test:3:8\n |\n 3 | import function.a;\n | ^^^^^^^^\nError [EPAR0370009]: unexpected string: expected 'package name', got 'import'\n --> test:5:8\n |\n 5 | import import.a;\n | ^^^^^^"

View File

@ -0,0 +1,677 @@
---
namespace: Serialize
expectation: Pass
outputs:
- name: ""
expected_input: []
import_statements: []
imports: {}
aliases: {}
circuits:
"{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Point {\\\"}\"}":
circuit_name: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit Point {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x: i32,\\\"}\"}"
- IntegerType: I32
- CircuitVariable:
- "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":5,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y: i32,\\\"}\"}"
- IntegerType: I32
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function new(x: i32, y: i32) -> Self { \\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function new(x: i32, y: i32) -> Self { \\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: I32
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function new(x: i32, y: i32) -> Self { \\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: I32
const_: false
output: SelfType
core_mapping: ~
block:
statements:
- Return:
expression:
CircuitInit:
name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return Self { x, y };\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return Self { x, y };\\\"}\"}"
expression: ~
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return Self { x, y };\\\"}\"}"
expression: ~
"{\"name\":\"LinearRegression\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit LinearRegression {\\\"}\"}":
circuit_name: "{\"name\":\"LinearRegression\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit LinearRegression {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" points: [Point; 5],\\\"}\"}"
- Array:
- Identifier: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":14,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" points: [Point; 5],\\\"}\"}"
- - value: "5"
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function new(points: [Point; 5]) -> Self { \\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":18,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function new(points: [Point; 5]) -> Self { \\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Identifier: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":27,\\\"col_stop\\\":32,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function new(points: [Point; 5]) -> Self { \\\"}\"}"
- - value: "5"
const_: false
output: SelfType
core_mapping: ~
block:
statements:
- Return:
expression:
CircuitInit:
name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return Self { points };\\\"}\"}"
members:
- identifier: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return Self { points };\\\"}\"}"
expression: ~
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":14,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function slope(self) -> i32 { \\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":20,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function slope(self) -> i32 { \\\"}\"}"
const_: false
output:
IntegerType: I32
core_mapping: ~
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"num_points\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":13,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let num_points = 5i32;\\\"}\"}"
type_: ~
value:
Value:
Integer:
- I32
- "5"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"x_sum\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x_sum = 0i32; \\\"}\"}"
type_: ~
value:
Value:
Integer:
- I32
- "0"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"y_sum\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let y_sum = 0i32; \\\"}\"}"
type_: ~
value:
Value:
Integer:
- I32
- "0"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"xy_sum\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let xy_sum = 0i32; \\\"}\"}"
type_: ~
value:
Value:
Integer:
- I32
- "0"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"x2_sum\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x2_sum = 0i32; \\\"}\"}"
type_: ~
value:
Value:
Integer:
- I32
- "0"
- Iteration:
variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" for i in 0..5 {\\\"}\"}"
start:
Value:
Implicit: "0"
stop:
Value:
Implicit: "5"
inclusive: false
block:
statements:
- Assign:
operation: Add
assignee:
identifier: "{\"name\":\"x_sum\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x_sum += self.points[i].x;\\\"}\"}"
accesses: []
value:
Access:
Member:
inner:
Access:
Array:
array:
Access:
Member:
inner:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":22,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x_sum += self.points[i].x;\\\"}\"}"
name: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":27,\\\"col_stop\\\":33,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x_sum += self.points[i].x;\\\"}\"}"
type_: ~
index:
Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x_sum += self.points[i].x;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x_sum += self.points[i].x;\\\"}\"}"
type_: ~
- Assign:
operation: Add
assignee:
identifier: "{\"name\":\"y_sum\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y_sum += self.points[i].y;\\\"}\"}"
accesses: []
value:
Access:
Member:
inner:
Access:
Array:
array:
Access:
Member:
inner:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":22,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y_sum += self.points[i].y;\\\"}\"}"
name: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":27,\\\"col_stop\\\":33,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y_sum += self.points[i].y;\\\"}\"}"
type_: ~
index:
Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y_sum += self.points[i].y;\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y_sum += self.points[i].y;\\\"}\"}"
type_: ~
- Assign:
operation: Add
assignee:
identifier: "{\"name\":\"xy_sum\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" xy_sum += self.points[i].x * self.points[i].y;\\\"}\"}"
accesses: []
value:
Binary:
left:
Access:
Member:
inner:
Access:
Array:
array:
Access:
Member:
inner:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":23,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" xy_sum += self.points[i].x * self.points[i].y;\\\"}\"}"
name: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":28,\\\"col_stop\\\":34,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" xy_sum += self.points[i].x * self.points[i].y;\\\"}\"}"
type_: ~
index:
Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" xy_sum += self.points[i].x * self.points[i].y;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" xy_sum += self.points[i].x * self.points[i].y;\\\"}\"}"
type_: ~
right:
Access:
Member:
inner:
Access:
Array:
array:
Access:
Member:
inner:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":42,\\\"col_stop\\\":46,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" xy_sum += self.points[i].x * self.points[i].y;\\\"}\"}"
name: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":47,\\\"col_stop\\\":53,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" xy_sum += self.points[i].x * self.points[i].y;\\\"}\"}"
type_: ~
index:
Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" xy_sum += self.points[i].x * self.points[i].y;\\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":32,\\\"line_stop\\\":32,\\\"col_start\\\":57,\\\"col_stop\\\":58,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" xy_sum += self.points[i].x * self.points[i].y;\\\"}\"}"
type_: ~
op: Mul
- Assign:
operation: Add
assignee:
identifier: "{\"name\":\"x2_sum\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x2_sum += self.points[i].x * self.points[i].x;\\\"}\"}"
accesses: []
value:
Binary:
left:
Access:
Member:
inner:
Access:
Array:
array:
Access:
Member:
inner:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":23,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x2_sum += self.points[i].x * self.points[i].x;\\\"}\"}"
name: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":28,\\\"col_stop\\\":34,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x2_sum += self.points[i].x * self.points[i].x;\\\"}\"}"
type_: ~
index:
Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":35,\\\"col_stop\\\":36,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x2_sum += self.points[i].x * self.points[i].x;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":38,\\\"col_stop\\\":39,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x2_sum += self.points[i].x * self.points[i].x;\\\"}\"}"
type_: ~
right:
Access:
Member:
inner:
Access:
Array:
array:
Access:
Member:
inner:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":42,\\\"col_stop\\\":46,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x2_sum += self.points[i].x * self.points[i].x;\\\"}\"}"
name: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":47,\\\"col_stop\\\":53,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x2_sum += self.points[i].x * self.points[i].x;\\\"}\"}"
type_: ~
index:
Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":54,\\\"col_stop\\\":55,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x2_sum += self.points[i].x * self.points[i].x;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":33,\\\"line_stop\\\":33,\\\"col_start\\\":57,\\\"col_stop\\\":58,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x2_sum += self.points[i].x * self.points[i].x;\\\"}\"}"
type_: ~
op: Mul
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"numerator\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":13,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let numerator = (num_points * xy_sum) - (x_sum * y_sum); \\\"}\"}"
type_: ~
value:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"num_points\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":26,\\\"col_stop\\\":36,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let numerator = (num_points * xy_sum) - (x_sum * y_sum); \\\"}\"}"
right:
Identifier: "{\"name\":\"xy_sum\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":39,\\\"col_stop\\\":45,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let numerator = (num_points * xy_sum) - (x_sum * y_sum); \\\"}\"}"
op: Mul
right:
Binary:
left:
Identifier: "{\"name\":\"x_sum\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":50,\\\"col_stop\\\":55,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let numerator = (num_points * xy_sum) - (x_sum * y_sum); \\\"}\"}"
right:
Identifier: "{\"name\":\"y_sum\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":58,\\\"col_stop\\\":63,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let numerator = (num_points * xy_sum) - (x_sum * y_sum); \\\"}\"}"
op: Mul
op: Sub
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"denominator\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":13,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let denominator = (num_points * x2_sum) - (x_sum * x_sum);\\\"}\"}"
type_: ~
value:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"num_points\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":28,\\\"col_stop\\\":38,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let denominator = (num_points * x2_sum) - (x_sum * x_sum);\\\"}\"}"
right:
Identifier: "{\"name\":\"x2_sum\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":41,\\\"col_stop\\\":47,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let denominator = (num_points * x2_sum) - (x_sum * x_sum);\\\"}\"}"
op: Mul
right:
Binary:
left:
Identifier: "{\"name\":\"x_sum\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":52,\\\"col_stop\\\":57,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let denominator = (num_points * x2_sum) - (x_sum * x_sum);\\\"}\"}"
right:
Identifier: "{\"name\":\"x_sum\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":60,\\\"col_stop\\\":65,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let denominator = (num_points * x2_sum) - (x_sum * x_sum);\\\"}\"}"
op: Mul
op: Sub
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let slope = numerator / denominator;\\\"}\"}"
type_: ~
value:
Binary:
left:
Identifier: "{\"name\":\"numerator\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":21,\\\"col_stop\\\":30,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let slope = numerator / denominator;\\\"}\"}"
right:
Identifier: "{\"name\":\"denominator\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":33,\\\"col_stop\\\":44,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let slope = numerator / denominator;\\\"}\"}"
op: Div
- Return:
expression:
Identifier: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":16,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return slope;\\\"}\"}"
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"offset\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":14,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function offset(self, slope: i32) -> i32 {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":21,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function offset(self, slope: i32) -> i32 {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":27,\\\"col_stop\\\":32,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function offset(self, slope: i32) -> i32 {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: I32
const_: false
output:
IntegerType: I32
core_mapping: ~
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"num_points\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":13,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let num_points = 5i32; \\\"}\"}"
type_: ~
value:
Value:
Integer:
- I32
- "5"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"x_sum\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let x_sum = 0i32;\\\"}\"}"
type_: ~
value:
Value:
Integer:
- I32
- "0"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"y_sum\",\"span\":\"{\\\"line_start\\\":45,\\\"line_stop\\\":45,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let y_sum = 0i32;\\\"}\"}"
type_: ~
value:
Value:
Integer:
- I32
- "0"
- Iteration:
variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":46,\\\"line_stop\\\":46,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" for i in 0..5 {\\\"}\"}"
start:
Value:
Implicit: "0"
stop:
Value:
Implicit: "5"
inclusive: false
block:
statements:
- Assign:
operation: Add
assignee:
identifier: "{\"name\":\"x_sum\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x_sum += self.points[i].x;\\\"}\"}"
accesses: []
value:
Access:
Member:
inner:
Access:
Array:
array:
Access:
Member:
inner:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":22,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x_sum += self.points[i].x;\\\"}\"}"
name: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":27,\\\"col_stop\\\":33,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x_sum += self.points[i].x;\\\"}\"}"
type_: ~
index:
Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x_sum += self.points[i].x;\\\"}\"}"
name: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" x_sum += self.points[i].x;\\\"}\"}"
type_: ~
- Assign:
operation: Add
assignee:
identifier: "{\"name\":\"y_sum\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":13,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y_sum += self.points[i].y; \\\"}\"}"
accesses: []
value:
Access:
Member:
inner:
Access:
Array:
array:
Access:
Member:
inner:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":22,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y_sum += self.points[i].y; \\\"}\"}"
name: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":27,\\\"col_stop\\\":33,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y_sum += self.points[i].y; \\\"}\"}"
type_: ~
index:
Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":34,\\\"col_stop\\\":35,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y_sum += self.points[i].y; \\\"}\"}"
name: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":37,\\\"col_stop\\\":38,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" y_sum += self.points[i].y; \\\"}\"}"
type_: ~
- Return:
expression:
Binary:
left:
Binary:
left:
Identifier: "{\"name\":\"y_sum\",\"span\":\"{\\\"line_start\\\":50,\\\"line_stop\\\":50,\\\"col_start\\\":17,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return (y_sum - slope * x_sum) / num_points;\\\"}\"}"
right:
Binary:
left:
Identifier: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":50,\\\"line_stop\\\":50,\\\"col_start\\\":25,\\\"col_stop\\\":30,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return (y_sum - slope * x_sum) / num_points;\\\"}\"}"
right:
Identifier: "{\"name\":\"x_sum\",\"span\":\"{\\\"line_start\\\":50,\\\"line_stop\\\":50,\\\"col_start\\\":33,\\\"col_stop\\\":38,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return (y_sum - slope * x_sum) / num_points;\\\"}\"}"
op: Mul
op: Sub
right:
Identifier: "{\"name\":\"num_points\",\"span\":\"{\\\"line_start\\\":50,\\\"line_stop\\\":50,\\\"col_start\\\":42,\\\"col_stop\\\":52,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return (y_sum - slope * x_sum) / num_points;\\\"}\"}"
op: Div
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main (x: i32, y: i32) -> [i32; 2] {\\\"}\"}":
annotations: {}
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main (x: i32, y: i32) -> [i32; 2] {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main (x: i32, y: i32) -> [i32; 2] {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: I32
- Variable:
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":24,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main (x: i32, y: i32) -> [i32; 2] {\\\"}\"}"
const_: false
mutable: true
type_:
IntegerType: I32
const_: false
output:
Array:
- IntegerType: I32
- - value: "2"
core_mapping: ~
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":7,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let points: [Point; 5] = [\\\"}\"}"
type_:
Array:
- Identifier: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":16,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let points: [Point; 5] = [\\\"}\"}"
- - value: "5"
value:
ArrayInline:
elements:
- Expression:
CircuitInit:
name: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 1, y: y + 1},\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 1, y: y + 1},\\\"}\"}"
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 1, y: y + 1},\\\"}\"}"
right:
Value:
Implicit: "1"
op: Add
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 1, y: y + 1},\\\"}\"}"
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 1, y: y + 1},\\\"}\"}"
right:
Value:
Implicit: "1"
op: Add
- Expression:
CircuitInit:
name: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 2, y: y + 2},\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 2, y: y + 2},\\\"}\"}"
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 2, y: y + 2},\\\"}\"}"
right:
Value:
Implicit: "2"
op: Add
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 2, y: y + 2},\\\"}\"}"
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 2, y: y + 2},\\\"}\"}"
right:
Value:
Implicit: "2"
op: Add
- Expression:
CircuitInit:
name: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 3, y: y + 3},\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 3, y: y + 3},\\\"}\"}"
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 3, y: y + 3},\\\"}\"}"
right:
Value:
Implicit: "3"
op: Add
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 3, y: y + 3},\\\"}\"}"
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 3, y: y + 3},\\\"}\"}"
right:
Value:
Implicit: "3"
op: Add
- Expression:
CircuitInit:
name: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 4, y: y + 4},\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 4, y: y + 4},\\\"}\"}"
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 4, y: y + 4},\\\"}\"}"
right:
Value:
Implicit: "4"
op: Add
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 4, y: y + 4},\\\"}\"}"
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 4, y: y + 4},\\\"}\"}"
right:
Value:
Implicit: "4"
op: Add
- Expression:
CircuitInit:
name: "{\"name\":\"Point\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 5, y: y + 5}\\\"}\"}"
members:
- identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 5, y: y + 5}\\\"}\"}"
expression:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":16,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 5, y: y + 5}\\\"}\"}"
right:
Value:
Implicit: "5"
op: Add
- identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":23,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 5, y: y + 5}\\\"}\"}"
expression:
Binary:
left:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" Point{x: x + 5, y: y + 5}\\\"}\"}"
right:
Value:
Implicit: "5"
op: Add
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"reg\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":7,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let reg = LinearRegression::new(points);\\\"}\"}"
type_: ~
value:
Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"LinearRegression\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":13,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let reg = LinearRegression::new(points);\\\"}\"}"
name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":31,\\\"col_stop\\\":34,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let reg = LinearRegression::new(points);\\\"}\"}"
type_: ~
arguments:
- Identifier: "{\"name\":\"points\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":35,\\\"col_stop\\\":41,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let reg = LinearRegression::new(points);\\\"}\"}"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":7,\\\"col_stop\\\":12,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let slope = reg.slope();\\\"}\"}"
type_: ~
value:
Call:
function:
Access:
Member:
inner:
Identifier: "{\"name\":\"reg\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let slope = reg.slope();\\\"}\"}"
name: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":19,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let slope = reg.slope();\\\"}\"}"
type_: ~
arguments: []
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"offset\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":7,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let offset = reg.offset(slope);\\\"}\"}"
type_: ~
value:
Call:
function:
Access:
Member:
inner:
Identifier: "{\"name\":\"reg\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":16,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let offset = reg.offset(slope);\\\"}\"}"
name: "{\"name\":\"offset\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":20,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let offset = reg.offset(slope);\\\"}\"}"
type_: ~
arguments:
- Identifier: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":27,\\\"col_stop\\\":32,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let offset = reg.offset(slope);\\\"}\"}"
- Return:
expression:
ArrayInline:
elements:
- Expression:
Identifier: "{\"name\":\"slope\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":11,\\\"col_stop\\\":16,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return [slope, offset];\\\"}\"}"
- Expression:
Identifier: "{\"name\":\"offset\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":18,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return [slope, offset];\\\"}\"}"

View File

@ -0,0 +1,36 @@
---
namespace: Serialize
expectation: Pass
outputs:
- name: ""
expected_input: []
import_statements: []
imports: {}
aliases: {}
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() -> u8 {\\\"}\"}":
annotations: {}
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main() -> u8 {\\\"}\"}"
input: []
const_: false
output:
IntegerType: U8
core_mapping: ~
block:
statements:
- Return:
expression:
Binary:
left:
Value:
Integer:
- U8
- "1"
right:
Value:
Integer:
- U8
- "1"
op: Add

View File

@ -0,0 +1,554 @@
---
namespace: Serialize
expectation: Pass
outputs:
- name: ""
expected_input: []
import_statements: []
imports: {}
aliases: {}
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(str: [char; 20]) -> bool {\\\"}\"}":
annotations: {}
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(str: [char; 20]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(str: [char; 20]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Char
- - value: "20"
const_: false
output: Boolean
core_mapping: ~
block:
statements:
- Return:
expression:
Call:
function:
Identifier: "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":12,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return is_palindrome(str);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return is_palindrome(str);\\\"}\"}"
"{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function is_palindrome(str: [char; 20]) -> bool {\\\"}\"}":
annotations: {}
identifier: "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":10,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function is_palindrome(str: [char; 20]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":24,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function is_palindrome(str: [char; 20]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Char
- - value: "20"
const_: false
output: Boolean
core_mapping: ~
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"str_len\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":11,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const str_len = 20u32; // saving const for convenience\\\"}\"}"
type_: ~
value:
Value:
Integer:
- U32
- "20"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = true;\\\"}\"}"
type_: ~
value:
Value:
Boolean: "true"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let processed = 0u8;\\\"}\"}"
type_: ~
value:
Value:
Integer:
- U8
- "0"
- Iteration:
variable: "{\"name\":\"start\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" for start in 0..(str_len / 2) {\\\"}\"}"
start:
Value:
Implicit: "0"
stop:
Binary:
left:
Identifier: "{\"name\":\"str_len\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":22,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" for start in 0..(str_len / 2) {\\\"}\"}"
right:
Value:
Implicit: "2"
op: Div
inclusive: false
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":13,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let start_sym = str[start];\\\"}\"}"
type_: ~
value:
Access:
Array:
array:
Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":25,\\\"col_stop\\\":28,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let start_sym = str[start];\\\"}\"}"
index:
Identifier: "{\"name\":\"start\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":29,\\\"col_stop\\\":34,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let start_sym = str[start];\\\"}\"}"
- Conditional:
condition:
Binary:
left:
Identifier: "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if start_sym != ' ' {\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 32
op: Ne
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":17,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let skipped = 0u8;\\\"}\"}"
type_: ~
value:
Value:
Integer:
- U8
- "0"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"end_empty\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":17,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let end_empty = 0u8;\\\"}\"}"
type_: ~
value:
Value:
Integer:
- U8
- "0"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":17,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let end_sym = ' ';\\\"}\"}"
type_: ~
value:
Value:
Char:
character:
Scalar: 32
- Iteration:
variable: "{\"name\":\"end\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":17,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" for end in (str_len - 1)..start {\\\"}\"}"
start:
Binary:
left:
Identifier: "{\"name\":\"str_len\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":25,\\\"col_stop\\\":32,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" for end in (str_len - 1)..start {\\\"}\"}"
right:
Value:
Implicit: "1"
op: Sub
stop:
Identifier: "{\"name\":\"start\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":39,\\\"col_stop\\\":44,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" for end in (str_len - 1)..start {\\\"}\"}"
inclusive: false
block:
statements:
- Conditional:
condition:
Binary:
left:
Binary:
left:
Binary:
left:
Access:
Array:
array:
Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
index:
Identifier: "{\"name\":\"end\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":24,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 32
op: Ne
right:
Binary:
left:
Identifier: "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":39,\\\"col_stop\\\":46,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
right:
Identifier: "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":50,\\\"col_stop\\\":59,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
op: Eq
op: And
right:
Binary:
left:
Identifier: "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":63,\\\"col_stop\\\":70,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 32
op: Eq
op: And
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":21,\\\"col_stop\\\":28,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" end_sym = str[end];\\\"}\"}"
accesses: []
value:
Access:
Array:
array:
Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":31,\\\"col_stop\\\":34,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" end_sym = str[end];\\\"}\"}"
index:
Identifier: "{\"name\":\"end\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":35,\\\"col_stop\\\":38,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" end_sym = str[end];\\\"}\"}"
next:
Block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"end_empty\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":21,\\\"col_stop\\\":30,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" end_empty = end_empty + 1;\\\"}\"}"
accesses: []
value:
Binary:
left:
Identifier: "{\"name\":\"end_empty\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":33,\\\"col_stop\\\":42,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" end_empty = end_empty + 1;\\\"}\"}"
right:
Value:
Implicit: "1"
op: Add
- Conditional:
condition:
Binary:
left:
Access:
Array:
array:
Identifier: "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":24,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if str[end] != ' ' {\\\"}\"}"
index:
Identifier: "{\"name\":\"end\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":28,\\\"col_stop\\\":31,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if str[end] != ' ' {\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 32
op: Ne
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":25,\\\"col_stop\\\":32,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" skipped = skipped + 1;\\\"}\"}"
accesses: []
value:
Binary:
left:
Identifier: "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":30,\\\"line_stop\\\":30,\\\"col_start\\\":35,\\\"col_stop\\\":42,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" skipped = skipped + 1;\\\"}\"}"
right:
Value:
Implicit: "1"
op: Add
next: ~
- Conditional:
condition:
Binary:
left:
Identifier: "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":16,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if end_sym != ' ' {\\\"}\"}"
right:
Value:
Char:
character:
Scalar: 32
op: Ne
block:
statements:
- Console:
function:
Log:
string:
- Scalar: 67
- Scalar: 111
- Scalar: 109
- Scalar: 112
- Scalar: 97
- Scalar: 114
- Scalar: 105
- Scalar: 110
- Scalar: 103
- Scalar: 58
- Scalar: 32
- Scalar: 123
- Scalar: 125
- Scalar: 32
- Scalar: 63
- Scalar: 32
- Scalar: 123
- Scalar: 125
parameters:
- Identifier: "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":51,\\\"col_stop\\\":60,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"Comparing: {} ? {}\\\\\\\", start_sym, end_sym);\\\"}\"}"
- Identifier: "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":62,\\\"col_stop\\\":69,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"Comparing: {} ? {}\\\\\\\", start_sym, end_sym);\\\"}\"}"
- Conditional:
condition:
Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":20,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if result {\\\"}\"}"
block:
statements:
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":21,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" result = (start_sym == end_sym);\\\"}\"}"
accesses: []
value:
Binary:
left:
Identifier: "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":31,\\\"col_stop\\\":40,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" result = (start_sym == end_sym);\\\"}\"}"
right:
Identifier: "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":40,\\\"line_stop\\\":40,\\\"col_start\\\":44,\\\"col_stop\\\":51,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" result = (start_sym == end_sym);\\\"}\"}"
op: Eq
next: ~
- Assign:
operation: Assign
assignee:
identifier: "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":17,\\\"col_stop\\\":26,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" processed = processed + 1;\\\"}\"}"
accesses: []
value:
Binary:
left:
Identifier: "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":29,\\\"col_stop\\\":38,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" processed = processed + 1;\\\"}\"}"
right:
Value:
Implicit: "1"
op: Add
next: ~
next: ~
- Console:
function:
Log:
string:
- Scalar: 82
- Scalar: 101
- Scalar: 115
- Scalar: 117
- Scalar: 108
- Scalar: 116
- Scalar: 32
- Scalar: 105
- Scalar: 115
- Scalar: 58
- Scalar: 32
- Scalar: 123
- Scalar: 125
parameters:
- Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":34,\\\"col_stop\\\":40,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"Result is: {}\\\\\\\", result);\\\"}\"}"
- Return:
expression:
Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":50,\\\"line_stop\\\":50,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return result;\\\"}\"}"
"{\"name\":\"test_is_palindrome\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":10,\\\"col_stop\\\":28,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_is_palindrome() {\\\"}\"}":
annotations:
test:
arguments: []
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":53,\\\"line_stop\\\":53,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test\\\"}\"}"
identifier: "{\"name\":\"test_is_palindrome\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":10,\\\"col_stop\\\":28,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_is_palindrome() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Console:
function:
Assert:
Call:
function:
Identifier: "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"a b a \\\\\\\"));\\\"}\"}"
arguments:
- Value:
String:
- Scalar: 97
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 98
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 97
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Console:
function:
Assert:
Call:
function:
Identifier: "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"😀😀😀😀😀 😀😀😀😀😀\\\\\\\"));\\\"}\"}"
arguments:
- Value:
String:
- Scalar: 128512
- Scalar: 128512
- Scalar: 128512
- Scalar: 128512
- Scalar: 128512
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 128512
- Scalar: 128512
- Scalar: 128512
- Scalar: 128512
- Scalar: 128512
- Console:
function:
Assert:
Call:
function:
Identifier: "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"borrow or rob \\\\\\\"));\\\"}\"}"
arguments:
- Value:
String:
- Scalar: 98
- Scalar: 111
- Scalar: 114
- Scalar: 114
- Scalar: 111
- Scalar: 119
- Scalar: 32
- Scalar: 111
- Scalar: 114
- Scalar: 32
- Scalar: 114
- Scalar: 111
- Scalar: 98
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Console:
function:
Assert:
Call:
function:
Identifier: "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"bbbb aaaa aaaa bbbb\\\\\\\"));\\\"}\"}"
arguments:
- Value:
String:
- Scalar: 98
- Scalar: 98
- Scalar: 98
- Scalar: 98
- Scalar: 32
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 32
- Scalar: 32
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 32
- Scalar: 98
- Scalar: 98
- Scalar: 98
- Scalar: 98
- Console:
function:
Assert:
Call:
function:
Identifier: "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"aaaaaaaaaaaaaaaaaaaa\\\\\\\"));\\\"}\"}"
arguments:
- Value:
String:
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Scalar: 97
- Console:
function:
Assert:
Call:
function:
Identifier: "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"taco cat \\\\\\\"));\\\"}\"}"
arguments:
- Value:
String:
- Scalar: 116
- Scalar: 97
- Scalar: 99
- Scalar: 111
- Scalar: 32
- Scalar: 99
- Scalar: 97
- Scalar: 116
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32
- Scalar: 32

View File

@ -0,0 +1,5 @@
---
namespace: Serialize
expectation: Fail
outputs:
- "Error [EPAR0370005]: expected 'import', 'circuit', 'function', 'test', '@' -- got 'invalid'\n --> test:3:1\n |\n 3 | invalid\n | ^^^^^^^"

View File

@ -0,0 +1,169 @@
---
namespace: Serialize
expectation: Pass
outputs:
- name: ""
expected_input: []
import_statements: []
imports: {}
aliases: {}
circuits:
"{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}":
circuit_name: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}"
members:
- CircuitVariable:
- "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" parameters: [group; 256];\\\"}\"}"
- Array:
- Group
- - value: "256"
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function new(parameters: [group; 256]) -> Self {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":28,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function new(parameters: [group; 256]) -> Self {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Group
- - value: "256"
const_: false
output: SelfType
core_mapping: ~
block:
statements:
- Return:
expression:
CircuitInit:
name: "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}"
members:
- identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":23,\\\"col_stop\\\":33,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}"
expression:
Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":35,\\\"col_stop\\\":45,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}"
- CircuitFunction:
annotations: {}
identifier: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function hash(self, bits: [bool; 256]) -> group {\\\"}\"}"
input:
- SelfKeyword: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":19,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function hash(self, bits: [bool; 256]) -> group {\\\"}\"}"
- Variable:
identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":25,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" function hash(self, bits: [bool; 256]) -> group {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Boolean
- - value: "256"
const_: false
output: Group
core_mapping: ~
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let digest: group = 0group;\\\"}\"}"
type_: Group
value:
Value:
Group:
Single: "0"
- Iteration:
variable: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" for i in 0..256 {\\\"}\"}"
start:
Value:
Implicit: "0"
stop:
Value:
Implicit: "256"
inclusive: false
block:
statements:
- Conditional:
condition:
Access:
Array:
array:
Identifier: "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if bits[i] {\\\"}\"}"
index:
Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" if bits[i] {\\\"}\"}"
block:
statements:
- Assign:
operation: Add
assignee:
identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":17,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" digest += self.parameters[i];\\\"}\"}"
accesses: []
value:
Access:
Array:
array:
Access:
Member:
inner:
Identifier: "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":27,\\\"col_stop\\\":31,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" digest += self.parameters[i];\\\"}\"}"
name: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":32,\\\"col_stop\\\":42,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" digest += self.parameters[i];\\\"}\"}"
type_: ~
index:
Identifier: "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":43,\\\"col_stop\\\":44,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" digest += self.parameters[i];\\\"}\"}"
next: ~
- Return:
expression:
Identifier: "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return digest;\\\"}\"}"
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {\\\"}\"}":
annotations: {}
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":15,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- Boolean
- - value: "256"
- Variable:
identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":46,\\\"col_stop\\\":56,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {\\\"}\"}"
const_: true
mutable: false
type_:
Array:
- Group
- - value: "256"
const_: false
output: Group
core_mapping: ~
block:
statements:
- Definition:
declaration_type: Const
variable_names:
- mutable: false
identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}"
type_: ~
value:
Call:
function:
Access:
Static:
inner:
Identifier: "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":22,\\\"col_stop\\\":34,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}"
name: "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":36,\\\"col_stop\\\":39,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}"
type_: ~
arguments:
- Identifier: "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":40,\\\"col_stop\\\":50,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}"
- Return:
expression:
Call:
function:
Access:
Member:
inner:
Identifier: "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":12,\\\"col_stop\\\":20,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return pedersen.hash(hash_input);\\\"}\"}"
name: "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":21,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return pedersen.hash(hash_input);\\\"}\"}"
type_: ~
arguments:
- Identifier: "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":26,\\\"col_stop\\\":36,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return pedersen.hash(hash_input);\\\"}\"}"

View File

@ -0,0 +1,528 @@
---
namespace: Serialize
expectation: Pass
outputs:
- name: ""
expected_input: []
import_statements:
- package_or_packages:
Package:
name: "{\"name\":\"lib\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import lib.SillySudoku;\\\"}\"}"
access:
Symbol:
symbol: "{\"name\":\"SillySudoku\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":23,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"import lib.SillySudoku;\\\"}\"}"
alias: ~
imports: {}
aliases: {}
circuits: {}
global_consts: {}
functions:
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}":
annotations: {}
identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
- Variable:
identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":37,\\\"col_stop\\\":43,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
const_: false
output: Boolean
core_mapping: ~
block:
statements:
- Console:
function:
Log:
string:
- Scalar: 83
- Scalar: 116
- Scalar: 97
- Scalar: 114
- Scalar: 116
- Scalar: 105
- Scalar: 110
- Scalar: 103
- Scalar: 32
- Scalar: 83
- Scalar: 117
- Scalar: 100
- Scalar: 111
- Scalar: 107
- Scalar: 117
- Scalar: 32
- Scalar: 115
- Scalar: 111
- Scalar: 108
- Scalar: 118
- Scalar: 101
- Scalar: 114
- Scalar: 46
- Scalar: 46
- Scalar: 46
parameters: []
- Console:
function:
Log:
string:
- Scalar: 123
- Scalar: 125
parameters:
- Identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", puzzle);\\\"}\"}"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"sudoku\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
type_: ~
value:
CircuitInit:
name: "{\"name\":\"SillySudoku\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":18,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
members:
- identifier: "{\"name\":\"puzzle_grid\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":32,\\\"col_stop\\\":43,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
expression:
Identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":45,\\\"col_stop\\\":51,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
- Console:
function:
Log:
string:
- Scalar: 67
- Scalar: 104
- Scalar: 101
- Scalar: 99
- Scalar: 107
- Scalar: 105
- Scalar: 110
- Scalar: 103
- Scalar: 32
- Scalar: 83
- Scalar: 117
- Scalar: 100
- Scalar: 111
- Scalar: 107
- Scalar: 117
- Scalar: 32
- Scalar: 97
- Scalar: 110
- Scalar: 115
- Scalar: 119
- Scalar: 101
- Scalar: 114
- Scalar: 46
- Scalar: 46
- Scalar: 46
parameters: []
- Console:
function:
Log:
string:
- Scalar: 123
- Scalar: 125
parameters:
- Identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", answer);\\\"}\"}"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}"
type_: ~
value:
Call:
function:
Access:
Member:
inner:
Identifier: "{\"name\":\"sudoku\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":18,\\\"col_stop\\\":24,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}"
name: "{\"name\":\"solve\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":25,\\\"col_stop\\\":30,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}"
type_: ~
arguments:
- Identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}"
- Console:
function:
Log:
string:
- Scalar: 84
- Scalar: 104
- Scalar: 101
- Scalar: 32
- Scalar: 97
- Scalar: 110
- Scalar: 115
- Scalar: 119
- Scalar: 101
- Scalar: 114
- Scalar: 32
- Scalar: 105
- Scalar: 115
- Scalar: 32
- Scalar: 123
- Scalar: 125
- Scalar: 46
parameters:
- Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":38,\\\"col_stop\\\":44,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"The answer is {}.\\\\\\\", result);\\\"}\"}"
- Return:
expression:
Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" return result;\\\"}\"}"
"{\"name\":\"test_solve_pass\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_solve_pass() {\\\"}\"}":
annotations:
test:
arguments: []
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test\\\"}\"}"
identifier: "{\"name\":\"test_solve_pass\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_solve_pass() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let puzzle: [u8; (3, 3)] = [[0, 2, 0],\\\"}\"}"
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "2"
- Expression:
Value:
Implicit: "0"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "6"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "8"
- Expression:
Value:
Implicit: "9"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":31,\\\"line_stop\\\":31,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let answer: [u8; (3, 3)] = [[1, 2, 3],\\\"}\"}"
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "1"
- Expression:
Value:
Implicit: "2"
- Expression:
Value:
Implicit: "3"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "4"
- Expression:
Value:
Implicit: "5"
- Expression:
Value:
Implicit: "6"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "7"
- Expression:
Value:
Implicit: "8"
- Expression:
Value:
Implicit: "9"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
- Identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":36,\\\"line_stop\\\":36,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
- Console:
function:
Assert:
Binary:
left:
Value:
Boolean: "true"
right:
Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":39,\\\"line_stop\\\":39,\\\"col_start\\\":28,\\\"col_stop\\\":34,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(true == result);\\\"}\"}"
op: Eq
"{\"name\":\"test_solve_fail\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_solve_fail() {\\\"}\"}":
annotations:
test:
arguments: []
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test\\\"}\"}"
identifier: "{\"name\":\"test_solve_fail\",\"span\":\"{\\\"line_start\\\":44,\\\"line_stop\\\":44,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_solve_fail() {\\\"}\"}"
input: []
const_: false
output: ~
core_mapping: ~
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":45,\\\"line_stop\\\":45,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let puzzle: [u8; (3, 3)] = [[0, 2, 0],\\\"}\"}"
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "2"
- Expression:
Value:
Implicit: "0"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "6"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "0"
- Expression:
Value:
Implicit: "8"
- Expression:
Value:
Implicit: "0"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":49,\\\"line_stop\\\":49,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let answer: [u8; (3, 3)] = [[1, 2, 3],\\\"}\"}"
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
value:
ArrayInline:
elements:
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "1"
- Expression:
Value:
Implicit: "2"
- Expression:
Value:
Implicit: "3"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "4"
- Expression:
Value:
Implicit: "5"
- Expression:
Value:
Implicit: "6"
- Expression:
ArrayInline:
elements:
- Expression:
Value:
Implicit: "7"
- Expression:
Value:
Implicit: "8"
- Expression:
Value:
Implicit: "8"
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
- Identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
- Console:
function:
Assert:
Binary:
left:
Value:
Boolean: "false"
right:
Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":29,\\\"col_stop\\\":35,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(false == result);\\\"}\"}"
op: Eq
"{\"name\":\"test_solve_with_input\",\"span\":\"{\\\"line_start\\\":62,\\\"line_stop\\\":62,\\\"col_start\\\":10,\\\"col_stop\\\":31,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_solve_with_input(\\\"}\"}":
annotations:
test:
arguments:
- test_input
name: "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"@test(test_input)\\\"}\"}"
identifier: "{\"name\":\"test_solve_with_input\",\"span\":\"{\\\"line_start\\\":62,\\\"line_stop\\\":62,\\\"col_start\\\":10,\\\"col_stop\\\":31,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function test_solve_with_input(\\\"}\"}"
input:
- Variable:
identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" puzzle: [u8; (3, 3)],\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
- Variable:
identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":64,\\\"line_stop\\\":64,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" answer: [u8; (3, 3)],\\\"}\"}"
const_: false
mutable: true
type_:
Array:
- IntegerType: U8
- - value: "3"
- value: "3"
- Variable:
identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":65,\\\"line_stop\\\":65,\\\"col_start\\\":5,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" expected: bool\\\"}\"}"
const_: false
mutable: true
type_: Boolean
const_: false
output: ~
core_mapping: ~
block:
statements:
- Definition:
declaration_type: Let
variable_names:
- mutable: true
identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
type_: ~
value:
Call:
function:
Identifier: "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
arguments:
- Identifier: "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
- Identifier: "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
- Console:
function:
Log:
string:
- Scalar: 101
- Scalar: 120
- Scalar: 112
- Scalar: 101
- Scalar: 99
- Scalar: 116
- Scalar: 101
- Scalar: 100
- Scalar: 32
- Scalar: 123
- Scalar: 125
- Scalar: 44
- Scalar: 32
- Scalar: 103
- Scalar: 111
- Scalar: 116
- Scalar: 32
- Scalar: 123
- Scalar: 125
parameters:
- Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":40,\\\"col_stop\\\":48,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"expected {}, got {}\\\\\\\", expected, result);\\\"}\"}"
- Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":50,\\\"col_stop\\\":56,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.log(\\\\\\\"expected {}, got {}\\\\\\\", expected, result);\\\"}\"}"
- Console:
function:
Assert:
Binary:
left:
Identifier: "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":72,\\\"line_stop\\\":72,\\\"col_start\\\":20,\\\"col_stop\\\":28,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(expected == result);\\\"}\"}"
right:
Identifier: "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":72,\\\"line_stop\\\":72,\\\"col_start\\\":32,\\\"col_stop\\\":38,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\" console.assert(expected == result);\\\"}\"}"
op: Eq

View File

@ -24,15 +24,15 @@ outputs:
span:
line_start: 1
line_stop: 1
col_start: 15
col_stop: 22
col_start: 14
col_stop: 23
path: ""
content: "console.error(\"{}\", x);"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 22
col_stop: 23
path: ""
content: "console.error(\"{}\", x);"
- Console:
@ -49,15 +49,15 @@ outputs:
span:
line_start: 1
line_stop: 1
col_start: 15
col_stop: 27
col_start: 14
col_stop: 28
path: ""
content: "console.error(\"{}{}\", x, y);"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 27
col_stop: 28
path: ""
content: "console.error(\"{}{}\", x, y);"
- Console:
@ -69,15 +69,15 @@ outputs:
span:
line_start: 1
line_stop: 1
col_start: 15
col_stop: 18
col_start: 14
col_stop: 19
path: ""
content: "console.error(\"x\");"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 18
col_stop: 19
path: ""
content: "console.error(\"x\");"
- Console:
@ -91,15 +91,15 @@ outputs:
span:
line_start: 1
line_stop: 1
col_start: 13
col_stop: 20
col_start: 12
col_stop: 21
path: ""
content: "console.log(\"{}\", x);"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 20
col_stop: 21
path: ""
content: "console.log(\"{}\", x);"
- Console:
@ -116,15 +116,15 @@ outputs:
span:
line_start: 1
line_stop: 1
col_start: 13
col_stop: 25
col_start: 12
col_stop: 26
path: ""
content: "console.log(\"{}{}\", x, y);"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 25
col_stop: 26
path: ""
content: "console.log(\"{}{}\", x, y);"
- Console:
@ -136,14 +136,14 @@ outputs:
span:
line_start: 1
line_stop: 1
col_start: 13
col_stop: 16
col_start: 12
col_stop: 17
path: ""
content: "console.log(\"x\");"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 16
col_stop: 17
path: ""
content: "console.log(\"x\");"

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:4:5\n |\n 4 | let mut x = 0;\n | ^^^^^^^\nError [EPAR0370015]: let mut = ... is deprecated. `let` keyword implies mutabality by default.\n --> test:5:5\n |\n 5 | let mut y = 0; // recovery witness\n | ^^^^^^^"

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370005]: expected { -- got 'circuit'\n --> test:4:1\n |\n 4 | circuit ;\n | ^^^^^^^"

View File

@ -0,0 +1,5 @@
---
namespace: Parse
expectation: Fail
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 | ^"

View File

@ -0,0 +1,23 @@
/*
namespace: Parse
expectation: Pass
*/
circuit X {
x: u32
const function x() {
return ();
}
const function x(self) {
return ();
}
const function c(const self) {
return ();
}
const function b(const self, x: u32) {
return ();
}
const function b(const self, const x: u32) {
return ();
}
}

View File

@ -0,0 +1,9 @@
/*
namespace: Parse
expectation: Pass
*/
circuit X {
static const x: u32 = 2;
static const y: u32 = 5;
}

View File

@ -4,6 +4,7 @@ expectation: Pass
*/
circuit X {
static const a: u8 = 10;
x: u32,
y: u32
function x() {

View File

@ -11,4 +11,5 @@ circuit X {
circuit X {
x: u32,
y: u32;
}
, // recovery witness
}

View File

@ -10,4 +10,7 @@ circuit X {
function y() {
return ();
}
}
const function z() {
return ();
}
}

View File

@ -0,0 +1,19 @@
/*
namespace: Parse
expectation: Fail
*/
circuit A {
function a() {}
const function z() {}
foo: u8,
static const BAR: u8 = 0u8;
}
circuit B {
foo: u8,
static const BAR: u8 = 0u8;
}

View File

@ -1,6 +1,6 @@
/*
namespace: Parse
expectation: Pass
expectation: Fail
*/
circuit X {

View File

@ -0,0 +1,10 @@
/*
namespace: Parse
expectation: Pass
*/
circuit X {
function x(&self) {
return ();
}
}

View File

@ -0,0 +1,9 @@
/*
namespace: Parse
expectation: Fail
*/
struct A {}
circuit B {}
class C {}
circuit D {}

View File

@ -11,6 +11,8 @@ expectation: Pass
[0; (1, 2)]
[0; (1, 2,)]
[0; (1, 2, 3)]
[[[0; 3]; 2]; 1]
[[[0; 3]; 2]; 1]

View File

@ -7,3 +7,5 @@ expectation: Fail
[...0u8; 1]
[...0; 1]
[0; ()]

View File

@ -0,0 +1,51 @@
/*
namespace: ParseExpression
expectation: Pass
*/
// address
aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8.call()
address::call()
// bool
true.call()
bool::call()
// char
'a'.call()
char::call()
// field
1field.call()
field::call()
//group
0group.call()
(0, 1)group.call()
group::call()
// ints
1i8.call()
1i16.call()
1i32.call()
1i64.call()
1i128.call()
i8::call()
i16::call()
i32::call()
i64::call()
i128::call()
// uints
1u8.call()
1u16.call()
1u32.call()
1u64.call()
1u128.call()
u8::call()
u16::call()
u32::call()
u64::call()
u128::call()

View File

@ -3,8 +3,6 @@ namespace: ParseExpression
expectation: Fail
*/
group
()group
(123)group

View File

@ -4,6 +4,21 @@ expectation: Pass
*/
@test
function x() {
function a() {
return ();
}
}
@test(test)
function b() {
return ();
}
@test(test,)
function c() {
return ();
}
@test()
function d() {
return ();
}

View File

@ -0,0 +1,14 @@
/*
namespace: Parse
expectation: Fail
*/
@foo(?, bar, ?)
function x() {
return ();
}
@context // recovery witness
function x() {
return ();
}

View File

@ -0,0 +1,14 @@
/*
namespace: Parse
expectation: Fail
*/
@context
function f() {
return ();
}
@context // recovery witness
function g() {
return ();
}

View File

@ -1,9 +0,0 @@
/*
namespace: Parse
expectation: Fail
*/
@test(test,)
function x() {
return ();
}

View File

@ -0,0 +1,15 @@
/*
namespace: Parse
expectation: Pass
*/
function x(const y: u32) {
if y < 5u32 {
x(y+1);
}
}
function main(y: bool) -> bool {
x(1u32);
return y;
}

View File

@ -0,0 +1,15 @@
/*
namespace: Parse
expectation: Pass
*/
function x(const y: u32) {
if y < 999u32 {
x(y+1);
}
}
function main(y: bool) -> bool {
x(1u32);
return y;
}

View File

@ -0,0 +1,8 @@
/*
namespace: Parse
expectation: Pass
*/
const function x() {
return ();
}

View File

@ -0,0 +1,13 @@
/*
namespace: Parse
expectation: Pass
*/
function inf() {
inf();
}
function main(y: bool) -> bool {
inf();
return y;
}

View File

@ -3,4 +3,6 @@ namespace: Parse
expectation: Fail
*/
import a.();
import a.();
import a.();

View File

@ -0,0 +1,8 @@
/*
namespace: Parse
expectation: Fail
*/
import AB.c;
import AB.c;

View File

@ -0,0 +1,8 @@
/*
namespace: Parse
expectation: Fail
*/
import function.a;
import import.a;

View File

@ -0,0 +1,70 @@
/*
namespace: Serialize
expectation: Pass
*/
circuit Point {
x: i32,
y: i32,
function new(x: i32, y: i32) -> Self {
return Self { x, y };
}
}
circuit LinearRegression {
points: [Point; 5],
// Instantiates a linear regression circuit.
function new(points: [Point; 5]) -> Self {
return Self { points };
}
// Return the slope of the linear regression.
function slope(self) -> i32 {
let num_points = 5i32;
// Calculate the sums.
let x_sum = 0i32;
let y_sum = 0i32;
let xy_sum = 0i32;
let x2_sum = 0i32;
for i in 0..5 {
x_sum += self.points[i].x;
y_sum += self.points[i].y;
xy_sum += self.points[i].x * self.points[i].y;
x2_sum += self.points[i].x * self.points[i].x;
}
let numerator = (num_points * xy_sum) - (x_sum * y_sum);
let denominator = (num_points * x2_sum) - (x_sum * x_sum);
let slope = numerator / denominator;
return slope;
}
// Return the offset of the linear regression.
function offset(self, slope: i32) -> i32 {
let num_points = 5i32;
// Calculate the sum.
let x_sum = 0i32;
let y_sum = 0i32;
for i in 0..5 {
x_sum += self.points[i].x;
y_sum += self.points[i].y;
}
return (y_sum - slope * x_sum) / num_points;
}
}
function main (x: i32, y: i32) -> [i32; 2] {
let points: [Point; 5] = [
Point{x: x + 1, y: y + 1},
Point{x: x + 2, y: y + 2},
Point{x: x + 3, y: y + 3},
Point{x: x + 4, y: y + 4},
Point{x: x + 5, y: y + 5}
];
let reg = LinearRegression::new(points);
let slope = reg.slope();
let offset = reg.offset(slope);
return [slope, offset];
}

View File

@ -0,0 +1,8 @@
/*
namespace: Serialize
expectation: Pass
*/
function main() -> u8 {
return 1u8 + 1u8;
}

View File

@ -0,0 +1,64 @@
/*
namespace: Serialize
expectation: Pass
*/
// This Program takes in any 20-byte low register string and tells
// whether a string is a palindrome ignoring any spaces.
function main(str: [char; 20]) -> bool {
return is_palindrome(str);
}
function is_palindrome(str: [char; 20]) -> bool {
const str_len = 20u32; // saving const for convenience
// By default we assume that input is a palindrome.
let result = true;
let processed = 0u8;
for start in 0..(str_len / 2) {
let start_sym = str[start];
if start_sym != ' ' {
let skipped = 0u8;
let end_empty = 0u8;
let end_sym = ' ';
for end in (str_len - 1)..start {
if str[end] != ' ' && skipped == processed && end_sym == ' ' {
end_sym = str[end];
} else {
end_empty = end_empty + 1;
if str[end] != ' ' {
skipped = skipped + 1;
}
}
}
// If there are symbols left to the right from the start.
if end_sym != ' ' {
console.log("Comparing: {} ? {}", start_sym, end_sym);
if result {
result = (start_sym == end_sym);
}
processed = processed + 1;
}
}
}
console.log("Result is: {}", result);
return result;
}
@test
function test_is_palindrome() {
console.assert(is_palindrome("a b a "));
console.assert(is_palindrome("😀😀😀😀😀 😀😀😀😀😀"));
console.assert(is_palindrome("borrow or rob "));
console.assert(is_palindrome("bbbb aaaa aaaa bbbb"));
console.assert(is_palindrome("aaaaaaaaaaaaaaaaaaaa"));
console.assert(is_palindrome("taco cat "));
}

View File

@ -0,0 +1,6 @@
/*
namespace: Serialize
expectation: Fail
*/
invalid

View File

@ -0,0 +1,30 @@
/*
namespace: Serialize
expectation: Pass
*/
circuit PedersenHash {
parameters: [group; 256];
// Instantiates a Pedersen hash circuit
function new(parameters: [group; 256]) -> Self {
return Self { parameters: parameters };
}
function hash(self, bits: [bool; 256]) -> group {
let digest: group = 0group;
for i in 0..256 {
if bits[i] {
digest += self.parameters[i];
}
}
return digest;
}
}
// The 'pedersen-hash' main function.
function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {
const pedersen = PedersenHash::new(parameters);
return pedersen.hash(hash_input);
}

View File

@ -0,0 +1,76 @@
/*
namespace: Serialize
expectation: Pass
*/
import lib.SillySudoku;
// The `silly-sudoku` main function
function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {
console.log("Starting Sudoku solver...");
console.log("{}", puzzle);
// Instantiate the Sudoku puzzle.
let sudoku = SillySudoku { puzzle_grid: puzzle };
console.log("Checking Sudoku answer...");
console.log("{}", answer);
// Evaluate the Sudoku puzzle with the given answer.
let result = sudoku.solve(answer);
console.log("The answer is {}.", result);
return result;
}
// Tests that the `silly-sudoku` circuit outputs true on a correct answer.
@test
function test_solve_pass() {
let puzzle: [u8; (3, 3)] = [[0, 2, 0],
[0, 0, 6],
[0, 8, 9]];
let answer: [u8; (3, 3)] = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]];
// Runs the Sudoku checker.
let result = main(puzzle, answer);
// Expects the result to be true.
console.assert(true == result);
}
// Tests that the `silly-sudoku` circuit outputs false on an incorrect answer.
@test
function test_solve_fail() {
let puzzle: [u8; (3, 3)] = [[0, 2, 0],
[0, 0, 6],
[0, 8, 0]];
let answer: [u8; (3, 3)] = [[1, 2, 3],
[4, 5, 6],
[7, 8, 8]]; // We have an extra `8` in this column!
// Runs the Sudoku checker.
let result = main(puzzle, answer);
// Expects the result to be false.
console.assert(false == result);
}
// Test that the `silly-sudoku` circuit outputs the expected value on a custom test input.
@test(test_input)
function test_solve_with_input(
puzzle: [u8; (3, 3)],
answer: [u8; (3, 3)],
expected: bool
) {
// Runs the Sudoku checker.
let result = main(puzzle, answer);
console.log("expected {}, got {}", expected, result);
console.assert(expected == result);
}

View File

@ -51,4 +51,4 @@ let (x,y,,) = ();
let (,x,y) = ();
let (x,,y) = ();
let (x,,y) = ();

View File

@ -0,0 +1,9 @@
/*
namespace: Parse
expectation: Fail
*/
function foo() {
let mut x = 0;
let mut y = 0; // recovery witness
}

View File

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