Commit Graph

17 Commits

Author SHA1 Message Date
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
aa117ecfc2
I removed dummy module [MBytes] an use [Hex] directly. 2019-03-20 17:48:57 +01:00
Christian Rinderknecht
e8443937fd
Changed "||" -> "or" and "&&" -> "and" to be more Pascal-like. 2019-03-20 12:28:25 +01:00
Christian Rinderknecht
8eaf1a90ec
Maps can be defined by extension in declarations.
"map" has become a keyword to introduce definition of maps by extension in declarations ("map" ... "end"). This entails that a grammar rule had to be created to handle the type expressions "map (..., ...)". Concordantly, I added map patches, modelled after record patches.

I created a node in the AST for map expressions (currently only
map look-ups).

I refactored the parser with parametric rules.
2019-03-20 09:11:19 +01:00
Christian Rinderknecht
4c9a743411
Replaced expression "copy ... with ..." by instruction "patch ... with". 2019-03-19 14:32:43 +01:00
Christian Rinderknecht
d994592a1b
Changed "match ... with ..." to "case ... of ..." 2019-03-19 11:46:30 +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
Christian Rinderknecht
ea02e4cffe
Added keyword "storage" as parameter kind (with "var" and "const") for
entrypoints.
2019-03-14 18:17:19 +01:00
Christian Rinderknecht
5f129d924a
Removed storage and operations declarations: entry-points now take the
former and return the latter.
2019-03-14 14:04:20 +01:00
Christian Rinderknecht
c0e6843240
I added record creation (injection), field selection (projection)
and functional update (copy).

The only creative piece of concrete syntax is that of the
expression for functional updates:

copy foo with record field = value end

where "copy", "with", "record" and "end" are keywords.
2019-03-14 09:59:26 +01:00
Christian Rinderknecht
7dcad4779e
I added entrypoints (and removed the parameter declaration).
I fixed the pretty-printing of strings.
2019-03-10 13:55:24 +01:00
Christian Rinderknecht
00a255aa9e
Changed the line comments to start with "//". The list constructor is now "#". 2019-03-08 16:06:50 +01:00
Christian Rinderknecht
09f790680f
I extended the grammar with optional semicolons and vertical bars. 2019-03-07 17:06:02 +01:00
Christian Rinderknecht
45d18f7b12
Added instruction 'fail'. I changed the grammar and AST for local functions and removed global mutable variables. 2019-02-28 15:46:34 +01:00
Galfour
9df0f6ad3a initial commit 2019-02-25 21:29:29 +00:00