merge upstream testnet3

This commit is contained in:
gluax 2022-04-06 10:25:26 -07:00
commit a5b692a765
17 changed files with 35 additions and 640 deletions

149
Cargo.lock generated
View File

@ -270,9 +270,9 @@ dependencies = [
[[package]] [[package]]
name = "clap" name = "clap"
version = "3.1.6" version = "3.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123" checksum = "71c47df61d9e16dc010b55dba1952a57d8c215dbb533fd13cdd13369aac73b1c"
dependencies = [ dependencies = [
"atty", "atty",
"bitflags", "bitflags",
@ -559,9 +559,9 @@ dependencies = [
[[package]] [[package]]
name = "eyre" name = "eyre"
version = "0.6.7" version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9289ed2c0440a6536e65119725cf91fc2c6b5e513bfd2e36e1134d7cca6ca12f" checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb"
dependencies = [ dependencies = [
"indenter", "indenter",
"once_cell", "once_cell",
@ -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.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c9c1ce3fa9336301af935ab852c437817d14cd33690446569392e65170aac3b"
dependencies = [
"mac",
"new_debug_unreachable",
]
[[package]] [[package]]
name = "futures-channel" name = "futures-channel"
version = "0.3.19" version = "0.3.19"
@ -758,17 +748,6 @@ dependencies = [
"unicode-width", "unicode-width",
] ]
[[package]]
name = "getrandom"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
dependencies = [
"cfg-if 1.0.0",
"libc",
"wasi 0.9.0+wasi-snapshot-preview1",
]
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.2.4" version = "0.2.4"
@ -777,7 +756,7 @@ checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"libc", "libc",
"wasi 0.10.2+wasi-snapshot-preview1", "wasi",
] ]
[[package]] [[package]]
@ -934,9 +913,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
[[package]] [[package]]
name = "indexmap" name = "indexmap"
version = "1.8.0" version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"hashbrown", "hashbrown",
@ -1079,7 +1058,6 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"smallvec", "smallvec",
"tendril",
] ]
[[package]] [[package]]
@ -1116,7 +1094,6 @@ dependencies = [
"eyre", "eyre",
"leo-span", "leo-span",
"serde", "serde",
"tendril",
"thiserror", "thiserror",
] ]
@ -1126,7 +1103,7 @@ version = "1.5.3"
dependencies = [ dependencies = [
"ansi_term", "ansi_term",
"assert_cmd", "assert_cmd",
"clap 3.1.6", "clap 3.1.8",
"color-backtrace", "color-backtrace",
"colored", "colored",
"console", "console",
@ -1137,8 +1114,8 @@ dependencies = [
"leo-errors", "leo-errors",
"leo-package", "leo-package",
"notify", "notify",
"rand 0.8.4", "rand",
"rand_core 0.6.3", "rand_core",
"reqwest", "reqwest",
"rusty-hook", "rusty-hook",
"self_update", "self_update",
@ -1183,7 +1160,6 @@ dependencies = [
"serde_yaml", "serde_yaml",
"smallvec", "smallvec",
"structopt", "structopt",
"tendril",
"tracing", "tracing",
] ]
@ -1195,7 +1171,6 @@ dependencies = [
"indexmap", "indexmap",
"scoped-tls", "scoped-tls",
"serde", "serde",
"tendril",
] ]
[[package]] [[package]]
@ -1231,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"
@ -1384,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"
@ -1565,7 +1528,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8" checksum = "1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8"
dependencies = [ dependencies = [
"base64ct", "base64ct",
"rand_core 0.6.3", "rand_core",
"subtle", "subtle",
] ]
@ -1735,19 +1698,6 @@ dependencies = [
"proc-macro2", "proc-macro2",
] ]
[[package]]
name = "rand"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
dependencies = [
"getrandom 0.1.16",
"libc",
"rand_chacha 0.2.2",
"rand_core 0.5.1",
"rand_hc 0.2.0",
]
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.8.4" version = "0.8.4"
@ -1755,19 +1705,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8"
dependencies = [ dependencies = [
"libc", "libc",
"rand_chacha 0.3.1", "rand_chacha",
"rand_core 0.6.3", "rand_core",
"rand_hc 0.3.1", "rand_hc",
]
[[package]]
name = "rand_chacha"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
dependencies = [
"ppv-lite86",
"rand_core 0.5.1",
] ]
[[package]] [[package]]
@ -1777,16 +1717,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [ dependencies = [
"ppv-lite86", "ppv-lite86",
"rand_core 0.6.3", "rand_core",
]
[[package]]
name = "rand_core"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
dependencies = [
"getrandom 0.1.16",
] ]
[[package]] [[package]]
@ -1795,16 +1726,7 @@ version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
dependencies = [ dependencies = [
"getrandom 0.2.4", "getrandom",
]
[[package]]
name = "rand_hc"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
dependencies = [
"rand_core 0.5.1",
] ]
[[package]] [[package]]
@ -1813,7 +1735,7 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7"
dependencies = [ dependencies = [
"rand_core 0.6.3", "rand_core",
] ]
[[package]] [[package]]
@ -1856,7 +1778,7 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
dependencies = [ dependencies = [
"getrandom 0.2.4", "getrandom",
"redox_syscall", "redox_syscall",
] ]
@ -2191,7 +2113,7 @@ dependencies = [
"bincode", "bincode",
"itertools", "itertools",
"num-bigint", "num-bigint",
"rand 0.8.4", "rand",
"serde", "serde",
"snarkvm-derives", "snarkvm-derives",
"thiserror", "thiserror",
@ -2274,17 +2196,6 @@ dependencies = [
"winapi 0.3.9", "winapi 0.3.9",
] ]
[[package]]
name = "tendril"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9ef557cb397a4f0a5a3a628f06515f78563f2209e64d47055d9dc6052bf5e33"
dependencies = [
"futf",
"mac",
"utf-8",
]
[[package]] [[package]]
name = "termcolor" name = "termcolor"
version = "1.1.2" version = "1.1.2"
@ -2312,11 +2223,11 @@ checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b"
[[package]] [[package]]
name = "test_dir" name = "test_dir"
version = "0.1.0" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e571ebf9127a9da821890a9fa8a8ef777fce3e0f959ff6949cf06ca8b736381d" checksum = "1fc19daf9fc57fadcf740c4abaaa0cd08d9ce22a2a0629aaf6cbd9ae4b80683a"
dependencies = [ dependencies = [
"rand 0.7.3", "rand",
] ]
[[package]] [[package]]
@ -2506,9 +2417,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-subscriber" name = "tracing-subscriber"
version = "0.3.9" version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e0ab7bdc962035a87fba73f3acca9b8a8d0034c2e6f60b84aeaaddddc155dce" checksum = "b9df98b037d039d03400d9dd06b0f8ce05486b5f25e9a2d7d36196e142ebbc52"
dependencies = [ dependencies = [
"ansi_term", "ansi_term",
"sharded-slab", "sharded-slab",
@ -2590,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"
@ -2650,12 +2555,6 @@ dependencies = [
"try-lock", "try-lock",
] ]
[[package]]
name = "wasi"
version = "0.9.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]] [[package]]
name = "wasi" name = "wasi"
version = "0.10.2+wasi-snapshot-preview1" version = "0.10.2+wasi-snapshot-preview1"

View File

@ -106,7 +106,7 @@ version = "0.5"
version = "0.1" version = "0.1"
[dependencies.tracing-subscriber] [dependencies.tracing-subscriber]
version = "0.3.9" version = "0.3.10"
features = [ "fmt" ] features = [ "fmt" ]
[dependencies.zip] [dependencies.zip]
@ -122,7 +122,7 @@ version = "2.0.4"
version = "0.11.2" version = "0.11.2"
[dev-dependencies.test_dir] [dev-dependencies.test_dir]
version = "0.1.0" version = "0.2.0"
[features] [features]
default = [ ] default = [ ]

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,
@ -251,11 +246,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, "["),

Binary file not shown.

View File

@ -181,6 +181,7 @@ symbol = "!" / "&&" / "||"
token = keyword token = keyword
/ identifier / identifier
/ atomic-literal / atomic-literal
/ numeral
/ symbol / symbol
lexeme = token / comment / whitespace lexeme = token / comment / whitespace

View File

@ -35,15 +35,12 @@ version = "0.5.1"
version = "2.2.0" version = "2.2.0"
[dependencies.eyre] [dependencies.eyre]
version = "0.6.7" version = "0.6.8"
default-features = false default-features = false
[dependencies.serde] [dependencies.serde]
version = "1.0.133" version = "1.0.133"
features = [ "derive", "rc" ] features = [ "derive", "rc" ]
[dependencies.tendril]
version = "0.4.2"
[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;