@@ -368,20 +368,18 @@ ev-definition-1
368368 <EXERCISE >
369369 <INDEX >explicit-control evaluator for Scheme
370370 <SUBINDEX >special forms (additional)</SUBINDEX ></INDEX >
371- Implement
372- < SPLITINLINE >
373- < SCHEME >< SCHEMEINLINE >cond</ SCHEMEINLINE ></ SCHEME >
374- < JAVASCRIPT >< JAVASCRIPTINLINE >conditional_statements</ JAVASCRIPTINLINE >
375- </ JAVASCRIPT >
376- </ SPLITINLINE >
377- as a new basic
378- < SPLITINLINE >
379- <SCHEME >< SCHEMEINLINE >special form</ SCHEMEINLINE ></ SCHEME >
380- < JAVASCRIPT >< JAVASCRIPTINLINE >syntactic form</ JAVASCRIPTINLINE >
371+ < SPLIT >
372+ < SCHEME >
373+ Implement
374+ < SCHEMEINLINE >cond</ SCHEMEINLINE >
375+ as a new basic special form
376+ without reducing it to
377+ < SCHEMEINLINE >if</ SCHEMEINLINE >.
378+ </ SCHEME >
379+ <JAVASCRIPT >
380+ Implement conditional statements in the explicit control evaluator.
381381 </JAVASCRIPT >
382- </SPLITINLINE >
383- without reducing it to
384- <SCHEMEINLINE >if</SCHEMEINLINE >.
382+ </SPLIT >
385383 <SPLITINLINE >
386384 <SCHEME >
387385 You will have to construct a loop that tests the
@@ -392,15 +390,15 @@ ev-definition-1
392390 </SCHEME >
393391 <JAVASCRIPT >
394392 Note that proper handling of returns inside the consequent
395- and alternative blocks poses a hard challenge as the
393+ and alternative blocks poses a challenge as the
396394 current implementation only supports returning from the
397395 outermost block in a function. One way to implement this
398396 is to add a new register
399397 <JAVASCRIPTINLINE >returning</JAVASCRIPTINLINE > that keeps
400398 track of whether the current function is returning. Change
401399 <JAVASCRIPTINLINE >ev_sequence</JAVASCRIPTINLINE > so that
402400 instead of checking if the next statement is a return
403- statement, the sequence loop checks inspects
401+ statement, the sequence loop inspects
404402 <JAVASCRIPTINLINE >returning</JAVASCRIPTINLINE > to
405403 determine whether to continue or return. Also note that it
406404 is possible to nest several conditional statements, so a
0 commit comments