mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-25 11:12:48 +03:00
commit
6297d684ca
@ -44,7 +44,7 @@ commands:
|
||||
jobs:
|
||||
check-style:
|
||||
docker:
|
||||
- image: cimg/rust:1.62
|
||||
- image: cimg/rust:1.63
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- checkout
|
||||
@ -59,7 +59,7 @@ jobs:
|
||||
|
||||
clippy:
|
||||
docker:
|
||||
- image: cimg/rust:1.62
|
||||
- image: cimg/rust:1.63
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- checkout
|
||||
@ -77,7 +77,7 @@ jobs:
|
||||
|
||||
leo-executable:
|
||||
docker:
|
||||
- image: cimg/rust:1.62
|
||||
- image: cimg/rust:1.63
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- checkout
|
||||
@ -96,7 +96,7 @@ jobs:
|
||||
|
||||
leo-new:
|
||||
docker:
|
||||
- image: cimg/rust:1.62
|
||||
- image: cimg/rust:1.63
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@ -109,7 +109,7 @@ jobs:
|
||||
|
||||
leo-clean:
|
||||
docker:
|
||||
- image: cimg/rust:1.62
|
||||
- image: cimg/rust:1.63
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@ -122,7 +122,7 @@ jobs:
|
||||
|
||||
test-examples:
|
||||
docker:
|
||||
- image: cimg/rust:1.62
|
||||
- image: cimg/rust:1.63
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
|
1334
Cargo.lock
generated
1334
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
12
Cargo.toml
12
Cargo.toml
@ -16,7 +16,7 @@ categories = [ "cryptography::cryptocurrencies", "web-programming" ]
|
||||
include = [ "Cargo.toml", "leo", "README.md", "LICENSE.md" ]
|
||||
license = "GPL-3.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.63"
|
||||
|
||||
[lib]
|
||||
path = "leo/lib.rs"
|
||||
@ -29,7 +29,10 @@ path = "leo/main.rs"
|
||||
members = [
|
||||
"compiler/ast",
|
||||
"compiler/compiler",
|
||||
"compiler/core",
|
||||
"compiler/parser",
|
||||
"compiler/passes",
|
||||
"compiler/span",
|
||||
"docs/grammar",
|
||||
"errors",
|
||||
"leo/package",
|
||||
@ -62,11 +65,12 @@ version = "1.5.3"
|
||||
|
||||
[dependencies.aleo]
|
||||
git = "https://github.com/AleoHQ/aleo.git"
|
||||
rev = "46722e3"
|
||||
rev = "ddbb647"
|
||||
|
||||
[dependencies.snarkvm]
|
||||
git = "https://github.com/AleoHQ/snarkVM.git"
|
||||
rev = "d041a0e"
|
||||
version = "0.9.0"
|
||||
#git = "https://github.com/AleoHQ/snarkVM.git"
|
||||
#rev = "69cf3bd"
|
||||
features = ["aleo-cli", "circuit", "console", "parallel"]
|
||||
|
||||
[dependencies.backtrace]
|
||||
|
@ -16,7 +16,7 @@ categories = [ "cryptography::cryptocurrencies", "web-programming" ]
|
||||
include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ]
|
||||
license = "GPL-3.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.63"
|
||||
|
||||
[dependencies.leo-errors]
|
||||
path = "../../errors"
|
||||
|
@ -16,7 +16,7 @@ categories = ["cryptography::cryptocurrencies", "web-programming"]
|
||||
include = ["Cargo.toml", "src", "README.md", "LICENSE.md"]
|
||||
license = "GPL-3.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.63"
|
||||
|
||||
[dependencies.leo-ast]
|
||||
path = "../ast"
|
||||
@ -46,8 +46,9 @@ path = "../../tests/test-framework"
|
||||
version = "1.4.0"
|
||||
|
||||
[dev-dependencies.snarkvm]
|
||||
git = "https://github.com/AleoHQ/snarkVM.git"
|
||||
rev = "d041a0e"
|
||||
version = "0.9.0"
|
||||
#git = "https://github.com/AleoHQ/snarkVM.git"
|
||||
#rev = "69cf3bd"
|
||||
features = ["aleo-cli", "circuit", "console", "parallel"]
|
||||
|
||||
[dev-dependencies.serde]
|
||||
|
@ -16,7 +16,7 @@ categories = [ "cryptography::cryptocurrencies", "web-programming" ]
|
||||
include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ]
|
||||
license = "GPL-3.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.63"
|
||||
|
||||
[dependencies.leo-ast]
|
||||
path = "../ast"
|
||||
|
@ -443,7 +443,7 @@ impl ParserContext<'_> {
|
||||
let mut dist = 1; // 0th is `(` so 1st is first gc's start.
|
||||
let first_gc = self.peek_group_coordinate(&mut dist)?;
|
||||
|
||||
let check_ahead = |d, token: &_| self.look_ahead(d, |t| (&t.token == token).then(|| t.span));
|
||||
let check_ahead = |d, token: &_| self.look_ahead(d, |t| (&t.token == token).then_some(t.span));
|
||||
|
||||
// Peek at `,`.
|
||||
check_ahead(dist, &Token::Comma)?;
|
||||
@ -532,7 +532,7 @@ impl ParserContext<'_> {
|
||||
let suffix_span = self.token.span;
|
||||
let full_span = span + suffix_span;
|
||||
let assert_no_whitespace = |x| assert_no_whitespace(span, suffix_span, &value, x);
|
||||
match self.eat_any(INT_TYPES).then(|| &self.prev_token.token) {
|
||||
match self.eat_any(INT_TYPES).then_some(&self.prev_token.token) {
|
||||
// Literal followed by `field`, e.g., `42field`.
|
||||
Some(Token::Field) => {
|
||||
assert_no_whitespace("field")?;
|
||||
|
@ -262,9 +262,9 @@ impl ParserContext<'_> {
|
||||
/// Returns a [`ParamMode`] AST node if the next tokens represent a function parameter mode.
|
||||
pub(super) fn parse_mode(&mut self) -> Result<Mode> {
|
||||
// TODO: Allow explicit "private" mode.
|
||||
let public = self.eat(&Token::Public).then(|| self.prev_token.span);
|
||||
let constant = self.eat(&Token::Constant).then(|| self.prev_token.span);
|
||||
let const_ = self.eat(&Token::Const).then(|| self.prev_token.span);
|
||||
let public = self.eat(&Token::Public).then_some(self.prev_token.span);
|
||||
let constant = self.eat(&Token::Constant).then_some(self.prev_token.span);
|
||||
let const_ = self.eat(&Token::Const).then_some(self.prev_token.span);
|
||||
|
||||
if let Some(span) = const_ {
|
||||
self.emit_warning(ParserWarning::const_parameter_or_input(span));
|
||||
|
@ -16,7 +16,7 @@ categories = [ "cryptography::cryptocurrencies", "web-programming" ]
|
||||
include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ]
|
||||
license = "GPL-3.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.63"
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
|
@ -51,7 +51,7 @@ impl<'a> ProgramVisitor<'a> for TypeChecker<'a> {
|
||||
let check_has_field = |need, expected_ty: Type| match input
|
||||
.members
|
||||
.iter()
|
||||
.find_map(|CircuitMember::CircuitVariable(v, t)| (v.name == need).then(|| (v, t)))
|
||||
.find_map(|CircuitMember::CircuitVariable(v, t)| (v.name == need).then_some((v, t)))
|
||||
{
|
||||
Some((_, actual_ty)) if expected_ty.eq_flat(actual_ty) => {} // All good, found + right type!
|
||||
Some((field, _)) => {
|
||||
|
@ -16,7 +16,7 @@ categories = [ "cryptography::cryptocurrencies", "web-programming" ]
|
||||
include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ]
|
||||
license = "GPL-3.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.63"
|
||||
|
||||
[dependencies.indexmap]
|
||||
version = "1.9"
|
||||
|
@ -16,7 +16,7 @@ categories = [ "cryptography::cryptocurrencies", "web-programming" ]
|
||||
include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ]
|
||||
license = "GPL-3.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.63"
|
||||
|
||||
[dependencies.anyhow]
|
||||
version = "1.0"
|
||||
|
@ -16,7 +16,7 @@ categories = [ "cryptography::cryptocurrencies", "web-programming" ]
|
||||
include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ]
|
||||
license = "GPL-3.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56"
|
||||
rust-version = "1.63"
|
||||
|
||||
[dependencies.leo-span]
|
||||
path = "../compiler/span"
|
||||
|
@ -16,7 +16,7 @@ categories = [ "cryptography::cryptocurrencies", "web-programming" ]
|
||||
include = [ "Cargo.toml", "src", "README.md", "LICENSE.md" ]
|
||||
license = "GPL-3.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.56.1"
|
||||
rust-version = "1.63"
|
||||
|
||||
[dependencies.leo-errors]
|
||||
path = "../../errors"
|
||||
|
Loading…
Reference in New Issue
Block a user