Patrick Thomson
ff23c301fb
don't worry about this since it's a known bug
2019-10-18 10:22:19 -04:00
Patrick Thomson
01b4a23b23
Use rec
so functions can refer to themselves in their bodies.
...
Code like the following kind is legal in Python:
```python
def recursive(a): return recursive
```
This implies that function and class definitions need to use the Core
`rec` construct so that their bodies have an appropriate entry in the scope.
2019-10-16 17:34:43 -04:00
Patrick Thomson
daf12b5132
Integrate prelude into the test suite.
2019-10-15 13:10:18 -04:00
Patrick Thomson
5578e42989
Call the type
function inside the __semantic_prelude global.
2019-10-15 12:46:32 -04:00
Patrick Thomson
5566bac682
Compile class definitions.
2019-10-14 11:48:58 -04:00
Patrick Thomson
2b3acea5fb
Add unit tests.
2019-10-11 11:50:22 -04:00
Patrick Thomson
ccfa49aaee
Merge branch 'proper-continuations' into compile-python-calls
2019-10-09 14:52:50 -04:00
Patrick Thomson
e419e33a50
Make compile interface use a more powerful continuation.
2019-10-09 14:50:53 -04:00
Patrick Thomson
d380aabe89
spruce up the unit test
2019-10-07 12:17:52 -04:00
Patrick Thomson
e62ec09c62
[semantic-python] Compile function calls.
...
Though this does not work with keyword arguments, list/dictionary
splats, or generator expressions, it suffices for the simple case.
2019-10-02 15:56:25 -04:00
Patrick Thomson
b1611e13e8
Initial stab at folding over multiple assignments.
2019-09-27 17:35:51 -04:00
Patrick Thomson
e98e483c13
Define Compile interface in terms of compileCC.
2019-09-23 13:30:23 -04:00
Patrick Thomson
dccc1942aa
Break toplevel assignment case because it's wrong.
2019-09-23 12:13:40 -04:00
Patrick Thomson
375c975338
Use compileCC to build a record of toplevel bindings.
2019-09-23 11:56:40 -04:00
Patrick Thomson
d9f88fc046
Add a CHECK-TREE directive and simplify esoteric jq tests.
...
Due to the problems outlined in #245 , the tests for return statements
were complicated and not testing useful properties. This patch adds a
new `CHECK-TREE` directive which lets you embed a Core expression
as a string, which is parsed and then compared against the result of
compiling the containing module.
2019-09-18 18:07:43 -04:00
Patrick Thomson
2aea021890
Use some tree information in a unit test.
2019-09-18 13:05:10 -04:00
Patrick Thomson
99a7806c20
Fix tests.
2019-09-18 12:35:54 -04:00
Patrick Thomson
9728ef0199
Check that returns work within if-clauses.
2019-09-11 12:22:24 -04:00
Patrick Thomson
1cd1068323
Add test cases for translating early returns.
2019-09-11 11:44:46 -04:00
Patrick Thomson
a9328c3671
Derive JSON instances for the Core trees.
2019-09-04 23:10:54 -04:00
Patrick Thomson
973490b5d4
Decomplect this whole thing by lifting it into IO.
2019-08-29 09:20:13 -04:00
Patrick Thomson
80df9c1f1d
pass the scope graph explicitly
2019-08-27 10:47:45 -04:00
Patrick Thomson
7ddbee0006
Remove tests for future milestones for now to keep diffs small.
2019-08-27 10:33:53 -04:00
Patrick Thomson
daa36360a6
add failing tests
2019-08-16 13:24:11 -04:00
Patrick Thomson
dde59eb626
jq-based test suite works
2019-08-16 13:20:08 -04:00
Patrick Thomson
90dd0b4d33
Trying to bring up this test harness
2019-08-16 12:34:56 -04:00
Patrick Thomson
3fb642c06d
Experiment with LLVM-style directives for test assertions
2019-08-13 16:35:11 -04:00
Patrick Thomson
dc47e90c00
Minimum viable patch such that all stage-1 fixtures compile
2019-08-13 16:19:20 -04:00
Patrick Thomson
5acd975b1b
trying to get test cases in shape
2019-08-13 14:01:50 -04:00
Patrick Thomson
b4e24720d4
sections 3 and 4
2019-08-13 11:48:02 -04:00
Patrick Thomson
c95befdb22
Add tests for wave 2
2019-08-12 15:01:55 -04:00
Patrick Thomson
b8ba99ff12
Move these down a directory.
2019-08-12 14:52:43 -04:00
Patrick Thomson
4229e81dd3
Rename and reorg so that these are in line with the roadmap
2019-08-12 13:17:55 -04:00
Patrick Thomson
c578f767e7
some ideas
2019-08-08 13:23:36 -04:00