source-academy / js-slang

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

fix: reduce firstStatement if secondStatement is a return statement #1567

Closed hanscau closed 8 months ago

hanscau commented 8 months ago

Stepper was crashing because it was trying to reduce a return statement due to the first statement being a value. Fixed the evaluation sequence in accordance to the specs.

image

Reduce value if the next statement is a return statement

coveralls commented 8 months ago

Pull Request Test Coverage Report for Build 8124368200

Details


Totals Coverage Status
Change from base Build 8123236398: 0.001%
Covered Lines: 10353
Relevant Lines: 12219

💛 - Coveralls