Commit Graph

57 Commits

Author SHA1 Message Date
Alessandro Coglio
7e930d8670 [ABNF] Fix use of integers in literals.
This removes the rule for `integer` and uses `natural` for all numeric literals.

Otherwise, lexing would be context-dependent for no good reason.

This is consistent with the lexer and parser of the Leo compiler.

Note that, for instance, `-1field` is not a literal, but rather a unary
expression where `-` is applied to the literal `1field`. This is consistent with
other languages too.
2022-03-08 21:08:59 -08:00
Collin Chin
5e2ba78750
Merge pull request #1656 from AleoHQ/remove/unsized-array
Remove/unsized array
2022-03-07 17:14:03 -08:00
Alessandro Coglio
6cbf206f86 [ABNF] Require types to avoid type inference.
Types are now required in variable and constant declarations (including for loop
variables), and for literals (i.e. there are no longer untyped literals).
2022-03-05 23:52:34 -08:00
Alessandro Coglio
6aca970b88 [ABNF] Re-generate markdown.
(Forgot to do this in the previous commit.)
2022-03-04 19:51:14 -08:00
collin
10bea676a8 remove unsized arrays 2022-03-04 12:23:46 -08:00
collin
22f605349c merge testnet3 2022-02-28 09:42:37 -08:00
collin
e263e64279 restructure compiler and delete unused code 2022-02-22 15:12:52 -08:00