brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 111 forks source link

Anchor desugar #1607

Closed manaspurohit closed 3 years ago

manaspurohit commented 3 years ago

translating desugar.arr over to typescript

Many variants of Expr don't need specific implementation in typescript since the map visitor will uniformly create nodes and go through their fields

global-names added to ts-ast so that pyret desugar and TS desugar will use the same global-names

manaspurohit commented 3 years ago

All the tests started failing after that commit and I couldn't really figure out why so I ended up reverting and doing type annotations and consolidating string dict to map functions as separate commits to tease out the issue. Ended up learning that the order of the imports in requires needs to match the order of the parameters in the theModule function which was causing issues when i was moving the string dict functions around

jpolitz commented 3 years ago

This is great!

I think one thing we could use more of on this branch (which maybe we can find in the old tests) is tests of currying stuff. That's where the most complicated logic is from the copy-over, and it should get thoroughly exercised.

I'm happy with this overall approach, though, and it's interesting that you got away with only need to call constructors and no more detailed helpers (and ones like boLocal were easy to move over).