Commit Graph

2709 Commits

Author SHA1 Message Date
d0cd
1e31a9045a
Merge pull request #28433 from ProvableHQ/shadowing
Disallow local variables from shadowing functions, structs, mappings,…
2024-11-06 18:54:50 -08:00
Michael Benfield
b66db0329e Parse error on identifiers that are too long.
SnarkVM requires that identifiers fit in a field
element.
2024-11-06 08:32:26 -08:00
Michael Benfield
003383762d Disallow local variables from shadowing functions, structs, mappings, etc. 2024-11-05 12:17:55 -08:00
Michael Benfield
4afc757216 Update MSRV in all the other crates to match. 2024-11-04 13:24:00 -08:00
Pranav Gaddamadugu
819fa2f6d9 Merge branch 'mainnet' into ci/integration-tests-to-circle-ci 2024-11-01 09:35:37 -07:00
Pranav Gaddamadugu
94dab70da8 Update deps 2024-10-23 13:30:50 -07:00
Michael Benfield
0a5a6985f1 Handle closures that are invalid for Aleo.
In particular,

1. Insert a dummy instruction for empty closures
and finalizers. SnarkVM won't parse these with no instructions.

2. Give an error for Leo functions with
no parameters (rather than just generating
an invalid Aleo closure).

Fixes #28401
2024-10-23 12:03:12 -07:00
Pranav Gaddamadugu
fa0b3ffff7 Clean up docs workflow 2024-10-22 18:12:22 -07:00
Pranav Gaddamadugu
3751961888 Move integration tests under one module 2024-10-21 18:26:17 -07:00
Michael Benfield
da8ef9b779 Consistently make 1 empty line between output items in codegen. 2024-10-21 17:00:21 -07:00
Michael Benfield
b4f28bf692 Don't hash bytecode output for tests. 2024-10-21 16:19:31 -07:00
Michael Benfield
6694e058c4 Switch to TOML for tests instead of YAML. 2024-10-21 16:08:46 -07:00
Michael Benfield
5e7591fec9 Improve handling of guards while flattening.
Specifically three changes are made:

1. Cache Anded together chains of conditionals for early returns.
This prevents quadratic code being generated in the face of a chain
of ifs like

```
if a { return 0u32; } else if b { return 1u32 } else if ...
```

2. Take into account early returns for asserts, and cache the
when reconstructing the assert, as with caching them for early returns.

