Merge pull request #1741 from AleoHQ/feature/testnet3-cleanup

[Impl] Testnet3 Cleanup
This commit is contained in:
Collin Chin 2022-04-05 15:59:34 -07:00 committed by GitHub
commit 71c87d45e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 7 additions and 555 deletions

43
Cargo.lock generated
View File

@ -672,16 +672,6 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
[[package]]
name = "futf"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843"
dependencies = [
"mac",
"new_debug_unreachable",
]
[[package]] [[package]]
name = "futures-channel" name = "futures-channel"
version = "0.3.19" version = "0.3.19"
@ -1068,7 +1058,6 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"smallvec", "smallvec",
"tendril",
] ]
[[package]] [[package]]
@ -1105,7 +1094,6 @@ dependencies = [
"eyre", "eyre",
"leo-span", "leo-span",
"serde", "serde",
"tendril",
"thiserror", "thiserror",
] ]
@ -1172,7 +1160,6 @@ dependencies = [
"serde_yaml", "serde_yaml",
"smallvec", "smallvec",
"structopt", "structopt",
"tendril",
"tracing", "tracing",
] ]
@ -1184,7 +1171,6 @@ dependencies = [
"indexmap", "indexmap",
"scoped-tls", "scoped-tls",
"serde", "serde",
"tendril",
] ]
[[package]] [[package]]
@ -1220,12 +1206,6 @@ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
] ]
[[package]]
name = "mac"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
[[package]] [[package]]
name = "matches" name = "matches"
version = "0.1.9" version = "0.1.9"
@ -1373,12 +1353,6 @@ dependencies = [
"winapi 0.3.9", "winapi 0.3.9",
] ]
[[package]]
name = "new_debug_unreachable"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54"
[[package]] [[package]]
name = "nias" name = "nias"
version = "0.5.0" version = "0.5.0"
@ -2222,17 +2196,6 @@ dependencies = [
"winapi 0.3.9", "winapi 0.3.9",
] ]
[[package]]
name = "tendril"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0"
dependencies = [
"futf",
"mac",
"utf-8",
]
[[package]] [[package]]
name = "termcolor" name = "termcolor"
version = "1.1.2" version = "1.1.2"
@ -2538,12 +2501,6 @@ dependencies = [
"percent-encoding", "percent-encoding",
] ]
[[package]]
name = "utf-8"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
[[package]] [[package]]
name = "valuable" name = "valuable"
version = "0.1.0" version = "0.1.0"

View File

@ -41,9 +41,6 @@ features = [ "derive", "rc" ]
version = "1.0" version = "1.0"
features = [ "preserve_order" ] features = [ "preserve_order" ]
[dependencies.tendril]
version = "0.4"
[dev-dependencies.criterion] [dev-dependencies.criterion]
version = "0.3" version = "0.3"

View File

@ -48,9 +48,6 @@ version = "1.3.0"
version = "1.0" version = "1.0"
features = [ "derive" ] features = [ "derive" ]
[dependencies.tendril]
version = "0.4"
[dependencies.tracing] [dependencies.tracing]
version = "0.1" version = "0.1"

View File

