mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-18 23:02:35 +03:00
fixes and correct tests
This commit is contained in:
parent
f6aa32da35
commit
80d97416cb
@ -17,6 +17,7 @@
|
||||
use super::*;
|
||||
|
||||
use leo_errors::{ParserError, Result};
|
||||
use leo_span::sym;
|
||||
|
||||
impl ParserContext<'_> {
|
||||
/// Returns a [`ParsedInputFile`] struct filled with the data acquired in the file.
|
||||
@ -49,10 +50,10 @@ impl ParserContext<'_> {
|
||||
let mut definitions = Vec::new();
|
||||
|
||||
while let Some(SpannedToken {
|
||||
token: Token::Ident(_), ..
|
||||
token: Token::Const | Token::Private | Token::Public | Token::Ident(_), ..
|
||||
}) = self.peek_option()
|
||||
{
|
||||
definitions.push(self.parse_input_definition()?);
|
||||
definitions.push(self.parse_input_definition(section.name == sym::main)?);
|
||||
}
|
||||
|
||||
Ok(Section {
|
||||
@ -65,15 +66,16 @@ impl ParserContext<'_> {
|
||||
/// Parses a single parameter definition:
|
||||
/// `<identifier> : <type> = <expression>;`
|
||||
/// Returns [`Definition`].
|
||||
pub fn parse_input_definition(&mut self) -> Result<Definition> {
|
||||
pub fn parse_input_definition(&mut self, is_main: bool) -> Result<Definition> {
|
||||
let const_ = self.eat(Token::Const).is_some();
|
||||
let private = self.eat(Token::Private).is_some();
|
||||
let public = self.eat(Token::Public).is_some();
|
||||
|
||||
match (const_, private, public) {
|
||||
(true, false, false) | (false, true, false) | (false, false, true) => {}
|
||||
(false, false, false) => return Err(ParserError::inputs_no_variable_type_specified().into()),
|
||||
_ => return Err(ParserError::inputs_multpe_variable_types_specified().into()),
|
||||
(true, false, false) | (false, true, false) | (false, false, true) if is_main => {}
|
||||
(false, false, false) if is_main => return Err(ParserError::inputs_no_variable_type_specified().into()),
|
||||
_ if is_main => return Err(ParserError::inputs_multpe_variable_types_specified().into()),
|
||||
_ => {}
|
||||
}
|
||||
|
||||
let name = self.expect_ident()?;
|
||||
|
@ -11,6 +11,8 @@ outputs:
|
||||
- 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
|
||||
private: false
|
||||
public: false
|
||||
mutable: false
|
||||
type_:
|
||||
IntegerType: U32
|
||||
@ -130,6 +132,8 @@ outputs:
|
||||
- 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
|
||||
private: false
|
||||
public: false
|
||||
mutable: true
|
||||
type_: Boolean
|
||||
span:
|
||||
|
@ -11,6 +11,8 @@ outputs:
|
||||
- Variable:
|
||||
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}"
|
||||
const_: false
|
||||
private: false
|
||||
public: false
|
||||
mutable: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
@ -24,6 +26,8 @@ outputs:
|
||||
- Variable:
|
||||
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, const y: i32) {\\\"}\"}"
|
||||
const_: true
|
||||
private: false
|
||||
public: false
|
||||
mutable: false
|
||||
type_:
|
||||
IntegerType: I32
|
||||
@ -78,6 +82,8 @@ outputs:
|
||||
- Variable:
|
||||
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":18,\\\"col_stop\\\":19,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}"
|
||||
const_: true
|
||||
private: false
|
||||
public: false
|
||||
mutable: false
|
||||
type_:
|
||||
IntegerType: U32
|
||||
@ -91,6 +97,8 @@ outputs:
|
||||
- Variable:
|
||||
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":26,\\\"col_stop\\\":27,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(const x: u32, y: i32) {\\\"}\"}"
|
||||
const_: false
|
||||
private: false
|
||||
public: false
|
||||
mutable: true
|
||||
type_:
|
||||
IntegerType: I32
|
||||
|
@ -53,6 +53,8 @@ outputs:
|
||||
- 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
|
||||
private: false
|
||||
public: false
|
||||
mutable: true
|
||||
type_: Boolean
|
||||
span:
|
||||
|
@ -11,6 +11,8 @@ outputs:
|
||||
- Variable:
|
||||
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}"
|
||||
const_: false
|
||||
private: false
|
||||
public: false
|
||||
mutable: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
@ -24,6 +26,8 @@ outputs:
|
||||
- Variable:
|
||||
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) {\\\"}\"}"
|
||||
const_: false
|
||||
private: false
|
||||
public: false
|
||||
mutable: true
|
||||
type_:
|
||||
IntegerType: I32
|
||||
|
@ -11,6 +11,8 @@ outputs:
|
||||
- Variable:
|
||||
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":12,\\\"col_stop\\\":13,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}"
|
||||
const_: false
|
||||
private: false
|
||||
public: false
|
||||
mutable: true
|
||||
type_:
|
||||
IntegerType: U32
|
||||
@ -24,6 +26,8 @@ outputs:
|
||||
- Variable:
|
||||
identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":3,\\\"line_stop\\\":3,\\\"col_start\\\":20,\\\"col_stop\\\":21,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"function x(x: u32, y: i32) -> u32 {\\\"}\"}"
|
||||
const_: false
|
||||
private: false
|
||||
public: false
|
||||
mutable: true
|
||||
type_:
|
||||
IntegerType: I32
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Input
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- "Error [EPAR0370000]: c0\n --> test:4:1\n |\n 4 | c0: bool = true; \n | ^^"
|
@ -0,0 +1,295 @@
|
||||
---
|
||||
namespace: Input
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- sections:
|
||||
- name: main
|
||||
definitions:
|
||||
- const_: true
|
||||
private: false
|
||||
public: false
|
||||
type_: Boolean
|
||||
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const a: bool = true; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Boolean:
|
||||
- "true"
|
||||
- span:
|
||||
line_start: 4
|
||||
line_stop: 4
|
||||
col_start: 18
|
||||
col_stop: 22
|
||||
path: ""
|
||||
content: "const a: bool = true; "
|
||||
span:
|
||||
line_start: 4
|
||||
line_stop: 4
|
||||
col_start: 10
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: "const a: bool = true; "
|
||||
- const_: true
|
||||
private: false
|
||||
public: false
|
||||
type_:
|
||||
IntegerType: U8
|
||||
name: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const b: u8 = 2; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Implicit:
|
||||
- "2"
|
||||
- span:
|
||||
line_start: 5
|
||||
line_stop: 5
|
||||
col_start: 18
|
||||
col_stop: 19
|
||||
path: ""
|
||||
content: "const b: u8 = 2; "
|
||||
span:
|
||||
line_start: 5
|
||||
line_stop: 5
|
||||
col_start: 10
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "const b: u8 = 2; "
|
||||
- const_: true
|
||||
private: false
|
||||
public: false
|
||||
type_: Field
|
||||
name: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const c: field = 0; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Implicit:
|
||||
- "0"
|
||||
- span:
|
||||
line_start: 6
|
||||
line_stop: 6
|
||||
col_start: 18
|
||||
col_stop: 19
|
||||
path: ""
|
||||
content: "const c: field = 0; "
|
||||
span:
|
||||
line_start: 6
|
||||
line_stop: 6
|
||||
col_start: 10
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: "const c: field = 0; "
|
||||
- const_: true
|
||||
private: false
|
||||
public: false
|
||||
type_: Group
|
||||
name: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const d: group = (0, 1)group; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Group:
|
||||
Tuple:
|
||||
x:
|
||||
Number:
|
||||
- "0"
|
||||
- span:
|
||||
line_start: 7
|
||||
line_stop: 7
|
||||
col_start: 19
|
||||
col_stop: 20
|
||||
path: ""
|
||||
content: "const d: group = (0, 1)group; "
|
||||
y:
|
||||
Number:
|
||||
- "1"
|
||||
- span:
|
||||
line_start: 7
|
||||
line_stop: 7
|
||||
col_start: 22
|
||||
col_stop: 23
|
||||
path: ""
|
||||
content: "const d: group = (0, 1)group; "
|
||||
span:
|
||||
line_start: 7
|
||||
line_stop: 7
|
||||
col_start: 19
|
||||
col_stop: 29
|
||||
path: ""
|
||||
content: "const d: group = (0, 1)group; "
|
||||
span:
|
||||
line_start: 7
|
||||
line_stop: 7
|
||||
col_start: 10
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: "const d: group = (0, 1)group; "
|
||||
- const_: true
|
||||
private: false
|
||||
public: false
|
||||
type_: Address
|
||||
name: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"const e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Address:
|
||||
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
|
||||
- span:
|
||||
line_start: 8
|
||||
line_stop: 8
|
||||
col_start: 20
|
||||
col_stop: 83
|
||||
path: ""
|
||||
content: "const e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
span:
|
||||
line_start: 8
|
||||
line_stop: 8
|
||||
col_start: 10
|
||||
col_stop: 17
|
||||
path: ""
|
||||
content: "const e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
span:
|
||||
line_start: 3
|
||||
line_stop: 3
|
||||
col_start: 2
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: "[main]"
|
||||
- name: registers
|
||||
definitions:
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_: Boolean
|
||||
name: "{\"name\":\"r0\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r0: bool = true; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Boolean:
|
||||
- "true"
|
||||
- span:
|
||||
line_start: 11
|
||||
line_stop: 11
|
||||
col_start: 13
|
||||
col_stop: 17
|
||||
path: ""
|
||||
content: "r0: bool = true; "
|
||||
span:
|
||||
line_start: 11
|
||||
line_stop: 11
|
||||
col_start: 5
|
||||
col_stop: 9
|
||||
path: ""
|
||||
content: "r0: bool = true; "
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_:
|
||||
IntegerType: U8
|
||||
name: "{\"name\":\"r1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r1: u8 = 2; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Implicit:
|
||||
- "2"
|
||||
- span:
|
||||
line_start: 12
|
||||
line_stop: 12
|
||||
col_start: 13
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: "r1: u8 = 2; "
|
||||
span:
|
||||
line_start: 12
|
||||
line_stop: 12
|
||||
col_start: 5
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "r1: u8 = 2; "
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_: Field
|
||||
name: "{\"name\":\"r2\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r2: field = 0; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Implicit:
|
||||
- "0"
|
||||
- span:
|
||||
line_start: 13
|
||||
line_stop: 13
|
||||
col_start: 13
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: "r2: field = 0; "
|
||||
span:
|
||||
line_start: 13
|
||||
line_stop: 13
|
||||
col_start: 5
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "r2: field = 0; "
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_: Group
|
||||
name: "{\"name\":\"r3\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r3: group = (0, 1)group; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Group:
|
||||
Tuple:
|
||||
x:
|
||||
Number:
|
||||
- "0"
|
||||
- span:
|
||||
line_start: 14
|
||||
line_stop: 14
|
||||
col_start: 14
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: "r3: group = (0, 1)group; "
|
||||
y:
|
||||
Number:
|
||||
- "1"
|
||||
- span:
|
||||
line_start: 14
|
||||
line_stop: 14
|
||||
col_start: 17
|
||||
col_stop: 18
|
||||
path: ""
|
||||
content: "r3: group = (0, 1)group; "
|
||||
span:
|
||||
line_start: 14
|
||||
line_stop: 14
|
||||
col_start: 14
|
||||
col_stop: 24
|
||||
path: ""
|
||||
content: "r3: group = (0, 1)group; "
|
||||
span:
|
||||
line_start: 14
|
||||
line_stop: 14
|
||||
col_start: 5
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "r3: group = (0, 1)group; "
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_: Address
|
||||
name: "{\"name\":\"r4\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Address:
|
||||
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
|
||||
- span:
|
||||
line_start: 15
|
||||
line_stop: 15
|
||||
col_start: 15
|
||||
col_stop: 78
|
||||
path: ""
|
||||
content: "r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
span:
|
||||
line_start: 15
|
||||
line_stop: 15
|
||||
col_start: 5
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
span:
|
||||
line_start: 10
|
||||
line_stop: 10
|
||||
col_start: 2
|
||||
col_stop: 11
|
||||
path: ""
|
||||
content: "[registers]"
|
@ -0,0 +1,295 @@
|
||||
---
|
||||
namespace: Input
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- sections:
|
||||
- name: main
|
||||
definitions:
|
||||
- const_: false
|
||||
private: false
|
||||
public: true
|
||||
type_: Boolean
|
||||
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"public a: bool = true; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Boolean:
|
||||
- "true"
|
||||
- span:
|
||||
line_start: 4
|
||||
line_stop: 4
|
||||
col_start: 19
|
||||
col_stop: 23
|
||||
path: ""
|
||||
content: "public a: bool = true; "
|
||||
span:
|
||||
line_start: 4
|
||||
line_stop: 4
|
||||
col_start: 11
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: "public a: bool = true; "
|
||||
- const_: false
|
||||
private: false
|
||||
public: true
|
||||
type_:
|
||||
IntegerType: U8
|
||||
name: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"public b: u8 = 2; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Implicit:
|
||||
- "2"
|
||||
- span:
|
||||
line_start: 5
|
||||
line_stop: 5
|
||||
col_start: 19
|
||||
col_stop: 20
|
||||
path: ""
|
||||
content: "public b: u8 = 2; "
|
||||
span:
|
||||
line_start: 5
|
||||
line_stop: 5
|
||||
col_start: 11
|
||||
col_stop: 13
|
||||
path: ""
|
||||
content: "public b: u8 = 2; "
|
||||
- const_: false
|
||||
private: false
|
||||
public: true
|
||||
type_: Field
|
||||
name: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"public c: field = 0; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Implicit:
|
||||
- "0"
|
||||
- span:
|
||||
line_start: 6
|
||||
line_stop: 6
|
||||
col_start: 19
|
||||
col_stop: 20
|
||||
path: ""
|
||||
content: "public c: field = 0; "
|
||||
span:
|
||||
line_start: 6
|
||||
line_stop: 6
|
||||
col_start: 11
|
||||
col_stop: 16
|
||||
path: ""
|
||||
content: "public c: field = 0; "
|
||||
- const_: false
|
||||
private: false
|
||||
public: true
|
||||
type_: Group
|
||||
name: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"public d: group = (0, 1)group; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Group:
|
||||
Tuple:
|
||||
x:
|
||||
Number:
|
||||
- "0"
|
||||
- span:
|
||||
line_start: 7
|
||||
line_stop: 7
|
||||
col_start: 20
|
||||
col_stop: 21
|
||||
path: ""
|
||||
content: "public d: group = (0, 1)group; "
|
||||
y:
|
||||
Number:
|
||||
- "1"
|
||||
- span:
|
||||
line_start: 7
|
||||
line_stop: 7
|
||||
col_start: 23
|
||||
col_stop: 24
|
||||
path: ""
|
||||
content: "public d: group = (0, 1)group; "
|
||||
span:
|
||||
line_start: 7
|
||||
line_stop: 7
|
||||
col_start: 20
|
||||
col_stop: 30
|
||||
path: ""
|
||||
content: "public d: group = (0, 1)group; "
|
||||
span:
|
||||
line_start: 7
|
||||
line_stop: 7
|
||||
col_start: 11
|
||||
col_stop: 16
|
||||
path: ""
|
||||
content: "public d: group = (0, 1)group; "
|
||||
- const_: false
|
||||
private: false
|
||||
public: true
|
||||
type_: Address
|
||||
name: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"public e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Address:
|
||||
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
|
||||
- span:
|
||||
line_start: 8
|
||||
line_stop: 8
|
||||
col_start: 21
|
||||
col_stop: 84
|
||||
path: ""
|
||||
content: "public e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
span:
|
||||
line_start: 8
|
||||
line_stop: 8
|
||||
col_start: 11
|
||||
col_stop: 18
|
||||
path: ""
|
||||
content: "public e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
span:
|
||||
line_start: 3
|
||||
line_stop: 3
|
||||
col_start: 2
|
||||
col_stop: 6
|
||||
path: ""
|
||||
content: "[main]"
|
||||
- name: registers
|
||||
definitions:
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_: Boolean
|
||||
name: "{\"name\":\"r0\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r0: bool = true; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Boolean:
|
||||
- "true"
|
||||
- span:
|
||||
line_start: 11
|
||||
line_stop: 11
|
||||
col_start: 13
|
||||
col_stop: 17
|
||||
path: ""
|
||||
content: "r0: bool = true; "
|
||||
span:
|
||||
line_start: 11
|
||||
line_stop: 11
|
||||
col_start: 5
|
||||
col_stop: 9
|
||||
path: ""
|
||||
content: "r0: bool = true; "
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_:
|
||||
IntegerType: U8
|
||||
name: "{\"name\":\"r1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r1: u8 = 2; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Implicit:
|
||||
- "2"
|
||||
- span:
|
||||
line_start: 12
|
||||
line_stop: 12
|
||||
col_start: 13
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: "r1: u8 = 2; "
|
||||
span:
|
||||
line_start: 12
|
||||
line_stop: 12
|
||||
col_start: 5
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "r1: u8 = 2; "
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_: Field
|
||||
name: "{\"name\":\"r2\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r2: field = 0; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Implicit:
|
||||
- "0"
|
||||
- span:
|
||||
line_start: 13
|
||||
line_stop: 13
|
||||
col_start: 13
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: "r2: field = 0; "
|
||||
span:
|
||||
line_start: 13
|
||||
line_stop: 13
|
||||
col_start: 5
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "r2: field = 0; "
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_: Group
|
||||
name: "{\"name\":\"r3\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r3: group = (0, 1)group; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Group:
|
||||
Tuple:
|
||||
x:
|
||||
Number:
|
||||
- "0"
|
||||
- span:
|
||||
line_start: 14
|
||||
line_stop: 14
|
||||
col_start: 14
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: "r3: group = (0, 1)group; "
|
||||
y:
|
||||
Number:
|
||||
- "1"
|
||||
- span:
|
||||
line_start: 14
|
||||
line_stop: 14
|
||||
col_start: 17
|
||||
col_stop: 18
|
||||
path: ""
|
||||
content: "r3: group = (0, 1)group; "
|
||||
span:
|
||||
line_start: 14
|
||||
line_stop: 14
|
||||
col_start: 14
|
||||
col_stop: 24
|
||||
path: ""
|
||||
content: "r3: group = (0, 1)group; "
|
||||
span:
|
||||
line_start: 14
|
||||
line_stop: 14
|
||||
col_start: 5
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "r3: group = (0, 1)group; "
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_: Address
|
||||
name: "{\"name\":\"r4\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Address:
|
||||
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
|
||||
- span:
|
||||
line_start: 15
|
||||
line_stop: 15
|
||||
col_start: 15
|
||||
col_stop: 78
|
||||
path: ""
|
||||
content: "r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
span:
|
||||
line_start: 15
|
||||
line_stop: 15
|
||||
col_start: 5
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
span:
|
||||
line_start: 10
|
||||
line_stop: 10
|
||||
col_start: 2
|
||||
col_stop: 11
|
||||
path: ""
|
||||
content: "[registers]"
|
@ -5,8 +5,11 @@ outputs:
|
||||
- sections:
|
||||
- name: main
|
||||
definitions:
|
||||
- type_: Boolean
|
||||
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"a: bool = true; \\\"}\"}"
|
||||
- const_: false
|
||||
private: true
|
||||
public: false
|
||||
type_: Boolean
|
||||
name: "{\"name\":\"a\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"private a: bool = true; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Boolean:
|
||||
@ -14,20 +17,23 @@ outputs:
|
||||
- span:
|
||||
line_start: 4
|
||||
line_stop: 4
|
||||
col_start: 12
|
||||
col_stop: 16
|
||||
col_start: 20
|
||||
col_stop: 24
|
||||
path: ""
|
||||
content: "a: bool = true; "
|
||||
content: "private a: bool = true; "
|
||||
span:
|
||||
line_start: 4
|
||||
line_stop: 4
|
||||
col_start: 4
|
||||
col_stop: 8
|
||||
col_start: 12
|
||||
col_stop: 16
|
||||
path: ""
|
||||
content: "a: bool = true; "
|
||||
- type_:
|
||||
content: "private a: bool = true; "
|
||||
- const_: false
|
||||
private: true
|
||||
public: false
|
||||
type_:
|
||||
IntegerType: U8
|
||||
name: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"b: u8 = 2; \\\"}\"}"
|
||||
name: "{\"name\":\"b\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"private b: u8 = 2; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Implicit:
|
||||
@ -35,19 +41,22 @@ outputs:
|
||||
- span:
|
||||
line_start: 5
|
||||
line_stop: 5
|
||||
col_start: 12
|
||||
col_stop: 13
|
||||
col_start: 20
|
||||
col_stop: 21
|
||||
path: ""
|
||||
content: "b: u8 = 2; "
|
||||
content: "private b: u8 = 2; "
|
||||
span:
|
||||
line_start: 5
|
||||
line_stop: 5
|
||||
col_start: 4
|
||||
col_stop: 6
|
||||
col_start: 12
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: "b: u8 = 2; "
|
||||
- type_: Field
|
||||
name: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c: field = 0; \\\"}\"}"
|
||||
content: "private b: u8 = 2; "
|
||||
- const_: false
|
||||
private: true
|
||||
public: false
|
||||
type_: Field
|
||||
name: "{\"name\":\"c\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"private c: field = 0; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Implicit:
|
||||
@ -55,19 +64,22 @@ outputs:
|
||||
- span:
|
||||
line_start: 6
|
||||
line_stop: 6
|
||||
col_start: 12
|
||||
col_stop: 13
|
||||
col_start: 20
|
||||
col_stop: 21
|
||||
path: ""
|
||||
content: "c: field = 0; "
|
||||
content: "private c: field = 0; "
|
||||
span:
|
||||
line_start: 6
|
||||
line_stop: 6
|
||||
col_start: 4
|
||||
col_stop: 9
|
||||
col_start: 12
|
||||
col_stop: 17
|
||||
path: ""
|
||||
content: "c: field = 0; "
|
||||
- type_: Group
|
||||
name: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"d: group = (0, 1)group; \\\"}\"}"
|
||||
content: "private c: field = 0; "
|
||||
- const_: false
|
||||
private: true
|
||||
public: false
|
||||
type_: Group
|
||||
name: "{\"name\":\"d\",\"span\":\"{\\\"line_start\\\":7,\\\"line_stop\\\":7,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"private d: group = (0, 1)group; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Group:
|
||||
@ -78,36 +90,39 @@ outputs:
|
||||
- span:
|
||||
line_start: 7
|
||||
line_stop: 7
|
||||
col_start: 13
|
||||
col_stop: 14
|
||||
col_start: 21
|
||||
col_stop: 22
|
||||
path: ""
|
||||
content: "d: group = (0, 1)group; "
|
||||
content: "private d: group = (0, 1)group; "
|
||||
y:
|
||||
Number:
|
||||
- "1"
|
||||
- span:
|
||||
line_start: 7
|
||||
line_stop: 7
|
||||
col_start: 16
|
||||
col_stop: 17
|
||||
col_start: 24
|
||||
col_stop: 25
|
||||
path: ""
|
||||
content: "d: group = (0, 1)group; "
|
||||
content: "private d: group = (0, 1)group; "
|
||||
span:
|
||||
line_start: 7
|
||||
line_stop: 7
|
||||
col_start: 13
|
||||
col_stop: 23
|
||||
col_start: 21
|
||||
col_stop: 31
|
||||
path: ""
|
||||
content: "d: group = (0, 1)group; "
|
||||
content: "private d: group = (0, 1)group; "
|
||||
span:
|
||||
line_start: 7
|
||||
line_stop: 7
|
||||
col_start: 4
|
||||
col_stop: 9
|
||||
col_start: 12
|
||||
col_stop: 17
|
||||
path: ""
|
||||
content: "d: group = (0, 1)group; "
|
||||
- type_: Address
|
||||
name: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
|
||||
content: "private d: group = (0, 1)group; "
|
||||
- const_: false
|
||||
private: true
|
||||
public: false
|
||||
type_: Address
|
||||
name: "{\"name\":\"e\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"private e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Address:
|
||||
@ -115,17 +130,17 @@ outputs:
|
||||
- span:
|
||||
line_start: 8
|
||||
line_stop: 8
|
||||
col_start: 14
|
||||
col_stop: 77
|
||||
col_start: 22
|
||||
col_stop: 85
|
||||
path: ""
|
||||
content: "e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
content: "private e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
span:
|
||||
line_start: 8
|
||||
line_stop: 8
|
||||
col_start: 4
|
||||
col_stop: 11
|
||||
col_start: 12
|
||||
col_stop: 19
|
||||
path: ""
|
||||
content: "e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
content: "private e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
span:
|
||||
line_start: 3
|
||||
line_stop: 3
|
||||
@ -135,7 +150,10 @@ outputs:
|
||||
content: "[main]"
|
||||
- name: registers
|
||||
definitions:
|
||||
- type_: Boolean
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_: Boolean
|
||||
name: "{\"name\":\"r0\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r0: bool = true; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
@ -155,7 +173,10 @@ outputs:
|
||||
col_stop: 9
|
||||
path: ""
|
||||
content: "r0: bool = true; "
|
||||
- type_:
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_:
|
||||
IntegerType: U8
|
||||
name: "{\"name\":\"r1\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r1: u8 = 2; \\\"}\"}"
|
||||
value:
|
||||
@ -176,7 +197,10 @@ outputs:
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "r1: u8 = 2; "
|
||||
- type_: Field
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_: Field
|
||||
name: "{\"name\":\"r2\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r2: field = 0; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
@ -196,7 +220,10 @@ outputs:
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "r2: field = 0; "
|
||||
- type_: Group
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_: Group
|
||||
name: "{\"name\":\"r3\",\"span\":\"{\\\"line_start\\\":14,\\\"line_stop\\\":14,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r3: group = (0, 1)group; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
@ -236,7 +263,10 @@ outputs:
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "r3: group = (0, 1)group; "
|
||||
- type_: Address
|
||||
- const_: false
|
||||
private: false
|
||||
public: false
|
||||
type_: Address
|
||||
name: "{\"name\":\"r4\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
@ -263,133 +293,3 @@ outputs:
|
||||
col_stop: 11
|
||||
path: ""
|
||||
content: "[registers]"
|
||||
- name: constants
|
||||
definitions:
|
||||
- type_: Boolean
|
||||
name: "{\"name\":\"c0\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c0: bool = true; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Boolean:
|
||||
- "true"
|
||||
- span:
|
||||
line_start: 18
|
||||
line_stop: 18
|
||||
col_start: 13
|
||||
col_stop: 17
|
||||
path: ""
|
||||
content: "c0: bool = true; "
|
||||
span:
|
||||
line_start: 18
|
||||
line_stop: 18
|
||||
col_start: 5
|
||||
col_stop: 9
|
||||
path: ""
|
||||
content: "c0: bool = true; "
|
||||
- type_:
|
||||
IntegerType: U8
|
||||
name: "{\"name\":\"c1\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c1: u8 = 2; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Implicit:
|
||||
- "2"
|
||||
- span:
|
||||
line_start: 19
|
||||
line_stop: 19
|
||||
col_start: 13
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: "c1: u8 = 2; "
|
||||
span:
|
||||
line_start: 19
|
||||
line_stop: 19
|
||||
col_start: 5
|
||||
col_stop: 7
|
||||
path: ""
|
||||
content: "c1: u8 = 2; "
|
||||
- type_: Field
|
||||
name: "{\"name\":\"c2\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c2: field = 0; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Implicit:
|
||||
- "0"
|
||||
- span:
|
||||
line_start: 20
|
||||
line_stop: 20
|
||||
col_start: 13
|
||||
col_stop: 14
|
||||
path: ""
|
||||
content: "c2: field = 0; "
|
||||
span:
|
||||
line_start: 20
|
||||
line_stop: 20
|
||||
col_start: 5
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "c2: field = 0; "
|
||||
- type_: Group
|
||||
name: "{\"name\":\"c3\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c3: group = (0, 1)group; \\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Group:
|
||||
Tuple:
|
||||
x:
|
||||
Number:
|
||||
- "0"
|
||||
- span:
|
||||
line_start: 21
|
||||
line_stop: 21
|
||||
col_start: 14
|
||||
col_stop: 15
|
||||
path: ""
|
||||
content: "c3: group = (0, 1)group; "
|
||||
y:
|
||||
Number:
|
||||
- "1"
|
||||
- span:
|
||||
line_start: 21
|
||||
line_stop: 21
|
||||
col_start: 17
|
||||
col_stop: 18
|
||||
path: ""
|
||||
content: "c3: group = (0, 1)group; "
|
||||
span:
|
||||
line_start: 21
|
||||
line_stop: 21
|
||||
col_start: 14
|
||||
col_stop: 24
|
||||
path: ""
|
||||
content: "c3: group = (0, 1)group; "
|
||||
span:
|
||||
line_start: 21
|
||||
line_stop: 21
|
||||
col_start: 5
|
||||
col_stop: 10
|
||||
path: ""
|
||||
content: "c3: group = (0, 1)group; "
|
||||
- type_: Address
|
||||
name: "{\"name\":\"c4\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":1,\\\"col_stop\\\":3,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"c4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;\\\"}\"}"
|
||||
value:
|
||||
Value:
|
||||
Address:
|
||||
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
|
||||
- span:
|
||||
line_start: 22
|
||||
line_stop: 22
|
||||
col_start: 15
|
||||
col_stop: 78
|
||||
path: ""
|
||||
content: "c4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
span:
|
||||
line_start: 22
|
||||
line_stop: 22
|
||||
col_start: 5
|
||||
col_stop: 12
|
||||
path: ""
|
||||
content: "c4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;"
|
||||
span:
|
||||
line_start: 17
|
||||
line_stop: 17
|
||||
col_start: 2
|
||||
col_stop: 11
|
||||
path: ""
|
||||
content: "[constants]"
|
||||
|
18
tests/parser/inputs/input_const_success.leo
Normal file
18
tests/parser/inputs/input_const_success.leo
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
namespace: Input
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
[main]
|
||||
const a: bool = true;
|
||||
const b: u8 = 2;
|
||||
const c: field = 0;
|
||||
const d: group = (0, 1)group;
|
||||
const e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||
|
||||
[registers]
|
||||
r0: bool = true;
|
||||
r1: u8 = 2;
|
||||
r2: field = 0;
|
||||
r3: group = (0, 1)group;
|
||||
r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
19
tests/parser/inputs/input_public_success.leo
Normal file
19
tests/parser/inputs/input_public_success.leo
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
namespace: Input
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
[main]
|
||||
public a: bool = true;
|
||||
public b: u8 = 2;
|
||||
public c: field = 0;
|
||||
public d: group = (0, 1)group;
|
||||
public e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||
|
||||
[registers]
|
||||
r0: bool = true;
|
||||
r1: u8 = 2;
|
||||
r2: field = 0;
|
||||
r3: group = (0, 1)group;
|
||||
r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||
|
@ -4,11 +4,11 @@ expectation: Pass
|
||||
*/
|
||||
|
||||
[main]
|
||||
a: bool = true;
|
||||
b: u8 = 2;
|
||||
c: field = 0;
|
||||
d: group = (0, 1)group;
|
||||
e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||
private a: bool = true;
|
||||
private b: u8 = 2;
|
||||
private c: field = 0;
|
||||
private d: group = (0, 1)group;
|
||||
private e: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||
|
||||
[registers]
|
||||
r0: bool = true;
|
||||
@ -17,9 +17,3 @@ r2: field = 0;
|
||||
r3: group = (0, 1)group;
|
||||
r4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||
|
||||
[constants]
|
||||
c0: bool = true;
|
||||
c1: u8 = 2;
|
||||
c2: field = 0;
|
||||
c3: group = (0, 1)group;
|
||||
c4: address = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||
|
Loading…
Reference in New Issue
Block a user