1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00
Commit Graph

50 Commits

Author SHA1 Message Date
joshvera
34186bced7 Remove sketches 2020-02-05 21:00:11 -05:00
joshvera
e6460394e8 Create Import edge paths in Import statements 2020-01-30 17:06:34 -05:00
joshvera
4530d0c1d4 Stub import hole test 2020-01-29 14:14:08 -05:00
joshvera
c9eb0cfa76 Add function arg test 2020-01-23 11:20:35 -05:00
joshvera
ff988e048c Define simple function test 2020-01-22 17:31:28 -05:00
Patrick Thomson
2cbc52804b Merge remote-tracking branch 'origin/master' into semantic-scope-graph 2020-01-15 16:30:42 -05:00
Patrick Thomson
fd494852fe
Merge pull request #407 from github/not-the-branch-you're-looking-for
Compile `not` statements.
2020-01-15 11:11:52 -05:00
joshvera
5ea07633d2 Failing reference test 2020-01-14 18:08:10 -05:00
Rob Rix
f78d90aaae
Remove the CHECK-JQ directive. 2019-12-20 11:43:15 -05:00
Patrick Thomson
74183dba8c Add a test. 2019-12-17 13:26:17 -05:00
Rob Rix
ae6b2849f2
Merge pull request #404 from github/none-is-the-loneliest-umber
Compile Python None expressions.
2019-12-16 09:34:05 -05:00
Patrick Thomson
e115f4ad59 Compile Python None expressions. 2019-12-13 12:51:23 -05:00
Patrick Thomson
e137f4c68b Compile Python lambdas.
Lambdas are so hilariously crippled in Python that they're
significantly easier to compile than functions. Indeed, the resulting
core looks much like a function definition, without a `rec` binding.
2019-12-13 12:14:04 -05:00
Patrick Thomson
630f2fcb3d Initial version of this before I go on a refactoring spree. 2019-10-30 13:13:53 -04:00
Patrick Thomson
a273f5881c Make it more accurate now that eval is not a special node. 2019-10-21 15:25:54 -04:00
Patrick Thomson
e607d9c011 Adjust the name of this test. 2019-10-21 15:25:28 -04:00
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