@ -19,14 +19,7 @@ use super::*;
use leo_errors::{ParserError, Result}; use leo_errors::{ParserError, Result};
use leo_span::sym; use leo_span::sym;
const ASSIGN_TOKENS: &[Token] = &[ const ASSIGN_TOKENS: &[Token] = &[Token::Assign];
Token::Assign,
Token::AddEq,
Token::MinusEq,
Token::MulEq,
Token::DivEq,
Token::ExpEq,
];
impl ParserContext<'_> { impl ParserContext<'_> {
/// ///
@ -85,11 +78,6 @@ impl ParserContext<'_> {
assignee, assignee,
operation: match operator.token { operation: match operator.token {
Token::Assign => AssignOperation::Assign, Token::Assign => AssignOperation::Assign,
Token::AddEq => AssignOperation::Add,
Token::MinusEq => AssignOperation::Sub,
Token::MulEq => AssignOperation::Mul,
Token::DivEq => AssignOperation::Div,
Token::ExpEq => AssignOperation::Pow,
_ => unreachable!("parse_assign_statement_ shouldn't produce this"), _ => unreachable!("parse_assign_statement_ shouldn't produce this"),
}, },
value, value,

View File

@ -261,20 +261,12 @@ impl Token {
Some('*') => { Some('*') => {
input.next(); input.next();
if input.next_if_eq(&'*').is_some() { if input.next_if_eq(&'*').is_some() {
if input.next_if_eq(&'=').is_some() {
return Ok((3, Token::ExpEq));
}
return Ok((2, Token::Exp)); return Ok((2, Token::Exp));
} else if input.next_if_eq(&'=').is_some() {
return Ok((2, Token::MulEq));
} }
return Ok((1, Token::Mul)); return Ok((1, Token::Mul));
} }
Some('+') => { Some('+') => {
input.next(); input.next();
if input.next_if_eq(&'=').is_some() {
return Ok((2, Token::AddEq));
}
return Ok((1, Token::Add)); return Ok((1, Token::Add));
} }
Some(',') => { Some(',') => {
@ -285,8 +277,6 @@ impl Token {
input.next(); input.next();
if input.next_if_eq(&'>').is_some() { if input.next_if_eq(&'>').is_some() {
return Ok((2, Token::Arrow)); return Ok((2, Token::Arrow));
} else if input.next_if_eq(&'=').is_some() {
return Ok((2, Token::MinusEq));
} }
return Ok((1, Token::Minus)); return Ok((1, Token::Minus));
} }
@ -333,8 +323,6 @@ impl Token {
return Err(ParserError::lexer_block_comment_does_not_close_before_eof(comment).into()); return Err(ParserError::lexer_block_comment_does_not_close_before_eof(comment).into());
} }
return Ok((comment.len(), Token::CommentBlock(comment))); return Ok((comment.len(), Token::CommentBlock(comment)));
} else if input.next_if_eq(&'=').is_some() {
return Ok((2, Token::DivEq));
} }
return Ok((1, Token::Div)); return Ok((1, Token::Div));
} }

View File

@ -159,19 +159,14 @@ mod tests {
) )
* *
** **
**=
*=
+ +
+=
, ,
- -
-=
-> ->
_ _
. .
.. ..
/ /
/=
: :
; ;
< <
@ -199,7 +194,7 @@ mod tests {
assert_eq!( assert_eq!(
output, output,
r#"'a' '😭' "test" "test{}test" "test{}" "{}test" "test{" "test}" "test{test" "test}test" "te{{}}" aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 test_ident 12345 address bool const else false field for function group i128 i64 i32 i16 i8 if in input let mut return string test true u128 u64 u32 u16 u8 console ! != && ( ) * ** **= *= + += , - -= -> _ . .. / /= : ; < <= = == > >= [ ] { { } } || ? // test r#"'a' '😭' "test" "test{}test" "test{}" "{}test" "test{" "test}" "test{test" "test}test" "te{{}}" aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8 test_ident 12345 address bool const else false field for function group i128 i64 i32 i16 i8 if in input let mut return string test true u128 u64 u32 u16 u8 console ! != && ( ) * ** + , - -> _ . .. / : ; < <= = == > >= [ ] { { } } || ? // test
/* test */ // "# /* test */ // "#
); );
}); });

View File

