Mazdak Farrokhzad
b4e8a773df
simplify bidi override logic
2022-06-21 17:12:36 +02:00
Mazdak Farrokhzad
1d92e07fdf
simplify tokenize_iter
2022-06-21 17:12:36 +02:00
Mazdak Farrokhzad
2c194b8e57
reduce work for string literals bidi check
2022-06-21 17:12:36 +02:00
Mazdak Farrokhzad
8b3e87889f
cargo clippy
2022-06-21 17:12:36 +02:00
Mazdak Farrokhzad
7226659bf6
Value -> Literal
2022-06-21 17:12:34 +02:00
Mazdak Farrokhzad
ddbf2ae849
1. Speed up string literal lexing.
...
2. Move address check to parser.
3. Move assignment place WF check to type checker.
2022-06-21 17:07:44 +02:00
Collin Chin
1971dd0aa1
Merge pull request #1880 from AleoHQ/abnf-new-operators
...
[ABNF] Add new operators.
2022-06-20 12:24:12 -07:00
Collin Chin
6b064d0227
Merge pull request #1873 from AleoHQ/abnf-operator-calls
...
[ABNF] Add operator calls.
2022-06-20 12:23:46 -07:00
Collin Chin
39de5d1238
Merge pull request #1884 from AleoHQ/dependabot/cargo/testnet3/anyhow-1.0.58
...
Bump anyhow from 1.0.57 to 1.0.58
2022-06-20 12:22:49 -07:00
Collin Chin
b0c32a9ff1
Merge pull request #1883 from AleoHQ/dependabot/cargo/testnet3/indexmap-1.9.0
...
Bump indexmap from 1.8.2 to 1.9.0
2022-06-20 12:22:31 -07:00
Collin Chin
c95c920f04
Merge pull request #1866 from AleoHQ/method-call-expr
...
Implement AVM instructions as Leo method calls
2022-06-20 12:21:07 -07:00
dependabot[bot]
b0ecf7361c
Bump anyhow from 1.0.57 to 1.0.58
...
Bumps [anyhow](https://github.com/dtolnay/anyhow ) from 1.0.57 to 1.0.58.
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.57...1.0.58 )
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 10:20:15 +00:00
Alessandro Coglio
5539ce11a6
[ABNF] Improve the grammar for operator calls.
...
Introduce the notion of postfix expression in the grammar, which will also go
well with some expected upcoming extensions to Leo.
This does not change the Leo language. It does not necessarily involve modifying
the parser. It merely reorganizes some rules slightly.
2022-06-18 15:45:33 -07:00
dependabot[bot]
787937c36e
Bump indexmap from 1.8.2 to 1.9.0
...
Bumps [indexmap](https://github.com/bluss/indexmap ) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/bluss/indexmap/releases )
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md )
- [Commits](https://github.com/bluss/indexmap/compare/1.8.2...1.9.0 )
---
updated-dependencies:
- dependency-name: indexmap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-17 10:24:48 +00:00
0rphon
34a408ea41
sqrt tests
2022-06-16 16:56:00 -07:00
0rphon
b03c890dd2
syntactical operator tests
2022-06-16 16:45:37 -07:00
gluax
c9ab4bd3d7
add bitwise op parsing, fix tests
2022-06-16 15:40:48 -07:00
Alessandro Coglio
5f5124d2d0
[ABNF] Fix overlooked update.
...
Thanks to @gluax for reporting the issue.
2022-06-16 15:18:59 -07:00
Alessandro Coglio
64307d075c
[ABNF] Add new operators.
...
This adds shift (`<<` `>>`) and bitwise logical (`&` `|` `^`) operators.
Their precedence is between the additive and ordering operations, in this order
(higher to lower):
- ... others, to additive
- `<<` and `>>`
- `&`
- `|`
- `^`
- ... others, from ordering
This is consistent with Rust, but not with C and Java, both of which make the
bitwise logical operators lower-precedence than equalities.
The previous ABNF rule names for `conjunctive-expression` and
`disjunctive-expression` have been renamed to be more consistent with the newly
added ones. Also, the rule names "abbreviate" 'conjunctive' and 'disjunctive'
with 'and' and 'or', otherwise the names were a bit too long.
2022-06-16 14:02:22 -07:00
0rphon
94b506cf3f
fixed tests
2022-06-16 13:22:32 -07:00
0rphon
66286ca88e
more tests
2022-06-16 13:07:40 -07:00
0rphon
1cc47e9d08
more tests
2022-06-16 12:53:53 -07:00
gluax
b656fd5347
fix type checking on certain bitwise operations
2022-06-16 12:49:41 -07:00
0rphon
ed9ca4d6d8
added some tests
2022-06-16 12:06:46 -07:00
gluax
2181672b60
had to fix function calls after previous changes
2022-06-16 12:03:24 -07:00
gluax
a40d025d18
clean up of parsing method call fixs
2022-06-16 11:36:50 -07:00
gluax
33fe8ebbc2
fixes bug #1877 to make debugging easier, fixes parsing of method calls
2022-06-16 11:33:16 -07:00
0rphon
c54cf17ce1
resolve conflicts
2022-06-15 16:34:57 -07:00
Collin Chin
db963aabea
Merge pull request #1879 from AleoHQ/test-framework-fix
...
fixed critical test-framework bug
2022-06-15 16:31:12 -07:00
0rphon
0daffb267b
reverted filename path
2022-06-15 16:19:20 -07:00
0rphon
4d07cd4722
clippy
2022-06-15 16:10:49 -07:00
0rphon
d0cfa983b5
fixed bug
2022-06-15 16:06:26 -07:00
collin
eb2dc0d3b0
Merge branch 'testnet3' of https://github.com/AleoHQ/leo into method-call-expr
2022-06-15 11:34:11 -07:00
Collin Chin
64c47f8bf9
Merge pull request #1865 from AleoHQ/feature/compiler-benchmarking
...
[Feature] compiler benchmarking
2022-06-15 10:56:42 -07:00
collin
b2890f393a
merge testnet3
2022-06-15 10:23:01 -07:00
collin
007d1d0265
merge testnet3
2022-06-15 10:19:33 -07:00
Mazdak Farrokhzad
eee838abba
fixes in special methods parsing
2022-06-15 14:51:44 +02:00
Collin Chin
f45aecd91e
Merge pull request #1875 from AleoHQ/dependabot/cargo/testnet3/reqwest-0.11.11
...
Bump reqwest from 0.11.10 to 0.11.11
2022-06-14 16:07:53 -07:00
dependabot[bot]
69fa8a8a98
Bump reqwest from 0.11.10 to 0.11.11
...
Bumps [reqwest](https://github.com/seanmonstar/reqwest ) from 0.11.10 to 0.11.11.
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.10...v0.11.11 )
---
updated-dependencies:
- dependency-name: reqwest
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 23:07:47 +00:00
Collin Chin
62541d0ae9
Merge pull request #1870 from AleoHQ/abnf-line-terminators
...
[ABNF] Fix/improve handling of line terminators.
2022-06-14 16:07:39 -07:00
Collin Chin
abe9ce948a
Merge pull request #1874 from AleoHQ/dependabot/cargo/testnet3/clap-3.2.1
...
Bump clap from 3.1.18 to 3.2.1
2022-06-14 16:07:13 -07:00
Collin Chin
3f6c9b8d4b
Merge pull request #1869 from AleoHQ/fix-spelling
...
fix emitted file name
2022-06-14 16:06:12 -07:00
collin
8f4cdb3705
remove unused crates and code
2022-06-14 16:05:27 -07:00
gluax
7b4e97c3af
Merge branch 'feature/compiler-benchmarking' of github.com:AleoHQ/leo into feature/compiler-benchmarking
2022-06-14 11:43:22 -07:00
gluax
503956131a
remove some comments to clean up
2022-06-14 11:43:00 -07:00
collin
0e59e9bcf9
fix cmp type checking
2022-06-14 10:55:59 -07:00
dependabot[bot]
6cb1f0b940
Bump clap from 3.1.18 to 3.2.1
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.18 to 3.2.1.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.18...clap_complete-v3.2.1 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 10:33:33 +00:00
collin
6c759b7174
impl unary
2022-06-13 18:35:18 -07:00
collin
831e011f42
use more clear type checking methods
2022-06-13 14:53:01 -07:00
Alessandro Coglio
846c976c63
[ABNF] Add operator calls.
...
Since these are a method-like syntax for unary and binary operators (as in fact
these are represented as operators in the AST), the nomenclature 'operator call'
seems appropriate, at least for now. There is no need yet to introduce notions
of associated functions (and constants).
The rules explicitly distinguish between unary and binary ones, corresponding to
unary and binary operators. This lets us exclude right away calls with too many
arguments, and gives us a way to distinguish the two kinds.
A trailing comma is allowed at the end of the one argument of binary operator
calls, if one is really inclined to use it, just for syntactic consistency with
other calls (namely, function calls).
2022-06-13 13:24:05 -07:00