Commit Graph

16 Commits

Author SHA1 Message Date
Christian Rinderknecht
19f6981ae7
I added an optional semi-colon before "else".
Syntax: if ... then ...; else ...
2019-03-21 23:18:09 +01:00
Christian Rinderknecht
f6dbd9d601
I added set definitions by extension.
For example:

const bar : set (int) = set 1; 1+1; f(3); end
2019-03-21 22:55:08 +01:00
Christian Rinderknecht
1e65c63d99
Added construct remove k from map m. 2019-03-21 21:55:59 +01:00
Christian Rinderknecht
285be32729
I added an optional semi-colon in record type declarations. 2019-03-21 21:34:22 +01:00
Christian Rinderknecht
aa117ecfc2
I removed dummy module [MBytes] an use [Hex] directly. 2019-03-20 17:48:57 +01:00
Christian Rinderknecht
495686bbd4
I extended the right-hand side of assignments to accept "None"
without type annotation.

This is meant to enable specify the removal of a map binding.

Note: The index assignments in loops are not concerned.
2019-03-20 16:19:33 +01:00
Christian Rinderknecht
24c0a33c99 I extended left-hand sides of assignments to have qualified paths.
Note: In loops over integers, the initial assignment has still a
variable (the index) as left-hand side.

A qualified path is of the form "x" or "x.y.z" or "x.y.z[t]".
2019-03-20 14:59:10 +01:00
Christian Rinderknecht
dc70df99f9
I added qualified names (paths) as left-hand sides of assignments.
For example:

store.funded := True;
2019-03-20 13:27:55 +01:00
Christian Rinderknecht
e8443937fd
Changed "||" -> "or" and "&&" -> "and" to be more Pascal-like. 2019-03-20 12:28:25 +01:00
Christian Rinderknecht
0768f0c27d
Ported to constant declaration the work done for variable declarations.
That is to say, now constants can include unannotated empty lists etc.
2019-03-20 10:06:33 +01:00
Christian Rinderknecht
563bc59285
Added qualified names to patches ("patch x.y.z with ...").
Fixed grammar for map patches (should start with "patch", not "map").
2019-03-20 09:45:32 +01:00
Christian Rinderknecht
4c9a743411
Replaced expression "copy ... with ..." by instruction "patch ... with". 2019-03-19 14:32:43 +01:00
Christian Rinderknecht
c3b304db4a
I relaxed the extension to the grammar that enabled non-annotated
empty lists and None values as initial values in declarations.

Now, these values are accepted irrespective of the declared type. It
is up to the typechecker to validate them.
2019-03-19 11:54:23 +01:00
Christian Rinderknecht
6c5ae52db6
I relaxed the grammar to support in the parser for initial values of
variables to not require type annotation, like

var x : list (operation) := []
2019-03-19 10:52:47 +01:00
Christian Rinderknecht
46d6df2146
Changed "do nothing" to "skip". 2019-03-18 18:09:15 +01:00
Christian Rinderknecht
623683839f
Removed keyword "null", replaced by two keywords "do"
and "nothing".

Until now only products of type names were allowed: I extended
them to allow type expressions.

Removed the destructive update of a map binding "a[b] := c".

Record projection has been extended to allow for qualified
names: "a.b.c" and "a.b.c[d]".

Changed the LIGO extension from ".li" to ".ligo".

Fixed the name of the language to be "LIGO" (instead of "Ligo").
2019-03-18 17:47:11 +01:00