mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-25 03:04:13 +03:00
Passing no-span serialization tests in parser
This commit is contained in:
parent
1521a4a84d
commit
2edb794c8b
@ -103,7 +103,10 @@ impl Ast {
|
||||
Ok(serde_json::to_string_pretty(&self.ast).map_err(|e| AstError::failed_to_convert_ast_to_json_string(&e))?)
|
||||
}
|
||||
|
||||
// Converts the ast into a JSON value
|
||||
// Converts the ast into a JSON value.
|
||||
// Note that there is no corresponding `from_json_value` function
|
||||
// since we modify JSON values leaving them unable to be converted
|
||||
// back into Programs.
|
||||
pub fn to_json_value(&self) -> Result<serde_json::Value> {
|
||||
Ok(serde_json::to_value(&self.ast).map_err(|e| AstError::failed_to_convert_ast_to_json_value(&e))?)
|
||||
}
|
||||
@ -133,7 +136,7 @@ impl Ast {
|
||||
remove_key_from_json(&mut value, key);
|
||||
}
|
||||
|
||||
Ok(serde_json::to_writer_pretty(writer, &self.ast)
|
||||
Ok(serde_json::to_writer_pretty(writer, &value)
|
||||
.map_err(|e| AstError::failed_to_write_ast_to_json_file(&path, &e))?)
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ use crate::{
|
||||
pub use leo_asg::{new_context, AsgContext as Context, AsgContext};
|
||||
use leo_asg::{Asg, AsgPass, Program as AsgProgram};
|
||||
use leo_ast::{AstPass, Input, MainInput, Program as AstProgram};
|
||||
use leo_errors::{AstError, CompilerError, Result};
|
||||
use leo_errors::{CompilerError, Result};
|
||||
use leo_imports::ImportParser;
|
||||
use leo_input::LeoInputParser;
|
||||
use leo_package::inputs::InputPairs;
|
||||
@ -272,7 +272,7 @@ impl<'a, F: PrimeField, G: GroupType<F>> Compiler<'a, F, G> {
|
||||
|
||||
if self.ast_snapshot_options.canonicalized {
|
||||
if !self.ast_snapshot_options.spans_enabled {
|
||||
ast.to_json_file_without_keys(self.output_directory.clone(), "canonicalization_ast.json", &["spans"])?;
|
||||
ast.to_json_file_without_keys(self.output_directory.clone(), "canonicalization_ast.json", &["span"])?;
|
||||
} else {
|
||||
ast.to_json_file(self.output_directory.clone(), "canonicalization_ast.json")?;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
"circuits": {},
|
||||
"expected_input": [],
|
||||
"functions": {
|
||||
"{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":23,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\"function is_palindrome(str: [char; 20]) -> bool {\\\"}\"}": {
|
||||
"{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function is_palindrome(str: [char; 20]) -> bool {\\\"}\"}": {
|
||||
"annotations": [],
|
||||
"block": {
|
||||
"statements": [
|
||||
@ -22,7 +22,7 @@
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"str_len\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":18,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" const str_len = 20u32; // saving const for convenience\\\"}\"}",
|
||||
"identifier": "{\"name\":\"str_len\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":11,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" const str_len = 20u32; // saving const for convenience\\\"}\"}",
|
||||
"mutable": false
|
||||
}
|
||||
]
|
||||
@ -42,7 +42,7 @@
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" let result = true;\\\"}\"}",
|
||||
"identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = true;\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -63,7 +63,7 @@
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":18,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" let processed = 0u8;\\\"}\"}",
|
||||
"identifier": "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":9,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let processed = 0u8;\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -80,16 +80,16 @@
|
||||
"value": {
|
||||
"ArrayAccess": {
|
||||
"array": {
|
||||
"Identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":25,\\\"col_stop\\\":28,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" let start_sym = str[start];\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":25,\\\"col_stop\\\":28,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let start_sym = str[start];\\\"}\"}"
|
||||
},
|
||||
"index": {
|
||||
"Identifier": "{\"name\":\"start\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":29,\\\"col_stop\\\":34,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" let start_sym = str[start];\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"start\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":29,\\\"col_stop\\\":34,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let start_sym = str[start];\\\"}\"}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":13,\\\"col_stop\\\":22,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" let start_sym = str[start];\\\"}\"}",
|
||||
"identifier": "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":13,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let start_sym = str[start];\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -114,7 +114,7 @@
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":24,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" let skipped = 0u8;\\\"}\"}",
|
||||
"identifier": "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":18,\\\"line_stop\\\":18,\\\"col_start\\\":17,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let skipped = 0u8;\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -135,7 +135,7 @@
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"end_empty\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":17,\\\"col_stop\\\":26,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" let end_empty = 0u8;\\\"}\"}",
|
||||
"identifier": "{\"name\":\"end_empty\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":17,\\\"col_stop\\\":26,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let end_empty = 0u8;\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -156,7 +156,7 @@
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":17,\\\"col_stop\\\":24,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" let end_sym = ' ';\\\"}\"}",
|
||||
"identifier": "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":20,\\\"line_stop\\\":20,\\\"col_start\\\":17,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let end_sym = ' ';\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -174,16 +174,16 @@
|
||||
"Assign": {
|
||||
"assignee": {
|
||||
"accesses": [],
|
||||
"identifier": "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":21,\\\"col_stop\\\":28,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" end_sym = str[end];\\\"}\"}"
|
||||
"identifier": "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":21,\\\"col_stop\\\":28,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" end_sym = str[end];\\\"}\"}"
|
||||
},
|
||||
"operation": "Assign",
|
||||
"value": {
|
||||
"ArrayAccess": {
|
||||
"array": {
|
||||
"Identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":31,\\\"col_stop\\\":34,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" end_sym = str[end];\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":31,\\\"col_stop\\\":34,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" end_sym = str[end];\\\"}\"}"
|
||||
},
|
||||
"index": {
|
||||
"Identifier": "{\"name\":\"end\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":35,\\\"col_stop\\\":38,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" end_sym = str[end];\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"end\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":35,\\\"col_stop\\\":38,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" end_sym = str[end];\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -200,10 +200,10 @@
|
||||
"left": {
|
||||
"ArrayAccess": {
|
||||
"array": {
|
||||
"Identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":20,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
|
||||
},
|
||||
"index": {
|
||||
"Identifier": "{\"name\":\"end\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":24,\\\"col_stop\\\":27,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"end\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":24,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -223,11 +223,11 @@
|
||||
"right": {
|
||||
"Binary": {
|
||||
"left": {
|
||||
"Identifier": "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":39,\\\"col_stop\\\":46,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":39,\\\"col_stop\\\":46,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
|
||||
},
|
||||
"op": "Eq",
|
||||
"right": {
|
||||
"Identifier": "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":50,\\\"col_stop\\\":59,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":50,\\\"col_stop\\\":59,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -237,7 +237,7 @@
|
||||
"right": {
|
||||
"Binary": {
|
||||
"left": {
|
||||
"Identifier": "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":63,\\\"col_stop\\\":70,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":63,\\\"col_stop\\\":70,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" if str[end] != ' ' && skipped == processed && end_sym == ' ' {\\\"}\"}"
|
||||
},
|
||||
"op": "Eq",
|
||||
"right": {
|
||||
@ -260,13 +260,13 @@
|
||||
"Assign": {
|
||||
"assignee": {
|
||||
"accesses": [],
|
||||
"identifier": "{\"name\":\"end_empty\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":21,\\\"col_stop\\\":30,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" end_empty = end_empty + 1;\\\"}\"}"
|
||||
"identifier": "{\"name\":\"end_empty\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":21,\\\"col_stop\\\":30,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" end_empty = end_empty + 1;\\\"}\"}"
|
||||
},
|
||||
"operation": "Assign",
|
||||
"value": {
|
||||
"Binary": {
|
||||
"left": {
|
||||
"Identifier": "{\"name\":\"end_empty\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":33,\\\"col_stop\\\":42,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" end_empty = end_empty + 1;\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"end_empty\",\"span\":\"{\\\"line_start\\\":26,\\\"line_stop\\\":26,\\\"col_start\\\":33,\\\"col_stop\\\":42,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" end_empty = end_empty + 1;\\\"}\"}"
|
||||
},
|
||||
"op": "Add",
|
||||
"right": {
|
||||
@ -289,13 +289,13 @@
|
||||
"Assign": {
|
||||
"assignee": {
|
||||
"accesses": [],
|
||||
"identifier": "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":25,\\\"col_stop\\\":32,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" skipped = skipped + 1;\\\"}\"}"
|
||||
"identifier": "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":25,\\\"col_stop\\\":32,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" skipped = skipped + 1;\\\"}\"}"
|
||||
},
|
||||
"operation": "Assign",
|
||||
"value": {
|
||||
"Binary": {
|
||||
"left": {
|
||||
"Identifier": "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":35,\\\"col_stop\\\":42,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" skipped = skipped + 1;\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"skipped\",\"span\":\"{\\\"line_start\\\":28,\\\"line_stop\\\":28,\\\"col_start\\\":35,\\\"col_stop\\\":42,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" skipped = skipped + 1;\\\"}\"}"
|
||||
},
|
||||
"op": "Add",
|
||||
"right": {
|
||||
@ -317,10 +317,10 @@
|
||||
"left": {
|
||||
"ArrayAccess": {
|
||||
"array": {
|
||||
"Identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":24,\\\"col_stop\\\":27,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" if str[end] != ' ' {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":24,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" if str[end] != ' ' {\\\"}\"}"
|
||||
},
|
||||
"index": {
|
||||
"Identifier": "{\"name\":\"end\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":28,\\\"col_stop\\\":31,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" if str[end] != ' ' {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"end\",\"span\":\"{\\\"line_start\\\":27,\\\"line_stop\\\":27,\\\"col_start\\\":28,\\\"col_stop\\\":31,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" if str[end] != ' ' {\\\"}\"}"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -350,7 +350,7 @@
|
||||
"start": {
|
||||
"Binary": {
|
||||
"left": {
|
||||
"Identifier": "{\"name\":\"str_len\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":25,\\\"col_stop\\\":32,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" for end in (str_len - 1)..start {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"str_len\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":25,\\\"col_stop\\\":32,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" for end in (str_len - 1)..start {\\\"}\"}"
|
||||
},
|
||||
"op": "Sub",
|
||||
"right": {
|
||||
@ -364,9 +364,9 @@
|
||||
}
|
||||
},
|
||||
"stop": {
|
||||
"Identifier": "{\"name\":\"start\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":39,\\\"col_stop\\\":44,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" for end in (str_len - 1)..start {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"start\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":39,\\\"col_stop\\\":44,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" for end in (str_len - 1)..start {\\\"}\"}"
|
||||
},
|
||||
"variable": "{\"name\":\"end\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":17,\\\"col_stop\\\":20,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" for end in (str_len - 1)..start {\\\"}\"}"
|
||||
"variable": "{\"name\":\"end\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":17,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" for end in (str_len - 1)..start {\\\"}\"}"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -379,10 +379,10 @@
|
||||
"Log": {
|
||||
"parameters": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":51,\\\"col_stop\\\":60,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" console.log(\\\\\\\"Comparing: {} ? {}\\\\\\\", start_sym, end_sym);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":51,\\\"col_stop\\\":60,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"Comparing: {} ? {}\\\\\\\", start_sym, end_sym);\\\"}\"}"
|
||||
},
|
||||
{
|
||||
"Identifier": "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":62,\\\"col_stop\\\":69,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" console.log(\\\\\\\"Comparing: {} ? {}\\\\\\\", start_sym, end_sym);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":35,\\\"line_stop\\\":35,\\\"col_start\\\":62,\\\"col_stop\\\":69,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"Comparing: {} ? {}\\\\\\\", start_sym, end_sym);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"string": [
|
||||
@ -453,17 +453,17 @@
|
||||
"Assign": {
|
||||
"assignee": {
|
||||
"accesses": [],
|
||||
"identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":21,\\\"col_stop\\\":27,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" result = (start_sym == end_sym);\\\"}\"}"
|
||||
"identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":21,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" result = (start_sym == end_sym);\\\"}\"}"
|
||||
},
|
||||
"operation": "Assign",
|
||||
"value": {
|
||||
"Binary": {
|
||||
"left": {
|
||||
"Identifier": "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":31,\\\"col_stop\\\":40,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" result = (start_sym == end_sym);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":31,\\\"col_stop\\\":40,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" result = (start_sym == end_sym);\\\"}\"}"
|
||||
},
|
||||
"op": "Eq",
|
||||
"right": {
|
||||
"Identifier": "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":44,\\\"col_stop\\\":51,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" result = (start_sym == end_sym);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":38,\\\"line_stop\\\":38,\\\"col_start\\\":44,\\\"col_stop\\\":51,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" result = (start_sym == end_sym);\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -472,7 +472,7 @@
|
||||
]
|
||||
},
|
||||
"condition": {
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":20,\\\"col_stop\\\":26,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" if result {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":20,\\\"col_stop\\\":26,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" if result {\\\"}\"}"
|
||||
},
|
||||
"next": null
|
||||
}
|
||||
@ -481,13 +481,13 @@
|
||||
"Assign": {
|
||||
"assignee": {
|
||||
"accesses": [],
|
||||
"identifier": "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":17,\\\"col_stop\\\":26,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" processed = processed + 1;\\\"}\"}"
|
||||
"identifier": "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":17,\\\"col_stop\\\":26,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" processed = processed + 1;\\\"}\"}"
|
||||
},
|
||||
"operation": "Assign",
|
||||
"value": {
|
||||
"Binary": {
|
||||
"left": {
|
||||
"Identifier": "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":29,\\\"col_stop\\\":38,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" processed = processed + 1;\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"processed\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":29,\\\"col_stop\\\":38,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" processed = processed + 1;\\\"}\"}"
|
||||
},
|
||||
"op": "Add",
|
||||
"right": {
|
||||
@ -507,7 +507,7 @@
|
||||
"condition": {
|
||||
"Binary": {
|
||||
"left": {
|
||||
"Identifier": "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":16,\\\"col_stop\\\":23,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" if end_sym != ' ' {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"end_sym\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":16,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" if end_sym != ' ' {\\\"}\"}"
|
||||
},
|
||||
"op": "Ne",
|
||||
"right": {
|
||||
@ -529,7 +529,7 @@
|
||||
"condition": {
|
||||
"Binary": {
|
||||
"left": {
|
||||
"Identifier": "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" if start_sym != ' ' {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"start_sym\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":12,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" if start_sym != ' ' {\\\"}\"}"
|
||||
},
|
||||
"op": "Ne",
|
||||
"right": {
|
||||
@ -560,7 +560,7 @@
|
||||
"stop": {
|
||||
"Binary": {
|
||||
"left": {
|
||||
"Identifier": "{\"name\":\"str_len\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":22,\\\"col_stop\\\":29,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" for start in 0..(str_len / 2) {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"str_len\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":22,\\\"col_stop\\\":29,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" for start in 0..(str_len / 2) {\\\"}\"}"
|
||||
},
|
||||
"op": "Div",
|
||||
"right": {
|
||||
@ -573,7 +573,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"variable": "{\"name\":\"start\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" for start in 0..(str_len / 2) {\\\"}\"}"
|
||||
"variable": "{\"name\":\"start\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" for start in 0..(str_len / 2) {\\\"}\"}"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -582,7 +582,7 @@
|
||||
"Log": {
|
||||
"parameters": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":46,\\\"line_stop\\\":46,\\\"col_start\\\":34,\\\"col_stop\\\":40,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" console.log(\\\\\\\"Result is: {}\\\\\\\", result);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":46,\\\"line_stop\\\":46,\\\"col_start\\\":34,\\\"col_stop\\\":40,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"Result is: {}\\\\\\\", result);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"string": [
|
||||
@ -633,18 +633,18 @@
|
||||
{
|
||||
"Return": {
|
||||
"expression": {
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" return result;\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":48,\\\"line_stop\\\":48,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return result;\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":23,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\"function is_palindrome(str: [char; 20]) -> bool {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":10,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function is_palindrome(str: [char; 20]) -> bool {\\\"}\"}",
|
||||
"input": [
|
||||
{
|
||||
"Variable": {
|
||||
"const_": false,
|
||||
"identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":24,\\\"col_stop\\\":27,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\"function is_palindrome(str: [char; 20]) -> bool {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":8,\\\"line_stop\\\":8,\\\"col_start\\\":24,\\\"col_stop\\\":27,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function is_palindrome(str: [char; 20]) -> bool {\\\"}\"}",
|
||||
"mutable": true,
|
||||
"type_": {
|
||||
"Array": [
|
||||
@ -661,7 +661,7 @@
|
||||
],
|
||||
"output": "Boolean"
|
||||
},
|
||||
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\"function main(str: [char; 20]) -> bool {\\\"}\"}": {
|
||||
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function main(str: [char; 20]) -> bool {\\\"}\"}": {
|
||||
"annotations": [],
|
||||
"block": {
|
||||
"statements": [
|
||||
@ -671,11 +671,11 @@
|
||||
"Call": {
|
||||
"arguments": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":26,\\\"col_stop\\\":29,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" return is_palindrome(str);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":26,\\\"col_stop\\\":29,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return is_palindrome(str);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":25,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" return is_palindrome(str);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":12,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return is_palindrome(str);\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -683,12 +683,12 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\"function main(str: [char; 20]) -> bool {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function main(str: [char; 20]) -> bool {\\\"}\"}",
|
||||
"input": [
|
||||
{
|
||||
"Variable": {
|
||||
"const_": false,
|
||||
"identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\"function main(str: [char; 20]) -> bool {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"str\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function main(str: [char; 20]) -> bool {\\\"}\"}",
|
||||
"mutable": true,
|
||||
"type_": {
|
||||
"Array": [
|
||||
@ -705,11 +705,11 @@
|
||||
],
|
||||
"output": "Boolean"
|
||||
},
|
||||
"{\"name\":\"test_is_palindrome\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":10,\\\"col_stop\\\":28,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\"function test_is_palindrome() {\\\"}\"}": {
|
||||
"{\"name\":\"test_is_palindrome\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":10,\\\"col_stop\\\":28,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function test_is_palindrome() {\\\"}\"}": {
|
||||
"annotations": [
|
||||
{
|
||||
"arguments": [],
|
||||
"name": "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":51,\\\"line_stop\\\":51,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\"@test\\\"}\"}"
|
||||
"name": "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":51,\\\"line_stop\\\":51,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"block": {
|
||||
@ -791,7 +791,7 @@
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":53,\\\"line_stop\\\":53,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"a b a \\\\\\\"));\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":53,\\\"line_stop\\\":53,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"a b a \\\\\\\"));\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -875,7 +875,7 @@
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"😀😀😀😀😀 😀😀😀😀😀\\\\\\\"));\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":54,\\\"line_stop\\\":54,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"😀😀😀😀😀 😀😀😀😀😀\\\\\\\"));\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -959,7 +959,7 @@
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"borrow or rob \\\\\\\"));\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"borrow or rob \\\\\\\"));\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1043,7 +1043,7 @@
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"bbbb aaaa aaaa bbbb\\\\\\\"));\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":56,\\\"line_stop\\\":56,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"bbbb aaaa aaaa bbbb\\\\\\\"));\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1127,7 +1127,7 @@
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"aaaaaaaaaaaaaaaaaaaa\\\\\\\"));\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":57,\\\"line_stop\\\":57,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"aaaaaaaaaaaaaaaaaaaa\\\\\\\"));\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1211,7 +1211,7 @@
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"taco cat \\\\\\\"));\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"is_palindrome\",\"span\":\"{\\\"line_start\\\":58,\\\"line_stop\\\":58,\\\"col_start\\\":20,\\\"col_stop\\\":33,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.assert(is_palindrome(\\\\\\\"taco cat \\\\\\\"));\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1220,7 +1220,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"identifier": "{\"name\":\"test_is_palindrome\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":10,\\\"col_stop\\\":28,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/palindrome/src/main.leo\\\",\\\"content\\\":\\\"function test_is_palindrome() {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"test_is_palindrome\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":10,\\\"col_stop\\\":28,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function test_is_palindrome() {\\\"}\"}",
|
||||
"input": [],
|
||||
"output": null
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
{
|
||||
"aliases": {},
|
||||
"circuits": {
|
||||
"{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}": {
|
||||
"circuit_name": "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}",
|
||||
"{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}": {
|
||||
"circuit_name": "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"circuit PedersenHash {\\\"}\"}",
|
||||
"core_mapping": null,
|
||||
"members": [
|
||||
{
|
||||
"CircuitVariable": [
|
||||
"{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" parameters: [group; 256];\\\"}\"}",
|
||||
"{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":2,\\\"line_stop\\\":2,\\\"col_start\\\":5,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" parameters: [group; 256];\\\"}\"}",
|
||||
{
|
||||
"Array": [
|
||||
"Group",
|
||||
@ -32,24 +32,24 @@
|
||||
"members": [
|
||||
{
|
||||
"expression": {
|
||||
"Identifier": "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":35,\\\"col_stop\\\":45,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":35,\\\"col_stop\\\":45,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}"
|
||||
},
|
||||
"identifier": "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":33,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}"
|
||||
"identifier": "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":33,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"name": "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}"
|
||||
"name": "{\"name\":\"Self\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return Self { parameters: parameters };\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"identifier": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" function new(parameters: [group; 256]) -> Self {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":14,\\\"col_stop\\\":17,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function new(parameters: [group; 256]) -> Self {\\\"}\"}",
|
||||
"input": [
|
||||
{
|
||||
"Variable": {
|
||||
"const_": false,
|
||||
"identifier": "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":18,\\\"col_stop\\\":28,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" function new(parameters: [group; 256]) -> Self {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":5,\\\"line_stop\\\":5,\\\"col_start\\\":18,\\\"col_stop\\\":28,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function new(parameters: [group; 256]) -> Self {\\\"}\"}",
|
||||
"mutable": true,
|
||||
"type_": {
|
||||
"Array": [
|
||||
@ -88,7 +88,7 @@
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" let digest: group = 0group;\\\"}\"}",
|
||||
"identifier": "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":10,\\\"line_stop\\\":10,\\\"col_start\\\":13,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let digest: group = 0group;\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -106,7 +106,7 @@
|
||||
"Assign": {
|
||||
"assignee": {
|
||||
"accesses": [],
|
||||
"identifier": "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":23,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" digest += self.parameters[i];\\\"}\"}"
|
||||
"identifier": "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":17,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" digest += self.parameters[i];\\\"}\"}"
|
||||
},
|
||||
"operation": "Add",
|
||||
"value": {
|
||||
@ -114,14 +114,14 @@
|
||||
"array": {
|
||||
"CircuitMemberAccess": {
|
||||
"circuit": {
|
||||
"Identifier": "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":27,\\\"col_stop\\\":31,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" digest += self.parameters[i];\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":27,\\\"col_stop\\\":31,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" digest += self.parameters[i];\\\"}\"}"
|
||||
},
|
||||
"name": "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":32,\\\"col_stop\\\":42,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" digest += self.parameters[i];\\\"}\"}",
|
||||
"name": "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":32,\\\"col_stop\\\":42,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" digest += self.parameters[i];\\\"}\"}",
|
||||
"type_": null
|
||||
}
|
||||
},
|
||||
"index": {
|
||||
"Identifier": "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":43,\\\"col_stop\\\":44,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" digest += self.parameters[i];\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":13,\\\"line_stop\\\":13,\\\"col_start\\\":43,\\\"col_stop\\\":44,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" digest += self.parameters[i];\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -132,10 +132,10 @@
|
||||
"condition": {
|
||||
"ArrayAccess": {
|
||||
"array": {
|
||||
"Identifier": "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" if bits[i] {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":16,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" if bits[i] {\\\"}\"}"
|
||||
},
|
||||
"index": {
|
||||
"Identifier": "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" if bits[i] {\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":21,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" if bits[i] {\\\"}\"}"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -161,27 +161,27 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"variable": "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" for i in 0..256 {\\\"}\"}"
|
||||
"variable": "{\"name\":\"i\",\"span\":\"{\\\"line_start\\\":11,\\\"line_stop\\\":11,\\\"col_start\\\":13,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" for i in 0..256 {\\\"}\"}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Return": {
|
||||
"expression": {
|
||||
"Identifier": "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" return digest;\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"digest\",\"span\":\"{\\\"line_start\\\":16,\\\"line_stop\\\":16,\\\"col_start\\\":16,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return digest;\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"identifier": "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" function hash(self, bits: [bool; 256]) -> group {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":14,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function hash(self, bits: [bool; 256]) -> group {\\\"}\"}",
|
||||
"input": [
|
||||
{
|
||||
"SelfKeyword": "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":19,\\\"col_stop\\\":23,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" function hash(self, bits: [bool; 256]) -> group {\\\"}\"}"
|
||||
"SelfKeyword": "{\"name\":\"self\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":19,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function hash(self, bits: [bool; 256]) -> group {\\\"}\"}"
|
||||
},
|
||||
{
|
||||
"Variable": {
|
||||
"const_": false,
|
||||
"identifier": "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":25,\\\"col_stop\\\":29,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" function hash(self, bits: [bool; 256]) -> group {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"bits\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":25,\\\"col_stop\\\":29,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" function hash(self, bits: [bool; 256]) -> group {\\\"}\"}",
|
||||
"mutable": true,
|
||||
"type_": {
|
||||
"Array": [
|
||||
@ -204,7 +204,7 @@
|
||||
},
|
||||
"expected_input": [],
|
||||
"functions": {
|
||||
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {\\\"}\"}": {
|
||||
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {\\\"}\"}": {
|
||||
"annotations": [],
|
||||
"block": {
|
||||
"statements": [
|
||||
@ -216,22 +216,22 @@
|
||||
"Call": {
|
||||
"arguments": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":40,\\\"col_stop\\\":50,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":40,\\\"col_stop\\\":50,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"CircuitStaticFunctionAccess": {
|
||||
"circuit": {
|
||||
"Identifier": "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":22,\\\"col_stop\\\":34,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"PedersenHash\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":22,\\\"col_stop\\\":34,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}"
|
||||
},
|
||||
"name": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":36,\\\"col_stop\\\":39,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}"
|
||||
"name": "{\"name\":\"new\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":36,\\\"col_stop\\\":39,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}",
|
||||
"identifier": "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":22,\\\"line_stop\\\":22,\\\"col_start\\\":11,\\\"col_stop\\\":19,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" const pedersen = PedersenHash::new(parameters);\\\"}\"}",
|
||||
"mutable": false
|
||||
}
|
||||
]
|
||||
@ -243,15 +243,15 @@
|
||||
"Call": {
|
||||
"arguments": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":26,\\\"col_stop\\\":36,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" return pedersen.hash(hash_input);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":26,\\\"col_stop\\\":36,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return pedersen.hash(hash_input);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"CircuitMemberAccess": {
|
||||
"circuit": {
|
||||
"Identifier": "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":12,\\\"col_stop\\\":20,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" return pedersen.hash(hash_input);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"pedersen\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":12,\\\"col_stop\\\":20,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return pedersen.hash(hash_input);\\\"}\"}"
|
||||
},
|
||||
"name": "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":21,\\\"col_stop\\\":25,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\" return pedersen.hash(hash_input);\\\"}\"}",
|
||||
"name": "{\"name\":\"hash\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":21,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return pedersen.hash(hash_input);\\\"}\"}",
|
||||
"type_": null
|
||||
}
|
||||
}
|
||||
@ -261,12 +261,12 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {\\\"}\"}",
|
||||
"input": [
|
||||
{
|
||||
"Variable": {
|
||||
"const_": false,
|
||||
"identifier": "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":25,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"hash_input\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":15,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {\\\"}\"}",
|
||||
"mutable": true,
|
||||
"type_": {
|
||||
"Array": [
|
||||
@ -283,7 +283,7 @@
|
||||
{
|
||||
"Variable": {
|
||||
"const_": true,
|
||||
"identifier": "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":46,\\\"col_stop\\\":56,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/pedersen-hash/src/main.leo\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"parameters\",\"span\":\"{\\\"line_start\\\":21,\\\"line_stop\\\":21,\\\"col_start\\\":46,\\\"col_stop\\\":56,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {\\\"}\"}",
|
||||
"mutable": false,
|
||||
"type_": {
|
||||
"Array": [
|
||||
|
@ -3,7 +3,7 @@
|
||||
"circuits": {},
|
||||
"expected_input": [],
|
||||
"functions": {
|
||||
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}": {
|
||||
"{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}": {
|
||||
"annotations": [],
|
||||
"block": {
|
||||
"statements": [
|
||||
@ -99,7 +99,7 @@
|
||||
"Log": {
|
||||
"parameters": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", puzzle);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":6,\\\"line_stop\\\":6,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", puzzle);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"string": [
|
||||
@ -123,17 +123,17 @@
|
||||
"members": [
|
||||
{
|
||||
"expression": {
|
||||
"Identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":45,\\\"col_stop\\\":51,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":45,\\\"col_stop\\\":51,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
|
||||
},
|
||||
"identifier": "{\"name\":\"puzzle_grid\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":32,\\\"col_stop\\\":43,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
|
||||
"identifier": "{\"name\":\"puzzle_grid\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":32,\\\"col_stop\\\":43,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"name": "{\"name\":\"SillySudoku\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":18,\\\"col_stop\\\":29,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
|
||||
"name": "{\"name\":\"SillySudoku\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":18,\\\"col_stop\\\":29,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}"
|
||||
}
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"sudoku\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}",
|
||||
"identifier": "{\"name\":\"sudoku\",\"span\":\"{\\\"line_start\\\":9,\\\"line_stop\\\":9,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let sudoku = SillySudoku { puzzle_grid: puzzle };\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -231,7 +231,7 @@
|
||||
"Log": {
|
||||
"parameters": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", answer);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":12,\\\"line_stop\\\":12,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"{}\\\\\\\", answer);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"string": [
|
||||
@ -254,15 +254,15 @@
|
||||
"Call": {
|
||||
"arguments": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"CircuitMemberAccess": {
|
||||
"circuit": {
|
||||
"Identifier": "{\"name\":\"sudoku\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":18,\\\"col_stop\\\":24,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"sudoku\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":18,\\\"col_stop\\\":24,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}"
|
||||
},
|
||||
"name": "{\"name\":\"solve\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":25,\\\"col_stop\\\":30,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}",
|
||||
"name": "{\"name\":\"solve\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":25,\\\"col_stop\\\":30,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}",
|
||||
"type_": null
|
||||
}
|
||||
}
|
||||
@ -270,7 +270,7 @@
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}",
|
||||
"identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":15,\\\"line_stop\\\":15,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = sudoku.solve(answer);\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -282,7 +282,7 @@
|
||||
"Log": {
|
||||
"parameters": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":38,\\\"col_stop\\\":44,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" console.log(\\\\\\\"The answer is {}.\\\\\\\", result);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":17,\\\"line_stop\\\":17,\\\"col_start\\\":38,\\\"col_stop\\\":44,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"The answer is {}.\\\\\\\", result);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"string": [
|
||||
@ -345,18 +345,18 @@
|
||||
{
|
||||
"Return": {
|
||||
"expression": {
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" return result;\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":19,\\\"line_stop\\\":19,\\\"col_start\\\":12,\\\"col_stop\\\":18,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" return result;\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":10,\\\"col_stop\\\":14,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}",
|
||||
"input": [
|
||||
{
|
||||
"Variable": {
|
||||
"const_": false,
|
||||
"identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":15,\\\"col_stop\\\":21,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}",
|
||||
"mutable": true,
|
||||
"type_": {
|
||||
"Array": [
|
||||
@ -378,7 +378,7 @@
|
||||
{
|
||||
"Variable": {
|
||||
"const_": false,
|
||||
"identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":37,\\\"col_stop\\\":43,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":4,\\\"line_stop\\\":4,\\\"col_start\\\":37,\\\"col_stop\\\":43,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function main(puzzle: [u8; (3, 3)], answer: [u8; (3, 3)]) -> bool {\\\"}\"}",
|
||||
"mutable": true,
|
||||
"type_": {
|
||||
"Array": [
|
||||
@ -400,11 +400,11 @@
|
||||
],
|
||||
"output": "Boolean"
|
||||
},
|
||||
"{\"name\":\"test_solve_fail\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"function test_solve_fail() {\\\"}\"}": {
|
||||
"{\"name\":\"test_solve_fail\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function test_solve_fail() {\\\"}\"}": {
|
||||
"annotations": [
|
||||
{
|
||||
"arguments": [],
|
||||
"name": "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"@test\\\"}\"}"
|
||||
"name": "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":41,\\\"line_stop\\\":41,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"block": {
|
||||
@ -549,7 +549,7 @@
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let puzzle: [u8; (3, 3)] = [[0, 2, 0],\\\"}\"}",
|
||||
"identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":43,\\\"line_stop\\\":43,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let puzzle: [u8; (3, 3)] = [[0, 2, 0],\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -695,7 +695,7 @@
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let answer: [u8; (3, 3)] = [[1, 2, 3],\\\"}\"}",
|
||||
"identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":47,\\\"line_stop\\\":47,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let answer: [u8; (3, 3)] = [[1, 2, 3],\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -709,20 +709,20 @@
|
||||
"Call": {
|
||||
"arguments": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
},
|
||||
{
|
||||
"Identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"Identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}",
|
||||
"identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":52,\\\"line_stop\\\":52,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -743,7 +743,7 @@
|
||||
},
|
||||
"op": "Eq",
|
||||
"right": {
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":29,\\\"col_stop\\\":35,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" console.assert(false == result);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":55,\\\"line_stop\\\":55,\\\"col_start\\\":29,\\\"col_stop\\\":35,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.assert(false == result);\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -752,15 +752,15 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"identifier": "{\"name\":\"test_solve_fail\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"function test_solve_fail() {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"test_solve_fail\",\"span\":\"{\\\"line_start\\\":42,\\\"line_stop\\\":42,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function test_solve_fail() {\\\"}\"}",
|
||||
"input": [],
|
||||
"output": null
|
||||
},
|
||||
"{\"name\":\"test_solve_pass\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"function test_solve_pass() {\\\"}\"}": {
|
||||
"{\"name\":\"test_solve_pass\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function test_solve_pass() {\\\"}\"}": {
|
||||
"annotations": [
|
||||
{
|
||||
"arguments": [],
|
||||
"name": "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"@test\\\"}\"}"
|
||||
"name": "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":23,\\\"line_stop\\\":23,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"block": {
|
||||
@ -905,7 +905,7 @@
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let puzzle: [u8; (3, 3)] = [[0, 2, 0],\\\"}\"}",
|
||||
"identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":25,\\\"line_stop\\\":25,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let puzzle: [u8; (3, 3)] = [[0, 2, 0],\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -1051,7 +1051,7 @@
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let answer: [u8; (3, 3)] = [[1, 2, 3],\\\"}\"}",
|
||||
"identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":29,\\\"line_stop\\\":29,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let answer: [u8; (3, 3)] = [[1, 2, 3],\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -1065,20 +1065,20 @@
|
||||
"Call": {
|
||||
"arguments": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
},
|
||||
{
|
||||
"Identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"Identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}",
|
||||
"identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":34,\\\"line_stop\\\":34,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -1099,7 +1099,7 @@
|
||||
},
|
||||
"op": "Eq",
|
||||
"right": {
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":28,\\\"col_stop\\\":34,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" console.assert(true == result);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":37,\\\"line_stop\\\":37,\\\"col_start\\\":28,\\\"col_stop\\\":34,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.assert(true == result);\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1108,17 +1108,17 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"identifier": "{\"name\":\"test_solve_pass\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"function test_solve_pass() {\\\"}\"}",
|
||||
"identifier": "{\"name\":\"test_solve_pass\",\"span\":\"{\\\"line_start\\\":24,\\\"line_stop\\\":24,\\\"col_start\\\":10,\\\"col_stop\\\":25,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function test_solve_pass() {\\\"}\"}",
|
||||
"input": [],
|
||||
"output": null
|
||||
},
|
||||
"{\"name\":\"test_solve_with_input\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":10,\\\"col_stop\\\":31,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"function test_solve_with_input(\\\"}\"}": {
|
||||
"{\"name\":\"test_solve_with_input\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":10,\\\"col_stop\\\":31,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function test_solve_with_input(\\\"}\"}": {
|
||||
"annotations": [
|
||||
{
|
||||
"arguments": [
|
||||
"test_input"
|
||||
],
|
||||
"name": "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"@test(test_input)\\\"}\"}"
|
||||
"name": "{\"name\":\"test\",\"span\":\"{\\\"line_start\\\":59,\\\"line_stop\\\":59,\\\"col_start\\\":2,\\\"col_stop\\\":6,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"@test(test_input)\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"block": {
|
||||
@ -1131,20 +1131,20 @@
|
||||
"Call": {
|
||||
"arguments": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":23,\\\"col_stop\\\":29,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
},
|
||||
{
|
||||
"Identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":31,\\\"col_stop\\\":37,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"function": {
|
||||
"Identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"main\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":18,\\\"col_stop\\\":22,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"variable_names": [
|
||||
{
|
||||
"identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}",
|
||||
"identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":66,\\\"line_stop\\\":66,\\\"col_start\\\":9,\\\"col_stop\\\":15,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" let result = main(puzzle, answer);\\\"}\"}",
|
||||
"mutable": true
|
||||
}
|
||||
]
|
||||
@ -1156,10 +1156,10 @@
|
||||
"Log": {
|
||||
"parameters": [
|
||||
{
|
||||
"Identifier": "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":40,\\\"col_stop\\\":48,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" console.log(\\\\\\\"expected {}, got {}\\\\\\\", expected, result);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":40,\\\"col_stop\\\":48,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"expected {}, got {}\\\\\\\", expected, result);\\\"}\"}"
|
||||
},
|
||||
{
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":50,\\\"col_stop\\\":56,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" console.log(\\\\\\\"expected {}, got {}\\\\\\\", expected, result);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":68,\\\"line_stop\\\":68,\\\"col_start\\\":50,\\\"col_stop\\\":56,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.log(\\\\\\\"expected {}, got {}\\\\\\\", expected, result);\\\"}\"}"
|
||||
}
|
||||
],
|
||||
"string": [
|
||||
@ -1231,11 +1231,11 @@
|
||||
"Assert": {
|
||||
"Binary": {
|
||||
"left": {
|
||||
"Identifier": "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":20,\\\"col_stop\\\":28,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" console.assert(expected == result);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":20,\\\"col_stop\\\":28,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.assert(expected == result);\\\"}\"}"
|
||||
},
|
||||
"op": "Eq",
|
||||
"right": {
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":32,\\\"col_stop\\\":38,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" console.assert(expected == result);\\\"}\"}"
|
||||
"Identifier": "{\"name\":\"result\",\"span\":\"{\\\"line_start\\\":70,\\\"line_stop\\\":70,\\\"col_start\\\":32,\\\"col_stop\\\":38,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" console.assert(expected == result);\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1244,12 +1244,12 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"identifier": "{\"name\":\"test_solve_with_input\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":10,\\\"col_stop\\\":31,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"function test_solve_with_input(\\\"}\"}",
|
||||
"identifier": "{\"name\":\"test_solve_with_input\",\"span\":\"{\\\"line_start\\\":60,\\\"line_stop\\\":60,\\\"col_start\\\":10,\\\"col_stop\\\":31,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"function test_solve_with_input(\\\"}\"}",
|
||||
"input": [
|
||||
{
|
||||
"Variable": {
|
||||
"const_": false,
|
||||
"identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" puzzle: [u8; (3, 3)],\\\"}\"}",
|
||||
"identifier": "{\"name\":\"puzzle\",\"span\":\"{\\\"line_start\\\":61,\\\"line_stop\\\":61,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" puzzle: [u8; (3, 3)],\\\"}\"}",
|
||||
"mutable": true,
|
||||
"type_": {
|
||||
"Array": [
|
||||
@ -1271,7 +1271,7 @@
|
||||
{
|
||||
"Variable": {
|
||||
"const_": false,
|
||||
"identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":62,\\\"line_stop\\\":62,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" answer: [u8; (3, 3)],\\\"}\"}",
|
||||
"identifier": "{\"name\":\"answer\",\"span\":\"{\\\"line_start\\\":62,\\\"line_stop\\\":62,\\\"col_start\\\":5,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" answer: [u8; (3, 3)],\\\"}\"}",
|
||||
"mutable": true,
|
||||
"type_": {
|
||||
"Array": [
|
||||
@ -1293,7 +1293,7 @@
|
||||
{
|
||||
"Variable": {
|
||||
"const_": false,
|
||||
"identifier": "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":5,\\\"col_stop\\\":13,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\" expected: bool\\\"}\"}",
|
||||
"identifier": "{\"name\":\"expected\",\"span\":\"{\\\"line_start\\\":63,\\\"line_stop\\\":63,\\\"col_start\\\":5,\\\"col_stop\\\":13,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\" expected: bool\\\"}\"}",
|
||||
"mutable": true,
|
||||
"type_": "Boolean"
|
||||
}
|
||||
@ -1310,10 +1310,10 @@
|
||||
"access": {
|
||||
"Symbol": {
|
||||
"alias": null,
|
||||
"symbol": "{\"name\":\"SillySudoku\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":23,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"import lib.SillySudoku;\\\"}\"}"
|
||||
"symbol": "{\"name\":\"SillySudoku\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":12,\\\"col_stop\\\":23,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import lib.SillySudoku;\\\"}\"}"
|
||||
}
|
||||
},
|
||||
"name": "{\"name\":\"lib\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"/Users/pranav/work/Aleo/leo/examples/silly-sudoku/src/main.leo\\\",\\\"content\\\":\\\"import lib.SillySudoku;\\\"}\"}"
|
||||
"name": "{\"name\":\"lib\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":11,\\\"path\\\":\\\"test\\\",\\\"content\\\":\\\"import lib.SillySudoku;\\\"}\"}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ fn test_serialize() {
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "ci_skip"))]
|
||||
fn serialize_no_span() {
|
||||
fn test_serialize_no_span() {
|
||||
setup();
|
||||
|
||||
let program_paths = vec![
|
||||
@ -75,10 +75,10 @@ fn serialize_no_span() {
|
||||
];
|
||||
|
||||
let json_paths = vec![
|
||||
"./expected_leo_ast/linear_regression.json",
|
||||
"./expected_leo_ast/palindrome.json",
|
||||
"./expected_leo_ast/pedersen_hash.json",
|
||||
"./expected_leo_ast/silly_sudoku.json",
|
||||
"tests/serialization/expected_leo_ast/linear_regression.json",
|
||||
"tests/serialization/expected_leo_ast/palindrome.json",
|
||||
"tests/serialization/expected_leo_ast/pedersen_hash.json",
|
||||
"tests/serialization/expected_leo_ast/silly_sudoku.json",
|
||||
];
|
||||
|
||||
for (program_path, json_path) in program_paths.into_iter().zip(json_paths) {
|
||||
@ -97,8 +97,8 @@ fn serialize_no_span() {
|
||||
};
|
||||
|
||||
// Serializes the ast into JSON format.
|
||||
let serialized_ast: serde_json::Value =
|
||||
serde_json::from_value(serde_json::to_value(ast.as_repr()).unwrap()).unwrap();
|
||||
let mut serialized_ast: serde_json::Value = serde_json::to_value(ast.as_repr()).unwrap();
|
||||
remove_key_from_json(&mut serialized_ast, "span");
|
||||
|
||||
// Load the expected ast.
|
||||
let expected: serde_json::Value = serde_json::from_reader(json_reader).unwrap();
|
||||
@ -108,6 +108,25 @@ fn serialize_no_span() {
|
||||
clean();
|
||||
}
|
||||
|
||||
// Helper function to recursively filter keys from AST JSON.
|
||||
// Redeclaring here since we don't want to make this public.
|
||||
fn remove_key_from_json(value: &mut serde_json::Value, key: &str) {
|
||||
match value {
|
||||
serde_json::value::Value::Object(map) => {
|
||||
map.remove(key);
|
||||
for val in map.values_mut() {
|
||||
remove_key_from_json(val, key);
|
||||
}
|
||||
}
|
||||
serde_json::value::Value::Array(values) => {
|
||||
for val in values.iter_mut() {
|
||||
remove_key_from_json(val, key);
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
// TODO Renable when we don't write spans to snapshots.
|
||||
/* #[test]
|
||||
#[cfg(not(feature = "ci_skip"))]
|
||||
|
Loading…
Reference in New Issue
Block a user