Commit graph

36 commits

Author SHA1 Message Date
James Harton
91a52574c8 Add some simple desugaring to the compiler. 2019-03-21 16:15:24 +13:00
James Harton
a45d9627dc Fix function and method calling once and for all. 2019-03-21 10:18:51 +13:00
James Harton
7be2c3e525 Code gardening. 2019-03-20 20:32:23 +13:00
James Harton
64435f1831 Track compile errors if a type is redefined. 2019-03-20 16:58:59 +13:00
James Harton
20bb5314cc Track types for locals and properties. 2019-03-20 16:19:59 +13:00
James Harton
ee3df9a527 Ensure that if expressions parse and build correctly. 2019-03-18 20:20:39 +13:00
James Harton
536e5cc5f4 Code gardening. 2019-03-18 18:54:21 +13:00
James Harton
596ee84f44 Add code improvement to IR and implement simple numeric constant folding. 2019-03-18 17:38:36 +13:00
James Harton
8942c04c6e Extend the IR to include the location and the result type. 2019-03-18 13:55:09 +13:00
James Harton
b0ab1a4717 Store blocks on the context and reference them.
Because we need to build a control-flow graph from all our blocks don't
store them haphazard all over the place but in a single blocks
collection on the context object.
2019-03-18 13:01:27 +13:00
James Harton
26ed1130e7 Use blocks rather than vecs or IR all over the place. 2019-03-18 08:53:47 +13:00
James Harton
30fdff315b Build IR 2019-03-17 18:54:35 +13:00
James Harton
bd2177940c Add a bunch more IR stuff and anonymous functions. 2019-03-14 21:25:12 +13:00
James Harton
781832eb7d There's no need to store the type declarations in the IR. 2019-03-14 16:51:15 +13:00
James Harton
292fdb1305 Add type, trait and impl definitions. 2019-03-14 08:29:01 +13:00
James Harton
f6359f4245 Use a simple stack machine to build the IR. 2019-03-13 20:32:13 +13:00
James Harton
81c0ac85c4 WIP: I don't think building our IR using recursive descent is going to work. 2019-03-12 15:44:13 +13:00
James Harton
aa6395e55b Make the parser much more explicit about it's grammer and deal with the consequences later. 2019-03-08 22:40:34 +13:00
James Harton
dece06f8c6 Build IR for more expressions. 2019-03-06 19:27:57 +13:00
James Harton
e022838be6 Add Ir for unary and binary expressions. 2019-03-06 16:27:22 +13:00
James Harton
a0e33edd10 Add IR for array and map constants. 2019-03-06 15:13:40 +13:00
James Harton
10fcc65045 Start over by trying to build an IR instead of the final output. 2019-03-06 13:38:18 +13:00
James Harton
59b28f7ce9 Rename typename to just ty. 2019-03-03 13:38:44 +13:00
James Harton
b7d15a2c3c Remove compiler. Again. 2019-03-03 13:28:28 +13:00
James Harton
448c68e028 :( 2019-02-26 13:10:18 +13:00
James Harton
5909368138 WIP 2019-02-25 20:52:18 +13:00
James Harton
f2b84a6e54 WIP 2019-02-25 13:36:51 +13:00
James Harton
2b2d40bb55 Add functions/clauses/arguments. 2019-02-23 15:19:00 +13:00
James Harton
4aa61a7a21 Extract types into separate files. 2019-02-23 10:14:46 +13:00
James Harton
80b549b586 Run clippy. 2019-02-23 08:52:59 +13:00
James Harton
243eb426c8 Add constant values. 2019-02-22 23:08:15 +13:00
James Harton
e85fb16707 Beginnings of a much simpler type system. 2019-02-22 22:08:48 +13:00
James Harton
115c1d51e9 WIP 2019-02-22 19:48:05 +13:00
James Harton
b07a3ce8ef Another attempt. 2019-02-14 21:07:17 +13:00
James Harton
7277510a72 Scope stuff. 2019-02-14 19:08:40 +13:00
James Harton
447c54ce35 Ideas for scopes. 2019-02-14 17:50:55 +13:00