source-academy / js-slang

Implementations of sublanguages of JavaScript, TypeScript, Scheme and Python
https://source-academy.github.io/source/
Apache License 2.0
66 stars 104 forks source link

Remove special cases for environment instruction generator #1577

Closed s-kybound closed 6 months ago

s-kybound commented 6 months ago

The CSE machine currently does not inject an environment instruction into the control when a function application or a block statement is the last item in a program. While this works for a single program, it breaks the REPL, where each submitted code snippet is treated as a singular program. The best way to deal with this issue is to force an environment instruction for any environment-producing statements at the end of the program to allow for newer REPL snippets to read from the correct environment.

Resolves #1576.

coveralls commented 6 months ago

Pull Request Test Coverage Report for Build 8211183573

Details


Totals Coverage Status
Change from base Build 8211108337: 0.0%
Covered Lines: 10374
Relevant Lines: 12242

💛 - Coveralls