Fixes #28386, #28387
2024-10-17 10:03:08 -07:00
Michael Benfield
a55dfe29e8 Clean up dependencies.
Remove unused deps. Use workspace deps where appropriate.
2024-10-10 12:56:17 -07:00
Michael Benfield
5a0f39cd9f hex, octal, and binary literals for integers.
Note that they can't be used on the command line since SnarkVM
does the parsing there.
2024-10-10 08:26:58 -07:00
Michael Benfield
9ea9aeb9c8 Require comma separators (and nothing else) between struct members.
Fixes #28377, #28379
2024-10-09 14:47:40 -07:00
Michael Benfield
2bbff6d0a8 Display Type::Boolean as bool, not boolean.
Leo calls this `bool`, so it's potentially confusing when error
messages say `boolean`.
2024-10-04 15:43:52 -07:00
d0cd
94579410c4
Merge pull request #28373 from ProvableHQ/issue-28370-resolve
Add function inputs to the type table.
2024-10-04 07:50:38 +08:00
d0cd
3dd24887a0
Merge pull request #28360 from ProvableHQ/dependabot/cargo/mainnet/tempfile-3.13.0
Bump tempfile from 3.12.0 to 3.13.0
2024-10-04 07:30:22 +08:00
d0cd
0dea30b3de
Merge pull request #28359 from ProvableHQ/dependabot/cargo/mainnet/regex-1.11.0
Bump regex from 1.10.6 to 1.11.0
2024-10-04 07:29:58 +08:00
Michael Benfield
f283ff2671 Address clippy lints. 2024-10-03 13:18:19 -07:00
Michael Benfield
2919f0bfd0 Add function inputs to the type table.
Fixes #28370
2024-10-03 11:45:49 -07:00
dependabot[bot]
f85fe31bee
Bump tempfile from 3.12.0 to 3.13.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.12.0 to 3.13.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.12.0...v3.13.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-02 15:11:15 +00:00
dependabot[bot]
a79a454751
Bump regex from 1.10.6 to 1.11.0
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.6 to 1.11.0.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.6...1.11.0)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-02 15:10:56 +00:00
Pranav Gaddamadugu
174dae47db Update rustfmt.toml to latest nightly and apply changes 2024-10-01 18:19:39 -07:00
Pranav Gaddamadugu
d746c427cc chore(leo): bump version for new release 2024-09-19 08:00:35 +08:00
dependabot[bot]
6b3adbd65d
Bump serde from 1.0.209 to 1.0.210
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.209 to 1.0.210.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.209...v1.0.210)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-09 10:20:47 +00:00
Pranav Gaddamadugu
82eba55f8d chore(leo): bump version for new release 2024-09-04 15:18:01 -07:00
Pranav Gaddamadugu
7dfecd41b1 Update LicenseHeader and Cargo metadata 2024-09-04 11:48:02 -07:00
dependabot[bot]
c9bc8e907e
Bump serde from 1.0.208 to 1.0.209
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.208 to 1.0.209.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.208...v1.0.209)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 11:02:23 +00:00
dependabot[bot]
8152706bcf
Bump serde from 1.0.207 to 1.0.208
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.207 to 1.0.208.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.207...v1.0.208)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-16 10:10:01 +00:00
Alessandro Coglio
5e1d3476ba Clippy fix. 2024-08-13 15:28:11 -07:00
Alessandro Coglio
93691bdb22 Update and improve some parser documentation.
Also make a couple of minor code layout changes to order tokens in a clearer
way.
2024-08-13 15:09:28 -07:00
d0cd
e55c2191d9
Merge pull request #28310 from ProvableHQ/dependabot/cargo/mainnet/tempfile-3.12.0
Bump tempfile from 3.11.0 to 3.12.0
2024-08-13 08:29:19 -07:00
d0cd
4a7b062175
Merge pull request #28316 from ProvableHQ/fix/tuple-future
[Fix] Futures in Tuples
2024-08-13 08:28:30 -07:00
dependabot[bot]
ce434a1051
Bump serde from 1.0.204 to 1.0.207
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.204 to 1.0.207.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.204...v1.0.207)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-13 10:12:05 +00:00
evan-schott
a356ff8a34 Fix 2024-08-09 19:33:17 -07:00
dependabot[bot]
e47590e3fa
Bump tempfile from 3.11.0 to 3.12.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.11.0 to 3.12.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/commits)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 11:03:39 +00:00
Pranav Gaddamadugu
acb7b61feb chore(leo): bump version for new release 2024-08-07 01:10:09 -04:00
d0cd
ae8afae9e6
Merge pull request #28306 from ProvableHQ/dependabot/cargo/mainnet/tempfile-3.11.0
Bump tempfile from 3.10.1 to 3.11.0
2024-08-06 09:11:39 -04:00
dependabot[bot]
6ea5a2fd74
Bump regex from 1.10.5 to 1.10.6
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.5 to 1.10.6.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.5...1.10.6)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 10:19:43 +00:00
dependabot[bot]
4e116168ed
Bump tempfile from 3.10.1 to 3.11.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.10.1 to 3.11.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.10.1...v3.11.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 10:19:04 +00:00
Alessandro Coglio
f72e4c10b5 Flag a TODO as discussed on Slack. 2024-07-11 10:00:10 -07:00
Alessandro Coglio
a0ab1524e6 Fix some doc. 2024-07-11 09:31:11 -07:00
Alessandro Coglio
9ce7dab0ed Clarify ABNF vs. lexer/parser annotations.
THis is only a documentation change.
2024-07-10 08:59:27 -07:00
Pranav Gaddamadugu
140a04072d chore(leo): bump version for new release 2024-07-08 13:53:16 -07:00
evan-schott
edb3c8ea16
Merge pull request #28198 from ProvableHQ/fix/parser-error-data
Fix expected list in parser error.
2024-07-08 11:41:36 -07:00
evan-schott
1e77f75d61
Merge pull request #28203 from ProvableHQ/feat/set-defaults-to-testnet
[Fix] Set defaults to `testnet`.
2024-07-08 11:40:48 -07:00
d0cd
9925390b77
Merge pull request #28202 from ProvableHQ/dependabot/cargo/mainnet/serde-1.0.204
Bump serde from 1.0.203 to 1.0.204
2024-07-08 10:03:08 -07:00
evan-schott
475f6d37cc
Merge pull request #28193 from ProvableHQ/fix/empty-struct
[Fix] Informative error on empty struct.
2024-07-08 09:54:37 -07:00