Commit Graph

1473 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
6399f873f5 improve error for '&' not followed by '&' 2022-05-31 16:28:01 +02:00
Mazdak Farrokhzad
c623165742 simplify Token::eat 2022-05-31 16:16:15 +02:00
gluax
94d96f156f fix span for group scalar errors, use suggested doc comment 2022-05-26 10:09:34 -07:00
gluax
2117ee3ae8 resolve readme conflict 2022-05-25 11:55:23 -07:00
collin
e34c35f1b0 merge testnet3 2022-05-25 14:28:03 -04:00
collin
65408acbb5 fix lexer test 2022-05-25 14:10:15 -04:00
collin
8d79193474 merge testnet3 2022-05-25 14:02:10 -04:00
gluax
936360793c slight clean up & handle grammar readme 2022-05-25 10:45:25 -07:00
gluax
8cb4b19e66 merge upstream changes 2022-05-25 09:21:47 -07:00
collin
4bc2fb10f4 cargo fmt 2022-05-24 13:39:08 -04:00
Collin Chin
c10e305366
Update type_.rs 2022-05-24 13:24:36 -04:00
collin
38d701851d clean up match 2022-05-24 12:49:38 -04:00
collin
c62f876765 type checker clean up and add docs 2022-05-24 12:11:55 -04:00
Collin Chin
944c5dcdd8
Update value.rs 2022-05-24 11:27:28 -04:00
Mazdak Farrokhzad
620b3525d4 misc parser tweaks 2022-05-24 16:48:58 +02:00
gluax
ca3fb11bc3 fmt fix 2022-05-23 19:01:07 -07:00
gluax
1cd7aad6ad fix #1819 2022-05-23 18:55:42 -07:00
gluax
65d237e25f fix last error double printing for error collection 2022-05-23 18:14:36 -07:00
gluax
ba4f1666d1 fix #1821 2022-05-23 18:00:33 -07:00
gluax
eee58883a6 clean up and fix type set checking 2022-05-23 11:07:43 -07:00
collin
d0273719ab push broken type checker 2022-05-23 11:40:14 -04:00
collin
b8780e888d merge testnet3 2022-05-20 10:39:21 -04:00
collin
119c191836 merge testnet3 2022-05-18 14:29:54 -04:00
Collin Chin
4ce11080b5
Merge pull request #1825 from AleoHQ/fix-loop-end-inclusive
[parser] Fix to disallow inclusive loop ending bound.
2022-05-18 14:17:32 -04:00
Mazdak Farrokhzad
4237a52696 simplify eat_identifier 2022-05-18 14:46:45 +02:00
Mazdak Farrokhzad
882f2e5454 remove char type + literals 2022-05-18 14:33:04 +02:00
Mazdak Farrokhzad
7f435eba48 remove expression statements 2022-05-17 14:41:30 +02:00
Alessandro Coglio
b1baf90719 [parser] Adhere to style. 2022-05-16 21:27:29 -07:00
Alessandro Coglio
1761b80578 [parser] Fix to disallow including loop ending bound.
This is not part of the current version of Leo (cf. ABNF grammar and Leo
Reference).

Adapt tests.
2022-05-16 21:24:42 -07:00
Alessandro Coglio
4989c50409 [parser] Attempt to fix style check. 2022-05-14 00:03:55 -07:00
Alessandro Coglio
21616fe167 [parser] Remove the input keyword.
This is also not in the current grammar, and it does not look like it is going
to be re-added.
2022-05-13 23:50:33 -07:00
Alessandro Coglio
2fbaf759db [parser] Remove mut and type keywords.
As discussed, these are no longer in the grammar. If and when we need them, we
will re-add them.

This also removes some extra code that gives a specific error when mut is
used. However, that is in fact another bug, because `mut` is a valid identifier
in the current grammar, and thus this extra code unjustly rejects code that uses
`mut` as an identifier.

Adjust some tests and expectations.
2022-05-13 23:36:08 -07:00
collin
f6aa7a578a merge testnet3 2022-05-13 12:33:35 -07:00
collin
bacc0d7510 merge testnet3 2022-05-12 13:18:43 -07:00
collin
c8de6826c2 preserve char scalar nonscalar 2022-05-12 13:16:25 -07:00
Mazdak Farrokhzad
8d915339a0 span refactor: fix build + simplify &span 2022-05-12 16:24:17 +02:00
Mazdak Farrokhzad
0e5402773a span refactor: fix rebase fallout 2022-05-12 16:17:53 +02:00
Mazdak Farrokhzad
508a95b2ba span refactor: improve comment 2022-05-12 16:12:32 +02:00
Mazdak Farrokhzad
8bf06ed872 add remark re. parser benchmarks 2022-05-12 16:12:32 +02:00
Mazdak Farrokhzad
2d6e737f7e span refactor: fix bench 2022-05-12 16:12:32 +02:00
Mazdak Farrokhzad
01a23f6e6e cargo clippy + similar 2022-05-12 16:12:31 +02:00
Mazdak Farrokhzad
a5ad874ffb spans: use source map backing 2022-05-12 16:09:18 +02:00
collin
8f17d6294a rename scalar -> primitive 2022-05-11 14:09:12 -07:00
Alessandro Coglio
62f2267c2b [parser] Fix parsing of ordering expressions.
Follow the grammar rule. The ordering operators are not associative.

Split previous tests into succeeding and failing ones.

Refresh expectations of old test files.

Add expectations of new test files.
2022-05-10 23:32:46 -07:00
collin
455603f0a4 cargo fmt 2022-05-10 16:35:53 -07:00
collin
60f6b77629 add scalar operation type checking 2022-05-10 16:26:35 -07:00
collin
55260ae5ad add scalar type to ast 2022-05-10 15:34:42 -07:00
collin
9fe4a7281b add scalar type to parser 2022-05-10 15:20:04 -07:00
collin
c1d36ee62e remove const function code 2022-05-10 11:57:23 -07:00
collin
cca3c84ef4 remove unused imports code and tests 2022-05-10 11:22:30 -07:00