@ -76,11 +76,6 @@ pub enum Token {
Div, Div,
Exp, Exp,
Assign, Assign,
AddEq,
MinusEq,
MulEq,
DivEq,
ExpEq,
LeftParen, LeftParen,
RightParen, RightParen,
LeftSquare, LeftSquare,
@ -247,11 +242,6 @@ impl fmt::Display for Token {
Div => write!(f, "/"), Div => write!(f, "/"),
Exp => write!(f, "**"), Exp => write!(f, "**"),
Assign => write!(f, "="), Assign => write!(f, "="),
AddEq => write!(f, "+="),
MinusEq => write!(f, "-="),
MulEq => write!(f, "*="),
DivEq => write!(f, "/="),
ExpEq => write!(f, "**="),
LeftParen => write!(f, "("), LeftParen => write!(f, "("),
RightParen => write!(f, ")"), RightParen => write!(f, ")"),
LeftSquare => write!(f, "["), LeftSquare => write!(f, "["),

View File

@ -42,8 +42,5 @@ default-features = false
version = "1.0.133" version = "1.0.133"
features = [ "derive", "rc" ] features = [ "derive", "rc" ]
[dependencies.tendril]
version = "0.4.3"
[dependencies.thiserror] [dependencies.thiserror]
version = "1.0.30" version = "1.0.30"

View File

@ -31,6 +31,3 @@ features = [ "derive", "rc" ]
[dependencies.scoped-tls] [dependencies.scoped-tls]
version = "1.0.0" version = "1.0.0"
[dependencies.tendril]
version = "0.4.2"

View File

@ -23,5 +23,3 @@ pub mod span;
pub use span::Span; pub use span::Span;
pub mod span_json; pub mod span_json;
pub mod tendril_json;

View File

@ -1,30 +0,0 @@
// Copyright (C) 2019-2022 Aleo Systems Inc.
// This file is part of the Leo library.
// The Leo library is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// The Leo library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
//! Provides logic for serializing and deserializing the `StrTendril` type.
use serde::{Deserialize, Deserializer, Serializer};
use tendril::StrTendril;
/// Serialization for the StrTendril type.
pub fn serialize<S: Serializer>(tendril: &StrTendril, serializer: S) -> Result<S::Ok, S::Error> {
serializer.serialize_str(tendril)
}
/// Deserialization for the StrTendril type.
pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result<StrTendril, D::Error> {
Ok(String::deserialize(deserializer)?.into())
}

View File

@ -25,11 +25,11 @@ outputs:
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '**'\n --> test:1:1\n |\n 1 | **\n | ^^" - "Error [EPAR0370009]: unexpected string: expected 'expression', got '**'\n --> test:1:1\n |\n 1 | **\n | ^^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '/'\n --> test:1:1\n |\n 1 | /\n | ^" - "Error [EPAR0370009]: unexpected string: expected 'expression', got '/'\n --> test:1:1\n |\n 1 | /\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '='\n --> test:1:1\n |\n 1 | =\n | ^" - "Error [EPAR0370009]: unexpected string: expected 'expression', got '='\n --> test:1:1\n |\n 1 | =\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '+='\n --> test:1:1\n |\n 1 | +=\n | ^^" - "Error [EPAR0370009]: unexpected string: expected 'expression', got '+'\n --> test:1:1\n |\n 1 | +=\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '-='\n --> test:1:1\n |\n 1 | -=\n | ^^" - "Error [EPAR0370009]: unexpected string: expected 'expression', got '='\n --> test:1:2\n |\n 1 | -=\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '*='\n --> test:1:1\n |\n 1 | *=\n | ^^" - "Error [EPAR0370009]: unexpected string: expected 'expression', got '*'\n --> test:1:1\n |\n 1 | *=\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '/='\n --> test:1:1\n |\n 1 | /=\n | ^^" - "Error [EPAR0370009]: unexpected string: expected 'expression', got '/'\n --> test:1:1\n |\n 1 | /=\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '**='\n --> test:1:1\n |\n 1 | **=\n | ^^^" - "Error [EPAR0370009]: unexpected string: expected 'expression', got '**'\n --> test:1:1\n |\n 1 | **=\n | ^^"
- "Error [EPAR0370003]: unexpected EOF\n --> test:1:1\n |\n 1 | (\n | ^" - "Error [EPAR0370003]: unexpected EOF\n --> test:1:1\n |\n 1 | (\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got ')'\n --> test:1:1\n |\n 1 | )\n | ^" - "Error [EPAR0370009]: unexpected string: expected 'expression', got ')'\n --> test:1:1\n |\n 1 | )\n | ^"
- "Error [EPAR0370009]: unexpected string: expected 'expression', got '['\n --> test:1:1\n |\n 1 | [\n | ^" - "Error [EPAR0370009]: unexpected string: expected 'expression', got '['\n --> test:1:1\n |\n 1 | [\n | ^"

View File

@ -87,397 +87,3 @@ outputs:
col_stop: 8 col_stop: 8
path: "" path: ""
content: x = x(); content: x = x();
- Assign:
operation: Add
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x += expr;\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x += expr;
value:
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x += expr;\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: x += expr;
- Assign:
operation: Add
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x += x+y;\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x += x+y;
value:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x += x+y;\\\"}\"}"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x += x+y;\\\"}\"}"
op: Add
span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 9
path: ""
content: x += x+y;
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: x += x+y;
- Assign:
operation: Add
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x += x();\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x += x();
value:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x += x();\\\"}\"}"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 9
path: ""
content: x += x();
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: x += x();
- Assign:
operation: Sub
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x -= expr;\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x -= expr;
value:
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x -= expr;\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: x -= expr;
- Assign:
operation: Sub
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x -= x+y;\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x -= x+y;
value:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x -= x+y;\\\"}\"}"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x -= x+y;\\\"}\"}"
op: Add
span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 9
path: ""
content: x -= x+y;
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: x -= x+y;
- Assign:
operation: Sub
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x -= x();\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x -= x();
value:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x -= x();\\\"}\"}"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 9
path: ""
content: x -= x();
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: x -= x();
- Assign:
operation: Mul
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x *= expr;\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x *= expr;
value:
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x *= expr;\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: x *= expr;
- Assign:
operation: Mul
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x *= x+y;\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x *= x+y;
value:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x *= x+y;\\\"}\"}"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x *= x+y;\\\"}\"}"
op: Add
span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 9
path: ""
content: x *= x+y;
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: x *= x+y;
- Assign:
operation: Mul
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x *= x();\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x *= x();
value:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x *= x();\\\"}\"}"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 9
path: ""
content: x *= x();
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: x *= x();
- Assign:
operation: Div
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x /= expr;\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x /= expr;
value:
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x /= expr;\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: x /= expr;
- Assign:
operation: Div
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x /= x+y;\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x /= x+y;
value:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x /= x+y;\\\"}\"}"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":8,\\\"col_stop\\\":9,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x /= x+y;\\\"}\"}"
op: Add
span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 9
path: ""
content: x /= x+y;
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: x /= x+y;
- Assign:
operation: Div
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x /= x();\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x /= x();
value:
Call:
function:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":6,\\\"col_stop\\\":7,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x /= x();\\\"}\"}"
arguments: []
span:
line_start: 1
line_stop: 1
col_start: 6
col_stop: 9
path: ""
content: x /= x();
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 9
path: ""
content: x /= x();
- Assign:
operation: Pow
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x **= expr;\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x **= expr;
value:
Identifier: "{\"name\":\"expr\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":11,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x **= expr;\\\"}\"}"
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 11
path: ""
content: x **= expr;
- Assign:
operation: Pow
assignee:
identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":1,\\\"col_stop\\\":2,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x **= x+y;\\\"}\"}"
accesses: []
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 2
path: ""
content: x **= x+y;
value:
Binary:
left:
Identifier: "{\"name\":\"x\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":7,\\\"col_stop\\\":8,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x **= x+y;\\\"}\"}"
right:
Identifier: "{\"name\":\"y\",\"span\":\"{\\\"line_start\\\":1,\\\"line_stop\\\":1,\\\"col_start\\\":9,\\\"col_stop\\\":10,\\\"path\\\":\\\"\\\",\\\"content\\\":\\\"x **= x+y;\\\"}\"}"
op: Add
span:
line_start: 1
line_stop: 1
col_start: 7
col_stop: 10
path: ""
content: x **= x+y;
span:
line_start: 1
line_stop: 1
col_start: 1
col_stop: 10
path: ""
content: x **= x+y;

View File

@ -8,31 +8,3 @@ x = expr;
x = x+y; x = x+y;
x = x(); x = x();
x += expr;
x += x+y;
x += x();
x -= expr;
x -= x+y;
x -= x();
x *= expr;
x *= x+y;
x *= x();
x /= expr;
x /= x+y;
x /= x();
x **= expr;
x **= x+y;