mayankmahajan24 / QL

QL Language and Compiler, for Programming Langauges and Translators Course Fall 2015
4 stars 2 forks source link

Where gary mayank #48

Closed garymlin closed 8 years ago

garymlin commented 8 years ago

With great happiness, I am writing to say we have finished the where loop.

Quick comments: -The tests are where-syntax-N. Test 2 is pretty sweet. -We were having a scoping issue that took some ninja resolutions @anshulkgupta for figuring it out and @mayankmahajan24 for the genius solution (esp at 4am). Inside of the where loop, we were defining new variables where the right side was a json with selectors, however, the inferring was all fucked up. The reason is because after each where loop iteration we threw out the environment and the jast would have no knowledge about type inferences for json selectors. To solve this, after each iteration we kept the type inferences for the jsons and threw away everything else. This means that all json selectors are globally defined.